WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#22749 closed defect (bug) (fixed)

String needs plural format

Reported by: catiakitahara Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: major Version: 3.5
Component: I18N Keywords: has-patch commit i18n-change dev-reviewed
Focuses: Cc:

Description

The string "selected" at wp-includes/media.php:1464 needs a plural format.

Attachments (3)

22749.diff (1.2 KB) - added by nacin 7 years ago.
22749.typo.fixed.diff (1.2 KB) - added by westi 7 years ago.
Fixes the typo in the phpdoc.
22749.typo.fixed.2.diff (1.2 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (21)

#1 follow-up: @nacin
7 years ago

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.

#2 in reply to: ↑ 1 @catiakitahara
7 years 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.

#3 @nacin
7 years ago

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".

#4 @nacin
7 years ago

Of course, if we included %d in the string, then translators could optionally go with 'selected: %d' on their own.

#6 @ryan
7 years ago

Easy way out.

#7 @nacin
7 years ago

  • Owner set to nacin
  • Status changed from new to assigned

@nacin
7 years ago

#8 @nacin
7 years ago

  • 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.

#9 @nacin
7 years ago

  • Milestone changed from Awaiting Review to 3.5

@westi
7 years ago

Fixes the typo in the phpdoc.

#10 @westi
7 years ago

  • Keywords dev-reviewed added

Looks good to me, I fixed a typo in the phpdoc though :)

#11 @pavelevap
7 years 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

#12 @SergeyBiryukov
7 years ago

22749.typo.fixed.2.diff fixes one more typo (two Ifs).

#13 @vanillalounge
7 years 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.

#14 follow-up: @kenan3008
7 years 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.

#15 in reply to: ↑ 14 @knutsp
7 years 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.

#16 @nacin
7 years 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.

#17 @knutsp
7 years 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.

#18 @nacin
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 23075:

Media: Use '%d selected' for the selection string, and offer a comment to translators to help them find a workable solution with this would-be plural string. fixes #22749. see #22229.

Note: See TracTickets for help on using tickets.