⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 107288 in webkit


Ignore:
Timestamp:
Feb 9, 2012, 1:47:58 PM (15 years ago)
Author:
benjamin@webkit.org
Message:

The localization of htmlSelectMultipleItems() needs better support of pluralization
https://bugs.webkit.org/show_bug.cgi?id=78197

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-02-09
Reviewed by Joseph Pecoraro.

For translation, the localization of 0 and 1 depends on the language.

  • English.lproj/Localizable.strings:
  • platform/DefaultLocalizationStrategy.cpp:

(WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107285 r107288  
     12012-02-09  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        The localization of htmlSelectMultipleItems() needs better support of pluralization
     4        https://bugs.webkit.org/show_bug.cgi?id=78197
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        For translation, the localization of 0 and 1 depends on the language.
     9
     10        * English.lproj/Localizable.strings:
     11        * platform/DefaultLocalizationStrategy.cpp:
     12        (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
     13
    1142012-02-09  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebCore/English.lproj/Localizable.strings

    r99083 r107288  
    2626"%d files" = "%d files";
    2727
     28/* Present the element <select multiple> when no <option> items are selected (iOS only) */
     29"0 Items" = "0 Items";
     30
     31/* Present the element <select multiple> when a single <option> is selected (iOS only) */
     32"1 Item" = "1 Item";
     33
     34/* Present the number of selected <option> items in a <select multiple> element (iOS only) */
     35"%d Items" = "%d Items";
     36
    2837/* Menu item title for KEYGEN pop-up menu */
    2938"1024 (Medium Grade)" = "1024 (Medium Grade)";
  • trunk/Source/WebCore/platform/DefaultLocalizationStrategy.cpp

    r102086 r107288  
    771771String DefaultLocalizationStrategy::htmlSelectMultipleItems(int count)
    772772{
    773     return formatLocalizedString(WEB_UI_STRING("%d Items", "Present the number of selected <option> items in a <select multiple> element (iOS only)"), count);
     773    switch (count) {
     774    case 0:
     775        return WEB_UI_STRING("0 Items", "Present the element <select multiple> when no <option> items are selected (iOS only)");
     776    case 1:
     777        return WEB_UI_STRING("1 Item", "Present the element <select multiple> when a single <option> is selected (iOS only)");
     778    default:
     779        return formatLocalizedString(WEB_UI_STRING("%d Items", "Present the number of selected <option> items in a <select multiple> element (iOS only)"), count);
     780    }
    774781}
    775782#endif // PLATFORM(IOS)
Note: See TracChangeset for help on using the changeset viewer.