#13996 closed defect (bug) (fixed)
Dysfunctional i18n function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | I18N | Keywords: | needs-patch |
Focuses: | Cc: |
Description
With at least the fr_FR and ru_RU translation, the "All" link at the top of the /wp-admin/edit-comments.php page is still in English.
The code used in WP is:
'all' => _nx_noop('All', 'All', 'comments'), // singular not used
Could there be an issue with _nx_noop()?
Attachments (1)
Change History (13)
#3
@
15 years ago
Is the string not showing up in the pot file? I imagine makepot.php might need updating...
#4
@
15 years ago
#: wp-admin/edit-comments.php:215 msgctxt "comments" msgid "All" msgid_plural "All" msgstr[0] "" msgstr[1] ""
As Sergey noted on wp-polyglots, it is the only place where _nx_noop() is used.
#6
@
15 years ago
- Cc sergeybiryukov.ru@… added
- Keywords has-patch added; needs-patch removed
_nx_noop()
is fine; it just returns an array. I dug deeper and found the problem in edit-comments.php
: this string requires translating with context using _nx()
, however _n()
is used, which doesn't support context.
#8
@
15 years ago
- Keywords has-patch removed
- Milestone changed from 3.0.1 to 3.1
- Resolution fixed deleted
- Status changed from closed to reopened
Sergey is right and his patch is in for 3.0.1.
For 3.1, I would like to make the *_noop()
functions return an associative array, because using these indices is totally incomprehensible.
Along that, we should introduce a translate_nooped_plural()
function to:
- Hide the complexity of the conditional use of
_n()
or_nx()
, depending on the presence of context. - Make localization of the places, where we lazy-translating noop-ed strings.
#10
@
14 years ago
- Keywords needs-patch added
@nbachiyski: Freeze for 3.1 is a few days away. Did you still want to put in an update in this release?
#11
@
14 years ago
- Resolution set to fixed
- Status changed from reopened to closed
(In [16073]) Introduce and use translate_nooped_plural(). Fixes #13996
- _n_noop() and _nx_noop() now return associative arrays for greater clarity
- translate_nooped_plural() takes one such associative array and translates it
- it works on both the result from _n_noop() and from _nx_noop()
- this breaks backwards compatibility, but I doubt any plugin uses it (I will do a global grep to confirm)
- translate_nooped_plural() is applied where applicable
I can confirm it, with German lanugage it's the same.