Changeset 14811 in josm


Ignore:
Timestamp:
2019-02-24T23:42:39+01:00 (6 years ago)
Author:
Don-vip
Message:

see #17380 - enable en_CA

Location:
trunk
Files:
2 edited

Legend:

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

    r14695 r14811  
    105105        languages.put("el", PluralMode.MODE_NOTONE);
    106106        languages.put("en_AU", PluralMode.MODE_NOTONE);
     107        languages.put("en_CA", PluralMode.MODE_NOTONE);
    107108        languages.put("en_GB", PluralMode.MODE_NOTONE);
    108109        languages.put("es", PluralMode.MODE_NOTONE);
     
    608609    private static int pluralEval(long n) {
    609610        switch(pluralMode) {
    610         case MODE_NOTONE: /* bg, da, de, el, en, en_GB, es, et, eu, fi, gl, is, it, iw_IL, nb, nl, sv */
     611        case MODE_NOTONE: /* bg, da, de, el, en, en_AU, en_CA, en_GB, es, et, eu, fi, gl, is, it, iw_IL, nb, nl, sv */
    611612            return (n != 1) ? 1 : 0;
    612613        case MODE_NONE: /* id, vi, ja, km, tr, zh_CN, zh_TW */
  • trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java

    r14708 r14811  
    2727    public JOSMTestRules test = new JOSMTestRules().i18n("ca@valencia");
    2828
    29     private static final Locale EN_CA = Locale.CANADA;
     29    private static final Locale EN_NZ = new Locale("en", "NZ");
    3030    private static final Locale DE_DE = Locale.GERMANY;
    3131    private static final Locale PT_BR = new Locale("pt", "BR");
     
    3333    private static final Locale ZN_CN = Locale.SIMPLIFIED_CHINESE;
    3434    private static final Locale ZN_TW = Locale.TRADITIONAL_CHINESE;
    35     private static final Locale EN_GB = new Locale("en", "GB");
     35    private static final Locale EN_GB = Locale.UK;
    3636    private static final Locale RU = new Locale("ru");
    3737    private static final Locale NB = new Locale("nb");
     
    5656
    5757    private static void testGetWikiLanguagePrefixes(LanguageInfo.LocaleType type, String...expected) {
    58         final List<String> actual = Stream.of(EN_CA, DE_DE, PT_BR, CA_ES_VALENCIA, ZN_CN, ZN_TW, AST, EN_GB, RU, NB)
     58        final List<String> actual = Stream.of(EN_NZ, DE_DE, PT_BR, CA_ES_VALENCIA, ZN_CN, ZN_TW, AST, EN_GB, RU, NB)
    5959                .map(locale -> LanguageInfo.getWikiLanguagePrefix(locale, type))
    6060                .collect(Collectors.toList());
Note: See TracChangeset for help on using the changeset viewer.