diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 82818a4f13..006b55a183 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -143,7 +143,7 @@ function display_setup_form( $error = null ) {
diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js index 99eae641cc..d689d9a026 100644 --- a/src/wp-admin/js/user-profile.js +++ b/src/wp-admin/js/user-profile.js @@ -1,4 +1,4 @@ -/* global ajaxurl, pwsL10n */ +/* global ajaxurl, pwsL10n, userProfileL10n */ (function($){ $(function(){ var pw_new = $('.user-pass1-wrap'), @@ -96,13 +96,13 @@ pw_field.attr( 'type', 'text' ); pw_togglebtn.attr( 'data-toggle', 0 ) .find( '.text' ) - .text( 'hide' ) + .text( userProfileL10n.hide ) ; } else { pw_field.attr( 'type', 'password' ); pw_togglebtn.attr( 'data-toggle', 1 ) .find( '.text' ) - .text( 'show' ) + .text( userProfileL10n.show ) ; } pw_field.focus(); diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php index 4b804b763e..9eec86cb87 100644 --- a/src/wp-admin/user-edit.php +++ b/src/wp-admin/user-edit.php @@ -467,7 +467,7 @@ if ( $show_password_fields ) : diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php index 98582c7a3f..da97a25184 100644 --- a/src/wp-admin/user-new.php +++ b/src/wp-admin/user-new.php @@ -405,7 +405,7 @@ if ( apply_filters( 'show_password_fields', true ) ) : ?> diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 194db03541..1188273552 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -373,6 +373,11 @@ function wp_default_scripts( &$scripts ) { ) ); $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 ); + did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array( + 'show' => __( 'Show' ), + 'hide' => __( 'Hide' ), + ) ); + $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );