Changeset 19725 in josm for trunk/src/org
- Timestamp:
- 2026-12-02T11:44:28+01:00 (9 hours ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
-
I18n.java (modified) (3 diffs)
-
LanguageInfo.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r19479 r19725 168 168 private static final String HANS = "hans"; 169 169 private static final String BOPOMOFO = "bopo"; 170 private static final String CYRILLIC = "cyrl"; 170 171 171 172 // Matches ISO-639 two and three letters language codes + scripts 172 173 private static final Pattern LANGUAGE_NAMES = Pattern.compile( 173 174 "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, 174 LATIN, PINYIN, LATINPINYIN, ROMAJI, HANI, HANS, HANT, BOPOMOFO) + ")))?"); 175 LATIN, PINYIN, LATINPINYIN, ROMAJI, HANI, HANS, HANT, BOPOMOFO, CYRILLIC) + ")))?"); 175 176 176 177 private static String format(String text, Object... objects) { … … 755 756 case ROMAJI: 756 757 return /* I18n: a Japanese syllabary (latin script) */ tr("Rōmaji"); 758 case CYRILLIC: 759 return /* I18n: a Cyrillic syllabary */ tr("Cyrillic"); 757 760 default: 758 761 Logging.warn("Unsupported script: {0}", script); … … 773 776 String code = m.group(1); 774 777 String label = new Locale(code).getDisplayLanguage(); 778 // Not yet included in language list (2026-12) 779 if ("cnr".equals(label)) { 780 label = tr("Montenegrin"); 781 } 775 782 boolean knownNameKey = !code.equals(label); 776 783 String script = getLocalizedScript(m.group(2)); -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r19479 r19725 142 142 if (locale == null) return "en"; 143 143 for (String full : getLanguageCodes(locale)) { 144 if ("iw_IL".equals(full)) 145 return "he"; 146 else if ("in".equals(full)) 147 return "id"; 148 else if (I18n.hasCode(full)) // catch all non-single codes 144 if (I18n.hasCode(full)) // catch all non-single codes 149 145 return full; 150 146 }
Note:
See TracChangeset
for help on using the changeset viewer.
