-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n: Patterns: Disambiguate singular & plural uses of 'Synced' & 'Unsynced' #62375
Conversation
N.B.: I may revert this commit in favour of simply fixing the string in my locale, but wanted to share the problem first. In my testing locale (pt-PT) I found this label unexpectedly rendered in the imperative mood ("Sincronize este padrão […]"). Since this string describes a user action mediated by a checkbox, I would expect the infinitive instead ("Sincronizar este padrão […]"). That said, we have a lot of strings like this throughout the editor(s), and lack of context is generally not a problem: the strings speak for themselves.
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
/* | ||
* FIXME: CAN WE GET RID OF THIS COMPONENT? AS FAR AS I CAN SEE, IT'S EXPORTED | ||
* BUT NEVER USED, ONLY MENTIONED IN DOCUMENTATION. | ||
*/ | ||
export default function ReusableBlocksMenuItems( { rootClientId } ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the whole "reusable-blocks" package can be deprecated. Might be good to do that in its own PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the whole "reusable-blocks" package can be deprecated. Might be good to do that in its own PR.
Yeah, I added this as a separate commit to easily revert — I just didn't want to forget
Size Change: -356 B (-0.02%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
Also cc @oandregal for visibility, since you worked a lot on the filters: One thing I considered for a moment was to generalise this problem at the field level. Specifically, we could require that the possible states of an enumeration include a singular and a plural label. But I've dismissed it for now: in practice, until we have more use cases, it seems like defaulting to singular is enough. WDYT? |
Should this be backported? If so, please add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Flaky tests detected in 4eae9af. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9414369161
|
…synced' (#62375) * i18n: Patterns: Disambiguate singular & plural uses of 'Synced' & 'Unsynced' * Logical refactor: `A[x] || B[x]` <=> `(A || B)[x]`
…synced' (#62375) * i18n: Patterns: Disambiguate singular & plural uses of 'Synced' & 'Unsynced' * Logical refactor: `A[x] || B[x]` <=> `(A || B)[x]`
…synced' (WordPress#62375) * i18n: Patterns: Disambiguate singular & plural uses of 'Synced' & 'Unsynced' * Logical refactor: `A[x] || B[x]` <=> `(A || B)[x]`
This was cherry-picked to the wp/6.6 branch. |
What?
Add or amend i18n context to labels "Synced" and "Unsynced" to disambiguate strings where the adjective qualifies a singular noun ("a [synced] pattern") from those qualifying a plural noun ("the [synced] patterns").
Why?
English spoils developers by being so lightly inflected. :)
In many languages, adjectives have case inflections for number. In my usual locale (pt-PT):
Without clear context attached to short strings like
'Synced'
, translators have no way to know which case to use, nor to encode different translations (one for singular and one for plural). For instance, in my locale, I spotted the sync status badge for patterns "mis-numbered":How?
Consistently provide i18n context to the strings "Synced" and "Unsynced" whenever they appear in UI to refer to patterns' sync status. This context (via
_x()
) should read:pattern (singular)
when the string is used in the context of a single pattern (e.g. a a status badge in a Data Views grid listing; a sync option when creating a new pattern)patterns
(preexisting context) when the string is used in the context of a group of patterns (e.g. a select control to filter between "All" / "Synced" / "Unsynced")Previously, strings either had no context or had one that would lead translators to assume the wrong number.
Context
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast