[wp-trac] [WordPress Trac] #58696: Installation pages do not have JS translations

WordPress Trac noreply at wordpress.org
Sat Jul 1 18:39:56 UTC 2023


#58696: Installation pages do not have JS translations
-----------------------------+------------------------------
 Reporter:  sabernhardt      |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  5.5
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  javascript
-----------------------------+------------------------------

Comment (by sabernhardt):

 The password toggle buttons and strength meters work for me on the Login,
 New User, User Profile and Writing Settings pages. Those use
 `wp_enqueue_script()`; Install and Setup Config pages use
 `wp_print_scripts()`.

 script from Install page in WordPress 5.4.2:
 {{{
 /* <![CDATA[ */
 var userProfileL10n = {"warn":"Votre nouveau mot de passe n\u2019a pas
 \u00e9t\u00e9 enregistr\u00e9.","warnWeak":"Confirmer l\u2019utilisation
 du mot de passe
 faible","show":"Afficher","hide":"Cacher","cancel":"Annuler","ariaShow":"Afficher
 le mot de passe","ariaHide":"Cacher le mot de passe"};
 /* ]]> */
 </script>
 <script type='text/javascript' src='http://localhost/wp54/wp-admin/js
 /user-profile.js?ver=5.4.2'></script>
 }}}

 script from Install page in WordPress 5.5:
 {{{
 <script type='text/javascript' id='user-profile-js-translations'>
 ( function( domain, translations ) {
         var localeData = translations.locale_data[ domain ] ||
 translations.locale_data.messages;
         localeData[""].domain = domain;
         wp.i18n.setLocaleData( localeData, domain );
 } )( "default", { "locale_data": { "messages": { "": {} } } } );
 </script>
 <script type='text/javascript' src='http://localhost/wp55/wp-admin/js
 /user-profile.js?ver=5.5' id='user-profile-js'></script>
 }}}

 [52937] removed the empty translations script later

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58696#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list