Agents Manager: load UI translations from widgets.wp.com#50069
Conversation
The package enqueued its JS/CSS bundles but never the matching translation
files, so the UI always rendered in English. For connected variants with a
non-English locale, enqueue the locale-specific translation script from
widgets.wp.com/agents-manager/languages/{locale}-v1.js (with wp-i18n as a
dependency of the main bundle), mirroring Help Center and Image Studio.
Adds determine_iso_639_locale() to map the WordPress locale to the CDN file
naming, plus tests for the enqueue behaviour and locale normalisation.
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
|
@claude please review |
|
Claude finished @t-wright's task in 1m 20s —— View job Code Review: Agents Manager translations
Overall this is a clean, well-scoped change that mirrors the established Help Center / Image Studio pattern, and the test coverage is genuinely thorough (enqueue + dependency ordering, English skip, disconnected skip, and a data-provider for locale normalization). Nice work. A few observations, none blocking. Correctness — looks good ✅
Minor notes
SecurityURL construction uses Nothing here blocks merge from my perspective — the notes are nits and confirmations rather than required changes. |
Relates to FORNO-373
Proposed changes
Related product discussion/links
Does this pull request change what data or activity we track or use?
No
Testing instructions