-
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 gettext content when translating 'Header'. #51066
Add gettext content when translating 'Header'. #51066
Conversation
@@ -59,7 +59,7 @@ function InterfaceSkeleton( | |||
|
|||
const defaultLabels = { | |||
/* translators: accessibility text for the top bar landmark region. */ | |||
header: __( 'Header' ), | |||
header: _x( 'Header', 'header landmark area' ), |
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.
Hi @gonzomir thank you for this enhancement 👍 We are missing the import of the _x function in import { __ } from '@wordpress/i18n'; line 14, but other than that the PR looks good.
@jorgefilipecosta Sorry for taking me so long to add the requested changes, let me know if anything else is required. |
@gonzomir Thanks for the PR. From what I've researched, the word As you can see, the word Are there any steps to actually check the problem being proposed this time? |
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 this PR is better than what we had on trunk and adds some context, so I'm going to merge it.
Fixes #51063.
What?
Use _x() with appropriate context when translating the word 'Header'.
Why?
The word 'Header' appears in different context in both Gutenberg and core, which makes it hard to translate.
How?
Add context to translatable strings when the context requires different translations.
Testing Instructions
Not sure about that, couldn't find information on how Gutenberg translation files are generated.