Make WordPress Core

Changeset 24157


Ignore:
Timestamp:
05/02/2013 10:12:19 AM (11 years ago)
Author:
ocean90
Message:

Revisions UI: Add translation contexts and remove unneeded lines.

props nao. fixes #23917.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r24156 r24157  
    36953695.comparing-two-revisions #diff-previous-revision,
    36963696.comparing-two-revisions #diff-next-revision,
    3697 #diff-title-from-current-version,
    3698 .comparing-two-revisions.current-version #diff-title-from-current-version,
    36993697#diff-header-from {
    37003698    display: none;
  • trunk/wp-admin/includes/ajax-actions.php

    r24123 r24157  
    22462246        );
    22472247
     2248        /* translators: 1: date */
    22482249        $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
     2250        /* translators: 1: date */
    22492251        $currentf  = _x( '%1$s [Current Revision]', 'post revision title extra' );
    22502252
  • trunk/wp-admin/js/revisions.js

    r24119 r24157  
    22
    33(function($) {
    4     var Revision, Revisions, Diff, l10n, revisions;
     4    var Revision, Revisions, Diff, revisions;
    55
    66    revisions = wp.revisions = function() {
     
    1010    _.extend( revisions, { model: {}, view: {}, controller: {} } );
    1111
    12     // Link any localized strings.
    13     l10n = revisions.model.l10n = typeof wpRevisionsL10n === 'undefined' ? {} : wpRevisionsL10n;
    14 
    15     // Link any settings.
    16     revisions.model.settings = l10n.settings || {};
    17     delete l10n.settings;
     12    // Link settings.
     13    revisions.model.settings = typeof wpRevisionsSettings === 'undefined' ? {} : wpRevisionsSettings;
    1814
    1915
     
    331327                }
    332328
    333                 if ( 0 === Diff.leftDiff ) {
    334                     $( '#revision-diff-container' ).addClass( 'current-version' );
    335                 } else {
    336                     $( '#revision-diff-container' ).removeClass( 'current-version' );
    337                 }
    338 
    339329                Diff.revisionView.render();
    340330            }
  • trunk/wp-admin/revision.php

    r24119 r24157  
    7979wp_enqueue_script( 'revisions' );
    8080
    81 $strings = array(
    82     'diffFromTitle' => _x( 'From: %s', 'revision from title'  ),
    83     'diffToTitle'   => _x( 'To: %s', 'revision to title' )
    84 );
    8581
    8682$settings = array(
     
    9086);
    9187
    92 $strings['settings'] = $settings;
    93 wp_localize_script( 'revisions', 'wpRevisionsL10n', $strings );
     88wp_localize_script( 'revisions', 'wpRevisionsSettings', $settings );
    9489
    9590require_once( './admin-header.php' );
     
    126121    <div id="diff-header">
    127122        <div id="diff-header-from" class="diff-header">
    128             <div id="diff-title-from-current-version" class="diff-title">
    129                 <?php printf( '<strong>%1$s</strong> %2$s.' , __( 'From:' ), __( 'the current version' ) ); ?>
    130             </div>
    131 
    132123            <div id="diff-title-from" class="diff-title">
    133                 <strong><?php _e( 'From:' ); ?></strong> {{{ data.titleFrom }}}
     124                <strong><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong> {{{ data.titleFrom }}}
    134125            </div>
    135126        </div>
     
    137128        <div id="diff-header-to" class="diff-header">
    138129            <div id="diff-title-to" class="diff-title">
    139                 <strong><?php _e( 'To:' ); ?></strong> {{{ data.titleTo }}}
     130                <strong><?php _e( 'To:', 'Followed by post revision info' ); ?></strong> {{{ data.titleTo }}}
    140131            </div>
    141132
     
    151142<script id="tmpl-revision-interact" type="text/html">
    152143    <div id="diff-previous-revision">
    153         <input class="button" type="button" id="previous" value="<?php esc_attr_e( 'Previous' ); ?>" />
     144        <input class="button" type="button" id="previous" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" />
    154145    </div>
    155146
    156147    <div id="diff-next-revision">
    157         <input class="button" type="button" id="next" value="<?php esc_attr_e( 'Next' ); ?>" />
     148        <input class="button" type="button" id="next" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" />
    158149    </div>
    159150
  • trunk/wp-includes/post-template.php

    r24156 r24157  
    13131313    $datef = _x( 'j F, Y @ G:i', 'revision date format');
    13141314    /* translators: 1: date */
    1315     $autosavef = __( '%1$s [Autosave]' );
     1315    $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
    13161316    /* translators: 1: date */
    1317     $currentf  = __( '%1$s [Current Revision]' );
     1317    $currentf  = _x( '%1$s [Current Revision]', 'post revision title extra' );
    13181318
    13191319    $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
Note: See TracChangeset for help on using the changeset viewer.