#13996 closed defect (bug) (fixed)
Dysfunctional i18n function
| Reported by: | xibe | Owned by: | nbachiyski |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | I18N | Version: | 3.0 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
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
@
16 years ago
Is the string not showing up in the pot file? I imagine makepot.php might need updating...
#4
@
16 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
@
16 years ago
- Cc 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
@
16 years ago
- Keywords has-patch removed
- Milestone 3.0.1 → 3.1
- Resolution fixed
- Status closed → 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
@
16 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
@
16 years ago
- Resolution → fixed
- Status reopened → 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I can confirm it, with German lanugage it's the same.