Changeset 8160 in josm for trunk


Ignore:
Timestamp:
2015-03-31T12:03:11+02:00 (5 years ago)
Author:
stoecker
Message:

add Lithuanian language - fix #11282

Location:
trunk
Files:
1 added
6 edited

Legend:

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

    r8126 r8160  
    6565         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
    6666        MODE_RO,*/
     67        /** Special mode for
     68         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#lt">Lithuanian</a>. */
     69        MODE_LT,
    6770        /** Special mode for
    6871         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
     
    417420        // fully supported only with Java 8 and later (needs CLDR)
    418421        languages.put("km", PluralMode.MODE_NONE);
     422        languages.put("lt", PluralMode.MODE_LT);
    419423        //languages.put("nb", PluralMode.MODE_NOTONE);
    420424        languages.put("nl", PluralMode.MODE_NOTONE);
     
    706710        //case MODE_RO:
    707711        //    return ((n == 1) ? 0 : ((((n % 100) > 19) || (((n % 100) == 0) && (n != 0))) ? 2 : 1));
     712        case MODE_LT:
     713            return (((n % 10) == 1) && ((n % 100) != 11) ? 0 : (((n % 10) >= 2)
     714                    && (((n % 100) < 10) || ((n % 100) >= 20)) ? 1 : 2));
    708715        case MODE_RU:
    709716            return ((((n % 10) == 1) && ((n % 100) != 11)) ? 0 : (((((n % 10) >= 2)
Note: See TracChangeset for help on using the changeset viewer.