#37779 closed defect (bug) (invalid)
Replace _x() with __() and translators comments in wp-login.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | I18N | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Context function _x() is used to differ two similar strings with different meanings. Translators comments are used to describe %s placeholders.
The attached patch is replacing:
/* translators: %s: site title */ _x( '← Back to %s', 'site' )
with:
/* translators: %s: site title */ __( '← Back to %s' )
There is only one string of this kind. We don't need to use context functions in here. And the %s placeholder is described in translators comments, not in the context area.
Attachments (2)
Change History (6)
#2
@
10 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#3
@
10 years ago
@SergeyBiryukov Those are two different po/mo files. One string is in ru_RU.mo and the other is in admin-ru_RU.mo.
#4
@
10 years ago
If the same string is used both on the front end an in the admin, it only exists in the general (non-admin) translation file. The translation in the admin was incorrect because of that.
We could remove the context in wp-login.php and keep it in wp-admin/edit-tag-form.php, but I'd prefer to keep it on both strings for clarity.
The context is intentional here, see #37095.