Make WordPress Core

Changeset 33249


Ignore:
Timestamp:
07/13/2015 10:34:18 PM (11 years ago)
Author:
obenland
Message:

Passwords: Make show/hide toggle translatable.

See #32589.

Location:
trunk/src
Files:
5 edited

Legend:

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

    r33246 r33249  
    144144                                        <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    145145                                                <span class="dashicons dashicons-visibility"></span>
    146                                                 <span class="text">hide</span>
     146                                                <span class="text"><?php _e( 'Hide' ); ?></span>
    147147                                        </button>
    148148                                        <div id="pass-strength-result"></div>
  • trunk/src/wp-admin/js/user-profile.js

    r33166 r33249  
    1 /* global ajaxurl, pwsL10n */
     1/* global ajaxurl, pwsL10n, userProfileL10n */
    22(function($){
    33        $(function(){
     
    9797                                pw_togglebtn.attr( 'data-toggle', 0 )
    9898                                        .find( '.text' )
    99                                                 .text( 'hide' )
     99                                                .text( userProfileL10n.hide )
    100100                                ;
    101101                        } else {
     
    103103                                pw_togglebtn.attr( 'data-toggle', 1 )
    104104                                        .find( '.text' )
    105                                                 .text( 'show' )
     105                                                .text( userProfileL10n.show )
    106106                                ;
    107107                        }
  • trunk/src/wp-admin/user-edit.php

    r33246 r33249  
    468468                        <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    469469                                <span class="dashicons dashicons-visibility"></span>
    470                                 <span class="text">hide</span>
     470                                <span class="text"><?php _e( 'Hide' ); ?></span>
    471471                        </button>
    472472                        <div style="display:none" id="pass-strength-result"></div>
  • trunk/src/wp-admin/user-new.php

    r33246 r33249  
    406406                                <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    407407                                        <span class="dashicons dashicons-visibility"></span>
    408                                         <span class="text">hide</span>
     408                                        <span class="text"><?php _e( 'Hide' ); ?></span>
    409409                                </button>
    410410                                <div style="display:none" id="pass-strength-result"></div>
  • trunk/src/wp-includes/script-loader.php

    r33166 r33249  
    374374
    375375        $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
     376        did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array(
     377                'show' => __( 'Show' ),
     378                'hide' => __( 'Hide' ),
     379        ) );
     380
    376381        $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 );
    377382
Note: See TracChangeset for help on using the changeset viewer.