Bug 78197 - The localization of htmlSelectMultipleItems() needs better support of pluralization
Summary: The localization of htmlSelectMultipleItems() needs better support of plurali...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: EasyFix, InRadar
Depends on:
Blocks:
 
Reported: 2012-02-08 19:41 PST by Benjamin Poulain
Modified: 2012-02-09 13:54 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.59 KB, patch)
2012-02-08 19:58 PST, Benjamin Poulain
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2012-02-08 19:41:55 PST
The pluralization of 0 and 1 depends on the language.
Comment 1 Benjamin Poulain 2012-02-08 19:58:08 PST
Created attachment 126228 [details]
Patch
Comment 2 Joseph Pecoraro 2012-02-08 21:22:01 PST
Comment on attachment 126228 [details]
Patch

Can we ASSERT(count > 0) or even better convert its type to be unsigned [and then the localization to be %u]?

Likewise we could change the WEB_UI_STRING description string to be slightly different for 0 items and 1 items.
In the 0 case its a presentation string when there are no selected options, and the 1 is for just 1 selected option,
in a <select multiple>.
Comment 3 Benjamin Poulain 2012-02-08 22:46:23 PST
(In reply to comment #2)
> (From update of attachment 126228 [details])
> Can we ASSERT(count > 0) or even better convert its type to be unsigned [and then the localization to be %u]?

That is a good point, there is really no reason to use an int here. I will make a separate patch for that to avoid messing up our stuff too much.
Comment 4 Alexey Proskuryakov 2012-02-09 10:22:54 PST
It's not just 0 and 1 that are language dependent. For example, 20 and 21 need different noun forms in Russian. I believe that there are lots of other cases like this.

Is there a Radar bug tracking this issue? If there is one, please post its number in a comment, add it to ChangeLog, and add InRadar keyword.
Comment 5 Benjamin Poulain 2012-02-09 13:48:19 PST
Committed r107288: <http://trac.webkit.org/changeset/107288>
Comment 6 Benjamin Poulain 2012-02-09 13:54:24 PST
<rdar://problem/10814922>