diff --git a/wp-admin/js/user-profile.js b/wp-admin/js/user-profile.js index a45164578f..b73f2ab5c4 100644 --- a/wp-admin/js/user-profile.js +++ b/wp-admin/js/user-profile.js @@ -2,10 +2,10 @@ * @output wp-admin/js/user-profile.js */ -/* global ajaxurl, pwsL10n, userProfileL10n */ +/* global ajaxurl, pwsL10n */ (function($) { var updateLock = false, - + __ = wp.i18n.__, $pass1Row, $pass1, $pass2, @@ -39,7 +39,7 @@ } // Once zxcvbn loads, passwords strength is known. - $( '#pw-weak-text-label' ).html( userProfileL10n.warnWeak ); + $( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) ); } function bindPass1() { @@ -64,10 +64,10 @@ function resetToggle( show ) { $toggleButton .attr({ - 'aria-label': show ? userProfileL10n.ariaShow : userProfileL10n.ariaHide + 'aria-label': show ? __( 'Show password' ) : __( 'Hide password' ) }) .find( '.text' ) - .text( show ? userProfileL10n.show : userProfileL10n.hide ) + .text( show ? __( 'Show' ) : __( 'Hide' ) ) .end() .find( '.dashicons' ) .removeClass( show ? 'dashicons-hidden' : 'dashicons-visibility' ) @@ -402,7 +402,7 @@ /* Warn the user if password was generated but not saved */ $( window ).on( 'beforeunload', function () { if ( true === updateLock ) { - return userProfileL10n.warn; + return __( 'Your new password has not been saved.' ); } } ); diff --git a/wp-admin/js/user-profile.min.js b/wp-admin/js/user-profile.min.js index 1bd30936ee..2cc326b577 100644 --- a/wp-admin/js/user-profile.min.js +++ b/wp-admin/js/user-profile.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(o){var a,t,n,i,r,l,d,p,c,u=!1;function h(){"function"==typeof zxcvbn?(t.val()?v():(t.val(t.data("pw")),t.trigger("pwupdate")),w(),1!==parseInt(l.data("start-masked"),10)?t.attr("type","text"):l.trigger("click"),o("#pw-weak-text-label").html(userProfileL10n.warnWeak)):setTimeout(h,50)}function f(e){l.attr({"aria-label":e?userProfileL10n.ariaShow:userProfileL10n.ariaHide}).find(".text").text(e?userProfileL10n.show:userProfileL10n.hide).end().find(".dashicons").removeClass(e?"dashicons-hidden":"dashicons-visibility").addClass(e?"dashicons-visibility":"dashicons-hidden")}function m(){var e,s;a=o(".user-pass1-wrap, .user-pass-wrap"),o(".user-pass2-wrap").hide(),p=o("#submit, #wp-submit").on("click",function(){u=!1}),d=p.add(" #createusersub"),i=o(".pw-weak"),(r=i.find(".pw-checkbox")).change(function(){d.prop("disabled",!r.prop("checked"))}),(t=o("#pass1")).length?(c=t.val(),1===parseInt(t.data("reveal"),10)&&h(),t.on("input pwupdate",function(){t.val()!==c&&(c=t.val(),t.removeClass("short bad good strong"),w())})):t=o("#user_pass"),n=o("#pass2").on("input",function(){0]*>/gi,"");n[e].length&&-1===o.inArray(a,t)&&(t.push(a),o("