diff --git a/src/org/openstreetmap/josm/tools/I18n.java b/src/org/openstreetmap/josm/tools/I18n.java index 4d55e65b41..94150272e1 100644 --- a/src/org/openstreetmap/josm/tools/I18n.java +++ b/src/org/openstreetmap/josm/tools/I18n.java @@ -149,11 +149,15 @@ private enum PluralMode { private static final String KATAKANA = "kana"; private static final String LATIN = "latn"; private static final String PINYIN = "pinyin"; + private static final String LATINPINYIN = "latn-pinyin"; private static final String ROMAJI = "rm"; + private static final String HANI = "hani"; + private static final String HANT = "hant"; + private static final String HANS = "hans"; // Matches ISO-639 two and three letters language codes + scripts private static final Pattern LANGUAGE_NAMES = Pattern.compile( - "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, LATIN, PINYIN, ROMAJI) + ")))?"); + "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, LATIN, PINYIN, LATINPINYIN, ROMAJI, HANI, HANS, HANT) + ")))?"); private static String format(String text, Object... objects) { if (objects.length == 0 && !text.contains("'")) { @@ -720,8 +724,14 @@ public static String getLocalizedScript(String script) { return /* I18n: a Japanese syllabary */ tr("Katakana"); case LATIN: return /* I18n: usage of latin letters/script for usually non-latin languages */ tr("Latin"); - case PINYIN: + case PINYIN: case LATINPINYIN: return /* I18n: official romanization system for Standard Chinese */ tr("Pinyin"); + case HANI: + return /* I18n: Han characters for Vietnamese or Korean language */ tr("Hani"); + case HANS: + return /* I18n: Simplified Chinese */ tr("Simplied"); + case HANT: + return /* I18n: Traditional Chinese */ tr("Trdaditional"); case ROMAJI: return /* I18n: a Japanese syllabary (latin script) */ tr("Rōmaji"); default: