WordPress.org

Make WordPress Core

Changeset 31905


Ignore:
Timestamp:
03/26/2015 08:55:34 PM (6 years ago)
Author:
ocean90
Message:

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.

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/themes.php

    r31497 r31905  
    223223
    224224    <?php if ( $theme['active'] ) { ?>
    225         <h3 class="theme-name" id="<?php echo $aria_name; ?>"><span><?php _ex( 'Active:', 'theme' ); ?></span> <?php echo $theme['name']; ?></h3>
     225        <h3 class="theme-name" id="<?php echo $aria_name; ?>">
     226            <?php
     227            /* translators: %s: theme name */
     228            printf( __( '<span>Active:</span> %s' ), $theme['name'] );
     229            ?>
     230        </h3>
    226231    <?php } else { ?>
    227232        <h3 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h3>
     
    320325
    321326    <# if ( data.active ) { #>
    322         <h3 class="theme-name" id="{{ data.id }}-name"><span><?php _ex( 'Active:', 'theme' ); ?></span> {{{ data.name }}}</h3>
     327        <h3 class="theme-name" id="{{ data.id }}-name">
     328            <?php
     329            /* translators: %s: theme name */
     330            printf( __( '<span>Active:</span> %s' ), '{{ data.name }}' );
     331            ?>
     332        ></h3>
    323333    <# } else { #>
    324334        <h3 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h3>
  • trunk/src/wp-includes/class-wp-customize-control.php

    r31698 r31905  
    12141214
    12151215            <# if ( data.theme.active ) { #>
    1216                 <h3 class="theme-name" id="{{ data.theme.id }}-name"><span><?php _ex( 'Previewing:', 'theme' ); ?></span> {{ data.theme.name }}</h3>
     1216                <h3 class="theme-name" id="{{ data.theme.id }}-name">
     1217                    <?php
     1218                    /* translators: %s: theme name */
     1219                    printf( __( '<span>Previewing:</span> %s' ), '{{ data.theme.name }}' );
     1220                    ?>
     1221                </h3>
    12171222            <# } else { #>
    12181223                <h3 class="theme-name" id="{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
     
    12871292        <span class="reorder-toggle" tabindex="0">
    12881293            <span class="reorder"><?php _ex( 'Reorder', 'Reorder widgets in Customizer' ); ?></span>
    1289             <span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer'  ); ?></span>
     1294            <span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
    12901295        </span>
    12911296        <?php
  • trunk/src/wp-includes/class-wp-customize-section.php

    r31542 r31905  
    354354                <?php endif; ?>
    355355                </h2>
    356                 <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme details' ); ?>"></div>
     356                <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
    357357                <div id="customize-container"></div>
    358358                <?php if ( 6 < count( $this->controls ) ) : ?>
  • trunk/src/wp-includes/post-template.php

    r31862 r31905  
    17011701
    17021702    /* translators: revision date format, see http://php.net/date */
    1703     $datef = _x( 'F j, Y @ H:i', 'revision date format');
     1703    $datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
    17041704    /* translators: 1: date */
    17051705    $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
     
    17371737    $author = get_the_author_meta( 'display_name', $revision->post_author );
    17381738    /* translators: revision date format, see http://php.net/date */
    1739     $datef = _x( 'F j, Y @ H:i:s', 'revision date format');
     1739    $datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
    17401740
    17411741    $gravatar = get_avatar( $revision->post_author, 24 );
  • trunk/src/wp-includes/script-loader.php

    r31904 r31905  
    480480            'unexpectedError' => __( 'Sorry, but an unexpected error occurred.' ),
    481481            'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
     482            /* translators: %d: nth embed found in a post */
    482483            'suggestedEmbedAlt' => __( 'Suggested embed #%d' ),
     484            /* translators: %d: nth image found in a post */
    483485            'suggestedImgAlt' => __( 'Suggested image #%d' ),
    484486        ) );
  • trunk/src/wp-includes/widgets.php

    r31850 r31905  
    805805
    806806    if ( empty( $args['id'] ) ) {
    807         _doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), 'id' ), '4.2.0' );
     807        /* translators: %s: the id argument */
     808        _doing_it_wrong( __FUNCTION__, sprintf( __( 'You should set %s in the arguments array.' ), '<code>id</code>' ), '4.2.0' );
    808809    }
    809810
Note: See TracChangeset for help on using the changeset viewer.