From 7395f7302e47f1ffae0ea9bce90eb0aa0939e0e5 Mon Sep 17 00:00:00 2001 From: stoecker Date: Sat, 12 Oct 2024 19:52:05 +0000 Subject: [PATCH] forgot Bopo, see #23964 git-svn-id: https://josm.openstreetmap.de/svn/trunk@19241 0c6e7542-c601-0410-84e7-c038aed88b3b --- src/org/openstreetmap/josm/tools/I18n.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/openstreetmap/josm/tools/I18n.java b/src/org/openstreetmap/josm/tools/I18n.java index 94150272e1..aa6a8a5652 100644 --- a/src/org/openstreetmap/josm/tools/I18n.java +++ b/src/org/openstreetmap/josm/tools/I18n.java @@ -154,10 +154,11 @@ private enum PluralMode { private static final String HANI = "hani"; private static final String HANT = "hant"; private static final String HANS = "hans"; + private static final String BOPOMOFO = "bopo"; // 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, LATINPINYIN, ROMAJI, HANI, HANS, HANT) + ")))?"); + "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, LATIN, PINYIN, LATINPINYIN, ROMAJI, HANI, HANS, HANT, BOPOMOFO) + ")))?"); private static String format(String text, Object... objects) { if (objects.length == 0 && !text.contains("'")) { @@ -732,6 +733,8 @@ public static String getLocalizedScript(String script) { return /* I18n: Simplified Chinese */ tr("Simplied"); case HANT: return /* I18n: Traditional Chinese */ tr("Trdaditional"); + case BOPOMOFO: + return /* I18n: Mandarin Phonetic Symbols/Zhuyin */ tr("Bopomofo"); case ROMAJI: return /* I18n: a Japanese syllabary (latin script) */ tr("Rōmaji"); default: