I18n: Improve translators comments [2].

* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch `44360.wp-includes_customize.3.patch` of the series.

Props marcomartins, mihaiiceyro, michielatyoast
See #44360


git-svn-id: https://develop.svn.wordpress.org/trunk@43596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jrf 2018-08-30 12:35:08 +00:00
parent 7839cf651f
commit 0b4334c5e3
3 changed files with 5 additions and 5 deletions

View File

@ -182,20 +182,20 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
if ( current_theme_supports( 'custom-header', 'video' ) ) {
_e( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image that matches the size of your video — you’ll be able to crop your image once you upload it for a perfect fit.' );
} elseif ( $width && $height ) {
/* translators: %s: header size in pixels */
printf(
/* translators: %s: header size in pixels */
__( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s &times; %s</strong>', $width, $height )
);
} elseif ( $width ) {
/* translators: %s: header width in pixels */
printf(
/* translators: %s: header width in pixels */
__( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s</strong>', $width )
);
} else {
/* translators: %s: header height in pixels */
printf(
/* translators: %s: header height in pixels */
__( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s</strong>', $height )
);

View File

@ -74,8 +74,8 @@ class WP_Customize_Nav_Menu_Locations_Control extends WP_Customize_Control {
<?php echo $description; ?>
<span class="theme-location-set">
<?php
/* translators: %s: menu name */
printf(
/* translators: %s: menu name */
_x( '(Current: %s)', 'menu location' ),
'<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
);

View File

@ -87,8 +87,8 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
<p class="no-themes-local">
<?php
/* translators: %s: "Search WordPress.org themes" button */
printf(
/* translators: %s: "Search WordPress.org themes" button text */
__( 'No themes found. Try a different search, or %s.' ),
sprintf( '<button type="button" class="button-link search-dotorg-themes">%s</button>', __( 'Search WordPress.org themes' ) )
);