#62402 closed defect (bug) (fixed)
Untranslatable texts in admin nav-menu.js
Reported by: | juliemoynat | Owned by: | joedolson |
---|---|---|---|
Milestone: | 6.7.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch commit fixed-major dev-reviewed |
Focuses: | javascript | Cc: |
Description (last modified by )
In WordPress 6.7, this ticket #43305 has been fixed. Two select fields have been added in the "Appearance > Menus" admin page.
In these select fields, there are options with English words that are added in "wp-admin\js\nav-menu.js":
- "No Parent"
- "of" (for "1 of 5")
They are raw texts and not translatable strings.
Change History (24)
#1
@
10 days ago
- Focuses administration coding-standards removed
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.7.1
This ticket was mentioned in PR #7788 on WordPress/wordpress-develop by @yogeshbhutkar.
10 days ago
#2
- Keywords has-patch added; needs-patch removed
### Description
Updated raw strings to use i18n functions.
Trac ticket: https://core.trac.wordpress.org/ticket/62402
This ticket was mentioned in Slack in #core by desrosj. View the logs.
8 days ago
#6
@
8 days ago
Added a review on the PR, but it seems that two of the strings should maybe use wp.i18n._x
instead of wp.i18n.__
to provide additional context to translators? It may not be clear what is being translated.
This ticket was mentioned in Slack in #polyglots by cbravobernal. View the logs.
8 days ago
#8
follow-up:
↓ 10
@
8 days ago
_x() may not be needed, IF:
- The string is only used once (or in the same way wherever it occurs), and
- adding a Translators: comment works.
Strings like "x of y", is usually best to build with fprint(), if possible. And still with a clarifying comment.
#9
@
8 days ago
_x
is effectively needed if we can't add a translator comment, which is probably the case, here.
#10
in reply to:
↑ 8
@
8 days ago
Replying to tobifjellner:
Strings like "x of y", is usually best to build with fprint(), if possible.
Indeed, wp.i18n.sprintf()
should be used there.
@yogeshbhutkar commented on PR #7788:
6 days ago
#11
Thanks, @desrosj for suggesting an improvement here.
Sure, it would be better to provide context to the translator. I've added a patch for the same. Thanks.
5 days ago
#12
@yogeshbhutkar one more change! @SergeyBiryukov confirmed in track that wp.i18n.sprintf()
is actually the correct function.
@yogeshbhutkar commented on PR #7788:
5 days ago
#13
Thanks, @desrosj.
The changes are appended to the PR.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
4 days ago
#15
@
4 days ago
- Keywords commit added
I made a minor change for readability, but I think this is good to go.
#17
@
4 days ago
- Keywords dev-feedback fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Re-opening for dev review and commit to 6.7.1.
#18
@
4 days ago
- Keywords dev-reviewed added; dev-feedback removed
Thanks @joedolson. Looks good to backport.
#21
@
3 days ago
- Keywords dev-feedback added; dev-reviewed removed
- Resolution fixed deleted
- Status changed from closed to reopened
Just some minor cleanup for translator comments in [59431], reopening for a second committer's review.
#22
@
3 days ago
- Keywords dev-reviewed added; dev-feedback removed
Thank you, @SergeyBiryukov! Looks good. Backporting now.
cc @joedolson