From 55497ccfd1845440da7454379eaf1cd60bc4d13e Mon Sep 17 00:00:00 2001 From: Dominik Schilling <dominikschilling+git@gmail.com> Date: Thu, 1 Jun 2017 09:49:42 +0000 Subject: [PATCH] I18N: Improve translator comments for strings in the community events widget. Props dimadin, iandunn. Fixes #40865. Built from https://develop.svn.wordpress.org/trunk@40866 git-svn-id: http://core.svn.wordpress.org/trunk@40716 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 17 +++++++++++++++-- wp-includes/script-loader.php | 10 +++++++++- wp-includes/version.php | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 61f1c8f62b..51a001d780 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1169,7 +1169,16 @@ function wp_print_community_events_markup() { <label for="community-events-location"> <?php _e( 'City:' ); ?> </label> - <?php /* translators: Replace with the name of a city in your locale that shows events. Use only the city name itself, without any region or country. Use the endonym instead of the English name. */ ?> + <?php + /* translators: Replace with a city related to your locale. + * Test that it matches the expected location and has upcoming + * events before including it. If no cities related to your + * locale have events, then use a city related to your locale + * that would be recognizable to most users. Use only the city + * name itself, without any region or country. Use the endonym + * (native locale name) instead of the English name if possible. + */ + ?> <input id="community-events-location" class="regular-text" type="text" name="community-events-location" placeholder="<?php esc_attr_e( 'Cincinnati' ); ?>" /> <?php submit_button( __( 'Submit' ), 'secondary', 'community-events-submit', false ); ?> @@ -1206,7 +1215,11 @@ function wp_print_community_events_templates() { <script id="tmpl-community-events-could-not-locate" type="text/template"> <?php printf( - /* translators: %s is the name of the city we couldn't locate. Replace the examples with cities in your locale, but test that they match the expected location before including them. Use endonyms (native locale names) whenever possible. */ + /* translators: %s is the name of the city we couldn't locate. + * Replace the examples with cities in your locale, but test + * that they match the expected location before including them. + * Use endonyms (native locale names) whenever possible. + */ __( 'We couldn’t locate %s. Please try another nearby city. For example: Kansas City; Springfield; Portland.' ), '<em>{{data.unknownCity}}</em>' ); ?> diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index ff7d8bb855..ba52778d2f 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1046,7 +1046,15 @@ function wp_localize_community_events() { * It would be too cumbersome to include that in the instructions * to the user, so it's left as an implication. */ - /* translators: %s is the name of the city we couldn't locate. Replace the examples with cities in your locale, but test that they match the expected location before including them. Use endonyms (native locale names) whenever possible. */ + /* translators: %s is the name of the city we couldn't locate. + * Replace the examples with cities related to your locale. Test that + * they match the expected location and have upcoming events before + * including them. If no cities related to your locale have events, + * then use cities related to your locale that would be recognizable + * to most users. Use only the city name itself, without any region + * or country. Use the endonym (native locale name) instead of the + * English name if possible. + */ 'could_not_locate_city' => __( 'We couldn’t locate %s. Please try another nearby city. For example: Kansas City; Springfield; Portland.' ), // This one is only used with wp.a11y.speak(), so it can/should be more brief. diff --git a/wp-includes/version.php b/wp-includes/version.php index a8a3d43780..6a0421887d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-RC1-40865'; +$wp_version = '4.8-RC1-40866'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.