Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update language data for Sinitic languages #10488

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions data/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
"cay": {},
"cch": {"nativeName": "Atsam"},
"ccp": {"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ê)"},
"ce": {"nativeName": "нохчийн"},
"ceb": {"nativeName": "Cebuano"},
"cgg": {"nativeName": "Rukiga"},
Expand All @@ -120,6 +124,10 @@
"co": {"nativeName": "corsu"},
"cop": {},
"cps": {},
"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̍)"},
"cr": {},
"crg": {},
"crh": {},
Expand Down Expand Up @@ -199,7 +207,9 @@
"ga": {"nativeName": "Gaeilge"},
"gaa": {"nativeName": "Gã"},
"gag": {},
"gan": {},
"gan": {"nativeName": "贛語"},
"gan-Hans": {"base": "gan", "script": "Hans", "nativeName": "赣语(简体)"},
"gan-Hant": {"base": "gan", "script": "Hant", "nativeName": "贛語(繁體)"},
"gay": {},
"gba": {},
"gbz": {},
Expand All @@ -226,7 +236,10 @@
"gwi": {},
"ha": {"nativeName": "Hausa"},
"hai": {},
"hak": {},
"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ṳ)"},
"haw": {"nativeName": "ʻŌlelo Hawaiʻi"},
"hax": {},
"hdn": {},
Expand All @@ -242,7 +255,7 @@
"ho": {},
"hr": {"nativeName": "hrvatski"},
"hsb": {"nativeName": "hornjoserbšćina"},
"hsn": {},
"hsn": {"nativeName": "湘語"},
"ht": {},
"hu": {"nativeName": "magyar"},
"hup": {},
Expand Down Expand Up @@ -397,6 +410,8 @@
"ml": {"nativeName": "മലയാളം"},
"mn": {"nativeName": "монгол"},
"mnc": {},
"mnc-Latn": {"base": "mnc", "script": "Latn", "nativeName": "manju gisun"},
"mnc-Mong": {"base": "mnc", "script": "Mong", "nativeName": "ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ"},
"mni": {"nativeName": "মৈতৈলোন্"},
"mni-Beng": {"base": "mni", "script": "Beng"},
"mni-Mtei": {"base": "mni", "script": "Mtei"},
Expand All @@ -417,7 +432,10 @@
"myv": {"nativeName": "эрзянь кель"},
"mzn": {"nativeName": "مازرونی"},
"na": {},
"nan": {},
"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ô)"},
"nap": {},
"naq": {"nativeName": "Khoekhoegowab"},
"nb": {"nativeName": "norsk bokmål"},
Expand Down Expand Up @@ -661,7 +679,9 @@
"wbl": {"nativeName": "وخی"},
"wbp": {"nativeName": "Warlpiri"},
"wo": {"nativeName": "Wolof"},
"wuu": {},
"wuu": {"nativeName": "吳語"},
"wuu-Hans": {"base": "wuu", "script": "Hans", "nativeName": "吴语(简体)"},
"wuu-Hant": {"base": "wuu", "script": "Hant", "nativeName": "吳語(正體)"},
"xal": {},
"xh": {"nativeName": "IsiXhosa"},
"xmf": {},
Expand All @@ -675,8 +695,8 @@
"yo": {"nativeName": "Èdè Yorùbá"},
"yrl": {"nativeName": "nheẽgatu"},
"yue": {"nativeName": "粵語"},
"yue-Hans": {"base": "yue", "script": "Hans"},
"yue-Hant": {"base": "yue", "script": "Hant"},
"yue-Hans": {"base": "yue", "script": "Hans", "nativeName": "粵语(简体)"},
"yue-Hant": {"base": "yue", "script": "Hant", "nativeName": "粵語(繁體)"},
"za": {"nativeName": "Vahcuengh"},
"zap": {},
"zbl": {},
Expand All @@ -686,7 +706,7 @@
"zh": {"nativeName": "中文"},
"zh-Hans": {"base": "zh", "script": "Hans", "nativeName": "简体中文"},
"zh-Hant": {"base": "zh", "script": "Hant", "nativeName": "繁體中文"},
"zh_pinyin": {"base": "zh", "script": "Latn"},
"zh-Latn-pinyin": {"base": "zh", "script": "Latn", "nativeName": "Zhōngwén (Hànyǔ Pīnyīn)"},
"zu": {"nativeName": "isiZulu"},
"zun": {},
"zza": {}
Expand Down
157 changes: 143 additions & 14 deletions scripts/language_names.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand All @@ -12,8 +19,84 @@ 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'
'bft': {
nativeName: 'بلتی'
},
'bha': {
nativeName: 'भरीयाटी'
},
'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',
Expand All @@ -23,25 +106,43 @@ function getLangNamesInNativeLang() {
base: 'ja',
script: 'Latn'
},
'kls': {
nativeName: 'Kal\'as\'amondr'
},
'ko-Latn': {
base: 'ko',
script: 'Latn'
},
'zh_pinyin': {
base: 'zh',
script: 'Latn'
'mnc-Latn': {
base: 'mnc',
script: 'Latn',
nativeName: 'manju gisun'
},
'bft': {
nativeName: 'بلتی'
'mnc-Mong': {
base: 'mnc',
script: 'Mong',
nativeName: 'ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ'
},
'bha': {
nativeName: 'भरीयाटी'
'nan': {
nativeName: '閩南語'
},
'brh': {
nativeName: 'براہوئی'
'nan-Hant': {
base: 'nan',
script: 'Hant',
nativeName: '閩南語(傳統漢字)'
},
'kls': {
nativeName: 'Kal\'as\'amondr'
'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: 'پنجابی'
Expand All @@ -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)'
}
};

Expand Down
Loading