#60630 closed defect (bug) (fixed)
Updates / Plugin Dependencies: Improve localized strings
Reported by: | swissspidy | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
[57545] introduced many new localized strings, especially in updates.js
.
Many of them are using _x()
incorrectly or unnecessarily. So there's definitely room for improvement here.
Then there are dependencies separated by "|" (pipe) character instead of using wp_get_list_item_separator()
.
Also some usage of sprintf()
that could be improved.
Change History (9)
This ticket was mentioned in PR #6175 on WordPress/wordpress-develop by @swissspidy.
11 months ago
#2
#3
@
11 months ago
I think the comments plugin
or theme
are there for a reason. Some locales might translate the same word into different strings depending on context. Could a translator comment be added to each string instead of using _x
?
#4
@
11 months ago
That „Activate“ string doesn‘t need context though and has happily existed without context for years. If anything we‘d change this consistently throughout the code base.
A translator comment is not an adequate replacement for context, as it will just result in 1 string with multiple different comments for translators.
#5
@
11 months ago
Note: this plugin cannot be activated until the plugins that are required by it are activated.
We generally capitalize the letter after Note:
.
So, it could be
Note: This plugin cannot be activated until the plugins that are required by it are activated.
Another example:
Note: this plugin cannot be deactivated or deleted until the plugins that require it are deactivated or deleted.
@swissspidy commented on PR #6175:
11 months ago
#6
Looked at this with fresh eyes today after checking the rest of the code base and also what the code looked like in previous releases.
Ended up changing my view and added context where in doubt, rather then removing it.
In short, if we use _x( 'Activate', 'plugin' )
, let's make sure we use it everywhere like this.
#8
@
11 months ago
- Owner set to swissspidy
- Resolution set to fixed
- Status changed from assigned to closed
In 57714:
@swissspidy commented on PR #6175:
11 months ago
#9
Committed in https://core.trac.wordpress.org/changeset/57714
There might be more strings that need improvement. These are just the ones I found at first glance after looking at https://core.trac.wordpress.org/changeset/57545
Trac ticket: https://core.trac.wordpress.org/ticket/60630