Changeset 14811 in josm
- Timestamp:
- 2019-02-24T23:42:39+01:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r14695 r14811 105 105 languages.put("el", PluralMode.MODE_NOTONE); 106 106 languages.put("en_AU", PluralMode.MODE_NOTONE); 107 languages.put("en_CA", PluralMode.MODE_NOTONE); 107 108 languages.put("en_GB", PluralMode.MODE_NOTONE); 108 109 languages.put("es", PluralMode.MODE_NOTONE); … … 608 609 private static int pluralEval(long n) { 609 610 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 */ 611 612 return (n != 1) ? 1 : 0; 612 613 case MODE_NONE: /* id, vi, ja, km, tr, zh_CN, zh_TW */ -
trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java
r14708 r14811 27 27 public JOSMTestRules test = new JOSMTestRules().i18n("ca@valencia"); 28 28 29 private static final Locale EN_ CA = Locale.CANADA;29 private static final Locale EN_NZ = new Locale("en", "NZ"); 30 30 private static final Locale DE_DE = Locale.GERMANY; 31 31 private static final Locale PT_BR = new Locale("pt", "BR"); … … 33 33 private static final Locale ZN_CN = Locale.SIMPLIFIED_CHINESE; 34 34 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; 36 36 private static final Locale RU = new Locale("ru"); 37 37 private static final Locale NB = new Locale("nb"); … … 56 56 57 57 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) 59 59 .map(locale -> LanguageInfo.getWikiLanguagePrefix(locale, type)) 60 60 .collect(Collectors.toList());
Note:
See TracChangeset
for help on using the changeset viewer.