- Timestamp:
- 2019-01-07T17:46:17+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r14406 r14660 92 92 private static Locale originalLocale = Locale.getDefault(); 93 93 private static Map<String, PluralMode> languages = new HashMap<>(); 94 // NOTE: check also WikiLanguage handling in LanguageInfo.java when adding new languages 94 95 static { 95 96 //languages.put("ar", PluralMode.MODE_AR); -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r14647 r14660 55 55 } else if (type == LocaleType.OSM_WIKI && Locale.TRADITIONAL_CHINESE.equals(locale)) { 56 56 return "Zh-hant:"; 57 } else if (type == LocaleType.OSM_WIKI) {58 return locale.getLanguage() + ':';59 57 } 60 58 61 59 String code = getJOSMLocaleCode(locale); 60 61 if (type == LocaleType.OSM_WIKI) { 62 if (code.matches("[^_@]+[_@][^_]+")) { 63 code = code.substring(0, 2); 64 if ("en".equals(code)) 65 return ""; 66 } 67 if (code.equals("nb")) { /* OSM-Wiki has "no", but no "nb" */ 68 return "No:"; 69 } 70 else if (code.equals("de") || code.equals("es") || code.equals("fr") || 71 code.equals("it") || code.equals("nl") || code.equals("ru") 72 || code.equals("ja")) { 73 return code.toUpperCase(Locale.ENGLISH) + ":"; 74 } else { 75 return code.substring(0, 1).toUpperCase(Locale.ENGLISH) 76 + code.substring(1) + ":"; 77 } 78 } 79 62 80 if (type == LocaleType.BASELANGUAGE) { 63 81 if (code.matches("[^_]+_[^_]+")) {
Note:
See TracChangeset
for help on using the changeset viewer.