Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,20 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
);
}

/**
* Checks if the theme supports the new gallery block with image blocks.
* Note that if the editor theme has not been initialized (usually on the first app run)
* the value returned is null and the `unstable_gallery_with_image_blocks` analytics property will not be reported.
* @return true if the the supports the new gallery block with image blocks or null if the theme is not initialized.
*/
private Boolean themeSupportsGalleryWithImageBlocks() {
EditorTheme editorTheme = mEditorThemeStore.getEditorThemeForSite(mSite);
if (editorTheme == null) {
return null;
}
return editorTheme.getThemeSupport().getGalleryWithImageBlocks();
}

/**
* Temporary method for the Editor Onboarding project to control the percentage
* of users able to use this new editor onboarding tooltip feature. This will eventually
Expand Down Expand Up @@ -3301,9 +3315,7 @@ private void onEditorFinalTouchesBeforeShowing() {
((GutenbergEditorFragment) mEditorFragment).resetUploadingMediaToFailed(mediaIds);
}
} else if (mShowAztecEditor && mEditorFragment instanceof AztecEditorFragment) {
EditorTheme editorTheme = mEditorThemeStore.getEditorThemeForSite(mSite);
Boolean supportsGalleryWithImageBlocks = editorTheme.getThemeSupport().getGalleryWithImageBlocks();
mPostEditorAnalyticsSession.start(null, canViewEditorOnboarding(), supportsGalleryWithImageBlocks);
mPostEditorAnalyticsSession.start(null, canViewEditorOnboarding(), themeSupportsGalleryWithImageBlocks());
}
}

Expand All @@ -3316,15 +3328,8 @@ public void onEditorFragmentContentReady(
// It assumes this is being called when the editor has finished loading
// If you need to refactor this, please ensure that the startup_time_ms property
// is still reflecting the actual startup time of the editor
EditorTheme editorTheme = mEditorThemeStore.getEditorThemeForSite(mSite);
Boolean supportsGalleryWithImageBlocks = null;
if (editorTheme != null) {
// Note that if the editor theme has not been initialized (usually on the first app run) the
// `unstableGalleryWithImageBlocks` analytics property will not be reported
supportsGalleryWithImageBlocks = editorTheme.getThemeSupport().getGalleryWithImageBlocks();
}
mPostEditorAnalyticsSession
.start(unsupportedBlocksList, canViewEditorOnboarding(), supportsGalleryWithImageBlocks);
.start(unsupportedBlocksList, canViewEditorOnboarding(), themeSupportsGalleryWithImageBlocks());
presentNewPageNoticeIfNeeded();

// don't start listening for Story events just now if we're waiting for a block to be replaced,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PostEditorAnalyticsSession implements Serializable {
private static final String KEY_HAS_UNSUPPORTED_BLOCKS = "has_unsupported_blocks";
private static final String KEY_UNSUPPORTED_BLOCKS = "unsupported_blocks";
private static final String KEY_CAN_VIEW_EDITOR_ONBOARDING = "can_view_editor_onboarding";
private static final String KEY_GALLERY_WITH_IMAGE_BLOCKS = "unstableGalleryWithImageBlocks";
private static final String KEY_GALLERY_WITH_IMAGE_BLOCKS = "unstable_gallery_with_image_blocks";
private static final String KEY_POST_TYPE = "post_type";
private static final String KEY_OUTCOME = "outcome";
private static final String KEY_SESSION_ID = "session_id";
Expand Down
13 changes: 12 additions & 1 deletion WordPress/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2021-09-01 11:54:09+0000
Translation-Revision-Date: 2021-09-11 20:56:59+0000
Plural-Forms: nplurals=2; plural=n != 1;
Generator: GlotPress/3.0.0-alpha.2
Language: de
-->
<resources>
<string name="recommend_app_generic_get_template_error">Unbekannter Fehler beim Abrufen des empfohlenen App-Templates</string>
<string name="domains_primary_domain">HAUPTADRESSE DER WEBSITE</string>
<string name="domains_primary_domain_address">%s</string>
<string name="domains_free_plan_get_your_domain_title">Hol dir deine Domain</string>
<string name="gutenberg_native_line_height">Zeilenhöhe</string>
<string name="site_settings_site_domains_title">Website-Domains</string>
<string name="my_site_btn_domains">Domains</string>
<string name="me_btn_share">Teile WordPress mit einem Freund</string>
<string name="recommend_app_subject">WordPress-Apps – Apps für jeden Bildschirm</string>
<string name="recommend_app_null_response">Keine Antwort erhalten</string>
<string name="recommend_app_bad_format_response">Ungültige Antwort erhalten</string>
<string name="weekly_roundup_notification_text">Deine Website hat %1$d Aufrufe, %2$d Likes und %3$d Kommentare erhalten.</string>
<string name="weekly_roundup_notification_title">Wöchentliche Zusammenfassung: %s</string>
<string name="blogging_reminders_notification_time">Zeit für Benachrichtigungen</string>
Expand Down
20 changes: 19 additions & 1 deletion WordPress/src/main/res/values-gl/strings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Translation-Revision-Date: 2021-08-24 20:05:27+0000
Translation-Revision-Date: 2021-09-10 04:04:33+0000
Plural-Forms: nplurals=2; plural=n != 1;
Generator: GlotPress/3.0.0-alpha.2
Language: gl_ES
-->
<resources>
<string name="gutenberg_native_line_height">Altura da liña</string>
<string name="domains_free_plan_get_your_domain_title">Obtén o teu dominio</string>
<string name="domains_primary_domain_address">%s</string>
<string name="domains_primary_domain">DIRECCIÓN PRINCIPAL DO SITIO</string>
<string name="recommend_app_generic_get_template_error">Erro descoñecido ao recuperar o modelo recomendado da aplicación</string>
<string name="recommend_app_bad_format_response">Resposta recibida non válida</string>
<string name="recommend_app_null_response">Non se recibiu ningunha resposta</string>
<string name="recommend_app_subject">Aplicacións WordPress - Aplicacións para calquera pantalla</string>
<string name="me_btn_share">Comparte WordPress cun amigo</string>
<string name="my_site_quick_actions_title">Enlaces rápidos</string>
<string name="my_site_btn_domains">Dominios</string>
<string name="likes_this">gústame</string>
<string name="like_this">gústame</string>
<string name="site_settings_site_domains_title">Dominios do sitio</string>
<string name="weekly_roundup_notification_text">O teu sitio recibiu %1$d visualizacións, %2$d gústame, %3$d comentarios.</string>
<string name="weekly_roundup_notification_title">Repaso semanal: %s</string>
<string name="blogging_reminders_notification_time">Hora do aviso</string>
Expand Down Expand Up @@ -48,9 +62,13 @@ Language: gl_ES
<string name="stats_disabled_subtitle">Activa as estatísticas do sitio para ver información detallada sobre o tráfico, os «Gústame», os comentarios e os subscritores.</string>
<string name="stats_disabled_title">Buscas as estatísticas?</string>
<string name="gutenberg_native_what_is_a_block">Que é un bloque?</string>
<string name="gutenberg_native_we_re_working_hard_on_adding_support_for_s_previews_in_the_meanti_d8f5837e">Estamos traballando duro para engadir compatibilidade para vistas previas %s. Mentres tanto, podes previsualizar o contido incrustado na entrada.</string>
<string name="gutenberg_native_we_re_working_hard_on_adding_support_for_s_previews_in_the_meanti">Estamos traballando duro para engadir compatibilidade para vistas previas %s. Mentres tanto, podes previsualizar o contido incrustado na páxina.</string>
<string name="gutenberg_native_unable_to_embed_media">Non se puido incrustar o medio</string>
<string name="gutenberg_native_try_another_search_term">Proba outro termo de busca</string>
<string name="gutenberg_native_no_blocks_found">Non se encontraron bloques</string>
<string name="gutenberg_native_s_previews_not_yet_available">Aínda non están dispoñibles as vistas previas de %s</string>
<string name="gutenberg_native_s_block_previews_are_coming_soon">Pronto chegarán as vistas previas do bloque %s</string>
<string name="gutenberg_native_double_tap_to_preview_post">Toca dúas veces para previsualizar a entrada.</string>
<string name="gutenberg_native_double_tap_to_preview_page">Toca dúas veces para previsualizar a páxina.</string>
<string name="quick_start_list_upload_icon_subtitle">Mostrado na pestana do navegador do teu visitante e noutros sitios en liña.</string>
Expand Down
Loading