#58424 closed enhancement (fixed)
Provide gettext context to disambiguate various translation strings
Reported by: | gonzomir | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | I18N | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
The word 'Header' appears as translatable string in different places and different contexts. This makes it impossible to properly translate it in the context it's used. As an example in Bulgarian 'Header' has been translated in 2011 by Nikolay Bachiyski (nbachiyski) in the context of header image, and now this translation started appearing in site editor in the context of header template or page section. I understand most of the changes needed will be in the Gutenberg project `I'll file an issue there too), but my suggestion is to always use gettext content when this word appears alone in the UI.
Attachments (1)
Change History (12)
This ticket was mentioned in PR #4520 on WordPress/wordpress-develop by gonzomir.
18 months ago
#1
- Keywords has-patch added
#2
@
18 months ago
- Milestone changed from Awaiting Review to 6.3
Hi there, welcome to WordPress Trac! Thanks for the ticket and the PR.
This makes sense to me.
In 58424.diff, I've added the context for a few more related strings for consistency:
- The
'Background'
string. Like thecustom-header
theme feature, it could also use the context for clarity. - The
'General'
and'Footer'
strings when referring to template part areas.
#3
@
18 months ago
- Keywords commit added
Hi there! thanks for ticket and PR.
@SergeyBiryukov patch 58424.diff look good to me and ready for merge.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
18 months ago
#6
@
18 months ago
58424.diff looks good to me too.
@mukesh27 Yeah I think the ticket should be renamed.
#8
@
18 months ago
- Summary changed from 'Header' used in i18n functions in different contexts without gettext context to Provide gettext context to disambiguate various translation strings
#9
@
18 months ago
- Owner set to audrasjb
- Status changed from new to reviewing
Self assigning for commit
consideration.
Use
_x()
with appropriate context when translating the word 'Header'.Trac ticket: [](https://core.trac.wordpress.org/ticket/58424)