Changeset 19240 in josm


Ignore:
Timestamp:
2024-10-12T21:49:01+02:00 (6 weeks ago)
Author:
stoecker
Message:

add some more script variants, fix #23964

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r19050 r19240  
    150150    private static final String LATIN = "latn";
    151151    private static final String PINYIN = "pinyin";
     152    private static final String LATINPINYIN = "latn-pinyin";
    152153    private static final String ROMAJI = "rm";
     154    private static final String HANI = "hani";
     155    private static final String HANT = "hant";
     156    private static final String HANS = "hans";
    153157
    154158    // Matches ISO-639 two and three letters language codes + scripts
    155159    private static final Pattern LANGUAGE_NAMES = Pattern.compile(
    156             "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, LATIN, PINYIN, ROMAJI) + ")))?");
     160            "name:(\\p{Lower}{2,3})(?:[-_](?i:(" + String.join("|", HIRAGANA, KATAKANA, LATIN, PINYIN, LATINPINYIN, ROMAJI, HANI, HANS, HANT) + ")))?");
    157161
    158162    private static String format(String text, Object... objects) {
     
    721725                case LATIN:
    722726                    return /* I18n: usage of latin letters/script for usually non-latin languages */ tr("Latin");
    723                 case PINYIN:
     727                case PINYIN: case LATINPINYIN:
    724728                    return /* I18n: official romanization system for Standard Chinese */ tr("Pinyin");
     729                case HANI:
     730                    return /* I18n: Han characters for Vietnamese or Korean language */ tr("Hani");
     731                case HANS:
     732                    return /* I18n: Simplified Chinese */ tr("Simplied");
     733                case HANT:
     734                    return /* I18n: Traditional Chinese */ tr("Trdaditional");
    725735                case ROMAJI:
    726736                    return /* I18n: a Japanese syllabary (latin script) */  tr("Rōmaji");
Note: See TracChangeset for help on using the changeset viewer.