I18N: Improve translator comments for strings in the community events widget.

Props dimadin, iandunn.
Fixes #40865.

git-svn-id: https://develop.svn.wordpress.org/trunk@40866 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2017-06-01 09:48:41 +00:00
parent e7e088143d
commit c6c16f5336
2 changed files with 24 additions and 3 deletions

View File

@ -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&#8217;t locate %s. Please try another nearby city. For example: Kansas City; Springfield; Portland.' ),
'<em>{{data.unknownCity}}</em>'
); ?>

View File

@ -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&#8217;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.