Improve newly added strings for i18n:

* Use a placeholder for the theme name to be able to reorder words.
* Uppercase D for "Theme Details" to match existing strings.
* Merge two revision date formats.
* Add translator comment to strings with placeholders.

props obenland.
see #31776.
Built from https://develop.svn.wordpress.org/trunk@31905


git-svn-id: http://core.svn.wordpress.org/trunk@31884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-03-26 20:56:26 +00:00
parent e283270dbe
commit 55519962cc
7 changed files with 27 additions and 9 deletions

View File

@ -222,7 +222,12 @@ foreach ( $themes as $theme ) :
<div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div>
<?php if ( $theme['active'] ) { ?>
<h3 class="theme-name" id="<?php echo $aria_name; ?>"><span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?></h3>
<h3 class="theme-name" id="<?php echo $aria_name; ?>">
<?php
/* translators: %s: theme name */
printf( __( '<span>Active:</span> %s' ), $theme['name'] );
?>
</h3>
<?php } else { ?>
<h3 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h3>
<?php } ?>
@ -319,7 +324,12 @@ $can_delete = current_user_can( 'delete_themes' );
<div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div>
<# if ( data.active ) { #>
<h3 class="theme-name" id="{{ data.id }}-name"><span><?php _ex( 'Active:', 'theme' ); ?></span> {{{ data.name }}}</h3>
<h3 class="theme-name" id="{{ data.id }}-name">
<?php
/* translators: %s: theme name */
printf( __( '<span>Active:</span> %s' ), '{{ data.name }}' );
?>
></h3>
<# } else { #>
<h3 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h3>
<# } #>

View File

@ -1213,7 +1213,12 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
<div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div>
<# if ( data.theme.active ) { #>
<h3 class="theme-name" id="{{ data.theme.id }}-name"><span><?php _ex( 'Previewing:', 'theme' ); ?></span> {{ data.theme.name }}</h3>
<h3 class="theme-name" id="{{ data.theme.id }}-name">
<?php
/* translators: %s: theme name */
printf( __( '<span>Previewing:</span> %s' ), '{{ data.theme.name }}' );
?>
</h3>
<# } else { #>
<h3 class="theme-name" id="{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
<# } #>
@ -1286,7 +1291,7 @@ class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
<span class="reorder-toggle" tabindex="0">
<span class="reorder"><?php _ex( 'Reorder', 'Reorder widgets in Customizer' ); ?></span>
<span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
<span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
</span>
<?php
}

View File

@ -353,7 +353,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
<a href="<?php echo admin_url( 'theme-install.php' ); ?>" target="_top" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>
<?php endif; ?>
</h2>
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme details' ); ?>"></div>
<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
<div id="customize-container"></div>
<?php if ( 6 < count( $this->controls ) ) : ?>
<p><label for="themes-filter">

View File

@ -1700,7 +1700,7 @@ function wp_post_revision_title( $revision, $link = true ) {
return false;
/* translators: revision date format, see http://php.net/date */
$datef = _x( 'F j, Y @ H:i', 'revision date format');
$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
/* translators: 1: date */
$autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
/* translators: 1: date */
@ -1736,7 +1736,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
$author = get_the_author_meta( 'display_name', $revision->post_author );
/* translators: revision date format, see http://php.net/date */
$datef = _x( 'F j, Y @ H:i:s', 'revision date format');
$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
$gravatar = get_avatar( $revision->post_author, 24 );

View File

@ -479,7 +479,9 @@ function wp_default_scripts( &$scripts ) {
'newPost' => __( 'Title' ),
'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
/* translators: %d: nth embed found in a post */
'suggestedEmbedAlt' => __( 'Suggested embed #%d' ),
/* translators: %d: nth image found in a post */
'suggestedImgAlt' => __( 'Suggested image #%d' ),
) );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta3-31904';
$wp_version = '4.2-beta3-31905';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -804,7 +804,8 @@ function register_sidebar($args = array()) {
$i = count($wp_registered_sidebars) + 1;
if ( empty( $args['id'] ) ) {
_doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), 'id' ), '4.2.0' );
/* translators: %s: the id argument */
_doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), '<code>id</code>' ), '4.2.0' );
}
$defaults = array(