-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add translation context to all block's titles #27933
Conversation
Size Change: +91 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
Thank you for doing it. It only confirms that the planned work to move all translatable fields to |
If the title is moved to the block.json I guess it can also add the context automatically (and the same for any other strings), translators will love to have that. Same with theme.json. |
FWIW The WP-CLI string extraction for The PHP implementation to actually load the translations would need to do the same. |
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.
Great addition 👍
This PR adds the context in which a string is used to all block's titles, so translators know where these are used.
After translating a few strings myself via GlotPress for the Gutenberg plugin I realized some block titles were actually translated as verbs, not nouns. For example, Query Loop was translated in the Spanish locale as "Consultar el loop" (verb, like "query the loop"), instead of "Bucle de Consulta" (a compound noun). The example is just one of many that I also found in different languages and it's not meant to diminish any particular translation. If anything, this PR is an empathetic effort to make translators' life easier by giving them more context.
The blocks with compound nouns (post page, query loop) can be more prone to this kind of error, but there's also single-noun names that can be affected (quote => cita as noun, citar as verb), hence why I decided to set it up for all the blocks.