Changeset 19276 in josm for trunk/src


Ignore:
Timestamp:
2025-01-01T20:20:34+01:00 (3 weeks ago)
Author:
stoecker
Message:

add Welsh and readd Turkish languages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r19248 r19276  
    5050     * Enumeration of possible plural modes. It allows us to identify and implement logical conditions of
    5151     * plural forms defined on <a href="https://help.launchpad.net/Translations/PluralForms">Launchpad</a>.
    52      * See <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">CLDR</a>
     52     * See <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">CLDR</a>
    5353     * for another complete list.
    5454     * @see #pluralEval
     
    6262        MODE_GREATERONE,
    6363        /* Special mode for
    64          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ar">Arabic</a>.*/
     64         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ar">Arabic</a>.*/
    6565        MODE_AR,
    6666        /** Special mode for
    67          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs">Czech</a>. */
     67         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs">Czech</a>. */
    6868        MODE_CS,
    6969        /** Special mode for
    70          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl">Polish</a>. */
     70         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl">Polish</a>. */
    7171        MODE_PL,
    7272        /* Special mode for
    73          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
     73         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
    7474        MODE_RO,*/
    7575        /** Special mode for
    76          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt">Lithuanian</a>. */
     76         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt">Lithuanian</a>. */
    7777        MODE_LT,
    7878        /** Special mode for
    79          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
     79         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
    8080        MODE_RU,
    8181        /** Special mode for
    82          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sk">Slovak</a>. */
     82         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sk">Slovak</a>. */
     83        MODE_CY,
     84        /** Special mode for
     85         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cy">Welsh</a>. */
    8386        MODE_SK,
    8487        /* Special mode for
    85          * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sl">Slovenian</a>.*
     88         * <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sl">Slovenian</a>.*
    8689        MODE_SL,*/
    8790    }
     
    105108        languages.put("ca@valencia", PluralMode.MODE_NOTONE);
    106109        languages.put("cs", PluralMode.MODE_CS);
     110        languages.put("cy", PluralMode.MODE_CY);
    107111        languages.put("da", PluralMode.MODE_NOTONE);
    108112        languages.put("de", PluralMode.MODE_NOTONE);
     
    139143        languages.put("sr@latin", PluralMode.MODE_RU);
    140144        languages.put("sv", PluralMode.MODE_NOTONE);
    141         //languages.put("tr", PluralMode.MODE_NONE);
     145        languages.put("tr", PluralMode.MODE_NONE);
    142146        languages.put("uk", PluralMode.MODE_RU);
    143147        //languages.put("vi", PluralMode.MODE_NONE);
     
    677681        case MODE_SK:
    678682            return (n == 1) ? 1 : (((n >= 2) && (n <= 4)) ? 2 : 0);
     683        case MODE_CY:
     684            return (n == 1) ? 0 : ((n == 2) ? 1 : (n != 8 && n != 11) ? 2 : 3);
    679685        //case MODE_SL:
    680686        //    return (((n % 100) == 1) ? 1 : (((n % 100) == 2) ? 2 : ((((n % 100) == 3)
Note: See TracChangeset for help on using the changeset viewer.