[wp-trac] [WordPress Trac] #65015: Connectors: Several strings are not translated
WordPress Trac
noreply at wordpress.org
Thu Apr 9 11:04:22 UTC 2026
#65015: Connectors: Several strings are not translated
--------------------------+----------------------
Reporter: 369work | Owner: (none)
Type: defect (bug) | Status: closed
Priority: high | Milestone: 7.0
Component: I18N | Version:
Severity: normal | Resolution: wontfix
Keywords: needs-patch | Focuses:
--------------------------+----------------------
Changes (by desrosj):
* keywords: close has-patch => needs-patch
* priority: normal => high
Comment:
I've been working with @manishxdp today at WordCamp Asia Contributor Day,
and based on what we found this seems like a legitimate issue that needs
to be addressed.
As far as I can tell based on our investigation today, the normal practice
for registering translations for a specific script is to call
`wp_set_script_translations()` after the script is registered. This prints
an inline, localized script with the translated strings so that `wp-i18n`
can properly localize them.
However, there does not appear to be an equivalent function for script
''modules''. I'm not clear on the history there and whether this is
intentional or what the functional differences are between scripts and
script modules, but it seems that a `set_translations()` method likely
needs to be added to `WP_Script_Modules` so that strings within modules
are properly localized and translated for the user.
That change belongs here in `wordpress-develop` with the
`wp_set_script_module_translations()` wrapper (see
`wp_set_script_translations()`). However, a polyfill will need to be added
to `gutenberg` to ensure it works in the plugin for users running
`WP<7.0`. Then the template files in the `wp-build` package will need to
be updated to call `wp_set_script_module_translations()`
In talking with @westonruter, it seems this will be quite complicated
because of how modules include files (directly and not typically
registered as a script through WordPress). The strings for every
dependency file needs to also be localized respecting the textdomain for
each.
I'm unclear how this is different than the previous issues reported above,
but I don't believe that this will resolve itself in the same way.
The surface area for this bug will be any registered script module that
contains strings. For 7.0, this is primarily affecting the new admin pages
registered through routes.
I have changed this to a high priority issue because it seems that these
strings will not be localized in WordPress 7.0 without resolving this gap.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65015#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list