Update language data for Sinitic languages

Bug: #10488
Change-Id: I0ca3cd8b2a82a7edeff70b4be7678e0699214ccc
This commit is contained in:
Winston Sung
2024-10-09 20:54:55 +08:00
committed by Minh Nguyễn
parent 72643ba10b
commit 4dcb7f2f51
2 changed files with 177 additions and 28 deletions
+149 -20
View File
@@ -2,7 +2,14 @@
const fs = require('fs');
const cldrMainDir = 'node_modules/cldr-localenames-full/main/';
const rematchCodes = { 'ar-AA': 'ar', 'zh-CN': 'zh', 'zh-HK': 'zh-Hant-HK', 'zh-TW': 'zh-Hant', 'pt-BR': 'pt', 'pt': 'pt-PT' };
const rematchCodes = {
'ar-AA': 'ar',
'pt-BR': 'pt',
'pt': 'pt-PT',
'zh-CN': 'zh',
'zh-TW': 'zh-Hant',
'zh-HK': 'zh-Hant-HK'
};
const codesToSkip = ['ase', 'mis', 'mul', 'und', 'zxx'];
@@ -12,25 +19,6 @@ function getLangNamesInNativeLang() {
// manually add languages we want that aren't in CLDR
// see for example https://github.com/openstreetmap/iD/pull/9241/
let unordered = {
'oc': {
nativeName: 'Occitan'
},
'ja-Hira': {
base: 'ja',
script: 'Hira'
},
'ja-Latn': {
base: 'ja',
script: 'Latn'
},
'ko-Latn': {
base: 'ko',
script: 'Latn'
},
'zh_pinyin': {
base: 'zh',
script: 'Latn'
},
'bft': {
nativeName: 'بلتی'
},
@@ -40,9 +28,122 @@ function getLangNamesInNativeLang() {
'brh': {
nativeName: 'براہوئی'
},
'cdo': {
nativeName: '閩東語'
},
'cdo-Hans': {
base: 'cdo',
script: 'Hans',
nativeName: '闽东语(简化汉字)'
},
'cdo-Hant': {
base: 'cdo',
script: 'Hant',
nativeName: '閩東語(傳統漢字)'
},
'cdo-Latn': {
base: 'cdo',
script: 'Latn',
nativeName: 'Mìng-dĕ̤ng-ngṳ̄ (Bàng-uâ-cê)'
},
'cpx': {
nativeName: '莆仙語'
},
'cpx-Hans': {
base: 'cpx',
script: 'Hans',
nativeName: '莆仙语(简体)'
},
'cpx-Hant': {
base: 'cpx',
script: 'Hant',
nativeName: '莆仙語(繁體)'
},
'cpx-Latn': {
base: 'cpx',
script: 'Latn',
nativeName: 'Pó-sing-gṳ̂ (Báⁿ-uā-ci̍)'
},
'gan': {
nativeName: '贛語'
},
'gan-Hans': {
base: 'gan',
script: 'Hans',
nativeName: '赣语(简体)'
},
'gan-Hant': {
base: 'gan',
script: 'Hant',
nativeName: '贛語(繁體)'
},
'hak': {
nativeName: '客家語'
},
'hak-Hans': {
base: 'hak',
script: 'Hans',
nativeName: '客家语(简体)'
},
'hak-Hant': {
base: 'hak',
script: 'Hant',
nativeName: '客家語(繁體)'
},
'hak-Latn': {
base: 'hak',
script: 'Latn',
nativeName: 'Hak-kâ-ngî (Pha̍k-fa-sṳ)'
},
'hsn': {
nativeName: '湘語'
},
'ja-Hira': {
base: 'ja',
script: 'Hira'
},
'ja-Latn': {
base: 'ja',
script: 'Latn'
},
'kls': {
nativeName: 'Kal\'as\'amondr'
},
'ko-Latn': {
base: 'ko',
script: 'Latn'
},
'mnc-Latn': {
base: 'mnc',
script: 'Latn',
nativeName: 'manju gisun'
},
'mnc-Mong': {
base: 'mnc',
script: 'Mong',
nativeName: 'ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ'
},
'nan': {
nativeName: '閩南語'
},
'nan-Hant': {
base: 'nan',
script: 'Hant',
nativeName: '閩南語(傳統漢字)'
},
'nan-Latn-pehoeji': {
base: 'nan',
script: 'Latn',
nativeName: 'Bân-lâm-gú (Pe̍h-ōe-jī)'
},
'nan-Latn-tailo': {
base: 'nan',
script: 'Latn',
nativeName: 'Bân-lâm-gú (Tâi-lô)'
},
'oc': {
nativeName: 'Occitan'
},
'pnb': {
nativeName: 'پنجابی'
},
@@ -60,6 +161,34 @@ function getLangNamesInNativeLang() {
},
'wbl': {
nativeName: 'وخی'
},
'wuu': {
nativeName: '吳語'
},
'wuu-Hans': {
base: 'wuu',
script: 'Hans',
nativeName: '吴语(简体)'
},
'wuu-Hant': {
base: 'wuu',
script: 'Hant',
nativeName: '吳語(正體)'
},
'yue-Hans': {
base: 'yue',
script: 'Hans',
nativeName: '粵语(简体)'
},
'yue-Hant': {
base: 'yue',
script: 'Hant',
nativeName: '粵語(繁體)'
},
'zh-Latn-pinyin': {
base: 'zh',
script: 'Latn',
nativeName: 'Zhōngwén (Hànyǔ Pīnyīn)'
}
};