Opened 6 months ago
Closed 6 months ago
#22749 closed defect (bug) (fixed)
String needs plural format
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | I18N | Version: | 3.5 |
| Severity: | major | Keywords: | has-patch commit i18n-change dev-reviewed |
| Cc: | vanillalounge |
Description
The string "selected" at wp-includes/media.php:1464 needs a plural format.
Attachments (3)
Change History (21)
comment:2
in reply to:
↑ 1
catiakitahara — 6 months ago
Replying to nacin:
Best we can do is do '%d selected' and let you swap the order if your language does that.
That wouldn't help for Portuguese, don't know about other languages.
Since we have only one string, we may be able to just hack in a quick JS function (with some code from #22229.
Easy way out: we go to "selected: %d".
Of course, if we included %d in the string, then translators could optionally go with 'selected: %d' on their own.
- Keywords has-patch commit i18n-change added; needs-patch removed
This is ready to go. Want to wait to commit until Zé looks over the translators comment.
comment:10
westi — 6 months ago
- Keywords dev-reviewed added
Looks good to me, I fixed a typo in the phpdoc though :)
comment:11
pavelevap — 6 months ago
Awesome, I did not hope that this can happen in 3.5: http://core.trac.wordpress.org/ticket/22229#comment:17
"%d selected" is much better for many languages.
There is another case where we have to use this "pseudo-plural" form for comments number: #13651
SergeyBiryukov — 6 months ago
comment:12
SergeyBiryukov — 6 months ago
22749.typo.fixed.2.diff fixes one more typo (two Ifs).
comment:13
vanillalounge — 6 months ago
"%d selected" if we must, it's the least incorrect of the solutions. Post 3.5: this ticket either needs to stay open or we need a new one.
comment:14
follow-up:
↓ 15
kenan3008 — 6 months ago
Is this going to be commited for 3.5? I'm having the same issue in Bosnian. "%d selected" is a good workaround for my language too.
comment:15
in reply to:
↑ 14
knutsp — 6 months ago
Replying to kenan3008:
Is this going to be commited for 3.5? I'm having the same issue in Bosnian.
When this milestone is set by a lead developer (nacin), then to commit for that is the intention, I beleive.
In my language, Norwegian, we also need singular/plural forms for "selected" in this case, but "selected: %d" doesn't help.
In English, adjectives, like "selected" becomes this usage, do not have separate singular and plural forms, but in many other languages they do. Like in Norwegian:
"1 valgt", but "2 valgte"
On the other hand, if you say "% images are selected", then "selected" becomes a verb in preterite. In Norwegian, at least, verbs does not have different singular/plural forms.
comment:16
nacin — 6 months ago
Is there something else you can do with Norwegian? Even if you just translate the string to "%d" and let the numbers sit there by themselves. If the translation for "% items are selected" (it is not strictly images) is short, you can always use that.
comment:17
knutsp — 6 months ago
Yes, can do a rewrite to get a verb out of it instead, at least in this case. Hope it fits the space without annoying line breaks.
comment:18
nacin — 6 months ago
- Resolution set to fixed
- Status changed from assigned to closed
In 23075:

We're not going to be able to do this for 3.5, as it requires #22229.
Best we can do is do '%d selected' and let you swap the order if your language does that.