Repository navigation
I18N: Make plugin activation aria-labels in updates.js translatable - #14067
maheshbohara wants to merge 1 commit into
Conversation
The `%s activated successfully.` and `%s is active.` aria-label strings in `wp.updates.activatePluginSuccess()` had translators comments but were not wrapped in `__()`, so they were never extracted for translation. Follow-up to [57545]. See #66266.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Developed in #14067. Props maheshbohara. Fixes #66266. git-svn-id: https://develop.svn.wordpress.org/trunk@64226 602fd350-edb4-49c9-b593-d223f7449a82
Developed in WordPress/wordpress-develop#14067. Props maheshbohara. Fixes #66266. Built from https://develop.svn.wordpress.org/trunk@64226 git-svn-id: http://core.svn.wordpress.org/trunk@63377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Wraps two aria-label strings in
wp.updates.activatePluginSuccess()in__()so they can be translated:%s activated successfully.%s is active.Both already had translators comments but were passed to
sprintf()as bare string literals, so they were never extracted and are always output in English. They were introduced in [57545]. No other string in core's JS has this problem.Note on scope: since [58250] (6.5.4) the Activate buttons in core navigate to the activation URL, so core itself no longer calls
wp.updates.activatePlugin(). The untranslated labels are only reachable by plugins or custom code using that public API.Trac ticket: https://core.trac.wordpress.org/ticket/66266
Testing instructions
aria-label.The strings are not in the language packs yet, so to see a translated label, provide one first, e.g.
wp.i18n.setLocaleData( { '%s activated successfully.': [ '%s wurde erfolgreich aktiviert.' ] } ).Hello Dolly 1.7.2 activated successfully.Hello Dolly 1.7.2 wurde erfolgreich aktiviert.Hello Dolly is active.Hello Dolly ist aktiv.Hello Dolly 1.7.2 activated successfully.wp i18n make-potonupdates.jsextracts 84 strings before and 86 after; the only additions are these two, with their translators comments.grunt jshint:corepasses for the file.No unit test is included: this is a string-only change, and
tests/qunit/wp-admin/js/updates.jsis not currently loaded bytests/qunit/index.html.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus
Used for: Investigating and reproducing the issue, writing the two-line change, running the verification above, and drafting this description. I reviewed the change and take responsibility for it.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.