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

WordPress Trac noreply at wordpress.org
Wed Aug 30 16:31:37 UTC 2023


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

Comment (by swissspidy):

 The main culprit for this bug is that all the blocks are registered on
 `init`, even when WP is not installed yet.

 Because blocks register scripts, that causes `WP_Scripts` to be
 initialized very early, triggering script localization of the password
 meter.

 Because of the way `wp-admin/install.php` loads translations, it's
 actually too early, and when the script localization happens it still
 thinks the locale is en_US.

 Not registering any blocks would automatically solve this issue.

 An alternative solution is to adjust `determine_locale()` to detect the
 current locale on the install screen. That's what my PR does.

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


More information about the wp-trac mailing list