add indigenous languages not in CLDR (#10684)

This commit is contained in:
Kyℓe Hensel
2025-01-23 01:19:23 +11:00
committed by GitHub
parent 3011acc23c
commit e123ec99a8
5 changed files with 71 additions and 3 deletions

View File

@@ -186,6 +186,12 @@ function generateTerritoryLanguages() {
// override/adjust some territory languages which are not included in CLDR data
territoryLanguages.pk.push('pnb', 'scl', 'trw', 'kls'); // https://github.com/openstreetmap/iD/pull/9242
lodash.pull(territoryLanguages.pk, 'pa-Arab', 'lah', 'tg-Arab'); // - " -
territoryLanguages.au = [
'en', 'aus', 'aer', 'aoi', 'bdy', 'coa', 'dgw', 'gjm', 'gjr', 'gup',
'jay', 'mwf', 'mwp', 'nys', 'pih', 'piu', 'pjt', 'rop', 'tcs', 'tiw',
'ulk', 'wbp', 'wrh', 'wth', 'wyi', 'xdk', 'xni', 'xph', 'xrd', 'zku'
]; // https://github.com/openstreetmap/iD/pull/10684
territoryLanguages.nz.push('rrm'); // https://github.com/openstreetmap/iD/pull/10684
return territoryLanguages;
}

View File

@@ -19,6 +19,10 @@ function getLangNamesInNativeLang() {
// manually add languages we want that aren't in CLDR
// see for example https://github.com/openstreetmap/iD/pull/9241/
let unordered = {
aer: { nativeName: 'Arrernte' },
aoi: { nativeName: 'Anindilyakwa' },
aus: { nativeName: 'Australian Aboriginal Languages' },
bdy: { nativeName: 'YugambehBandjalangic' },
'bft': {
nativeName: 'بلتی'
},
@@ -28,6 +32,7 @@ function getLangNamesInNativeLang() {
'brh': {
nativeName: 'براہوئی'
},
coa: { nativeName: 'Basa Pulu Kokos' },
'cdo': {
nativeName: '閩東語'
},
@@ -64,6 +69,7 @@ function getLangNamesInNativeLang() {
script: 'Latn',
nativeName: 'Pó-sing-gṳ̂ (Báⁿ-uā-ci̍)'
},
dgw: { nativeName: 'Daungwurrung' },
'gan': {
nativeName: '贛語'
},
@@ -77,6 +83,9 @@ function getLangNamesInNativeLang() {
script: 'Hant',
nativeName: '贛語(繁體)'
},
gjm: { nativeName: 'Gunditjmara' },
gjr: { nativeName: 'Gurindji Kriol' },
gup: { nativeName: 'Bininj Gun-Wok' },
'hak': {
nativeName: '客家語'
},
@@ -106,6 +115,7 @@ function getLangNamesInNativeLang() {
base: 'ja',
script: 'Latn'
},
jay: { nativeName: 'Yan-nhaŋu' },
'kls': {
nativeName: 'Kal\'as\'amondr'
},
@@ -123,6 +133,8 @@ function getLangNamesInNativeLang() {
script: 'Mong',
nativeName: 'ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ'
},
mwf: { nativeName: 'Murrinh-Patha' },
mwp: { nativeName: 'Kalaw Lagaw Ya' },
'nan': {
nativeName: '閩南語'
},
@@ -141,12 +153,18 @@ function getLangNamesInNativeLang() {
script: 'Latn',
nativeName: 'Bân-lâm-gú (Tâi-lô)'
},
nys: { nativeName: 'Nyungar' },
'oc': {
nativeName: 'Occitan'
},
pih: { nativeName: 'PitkernNorfuk' },
piu: { nativeName: 'Pintupi' },
pjt: { nativeName: 'Pitjantjatjara' },
'pnb': {
nativeName: 'پنجابی'
},
rop: { nativeName: 'Australian Kriol' },
rrm: { nativeName: 'Moriori' },
'scl': {
nativeName: 'ݜݨیاٗ'
},
@@ -156,12 +174,16 @@ function getLangNamesInNativeLang() {
'skr': {
nativeName: 'سرائیکی'
},
tcs: { nativeName: 'Yumplatok' },
tiw: { nativeName: 'Tiwi' },
'trw': {
nativeName: 'توروالی'
},
ulk: { nativeName: 'Meriam Mir' },
'wbl': {
nativeName: 'وخی'
},
wlp: { nativeName: 'Warlpiri' },
'wuu': {
nativeName: '吳語'
},
@@ -175,6 +197,13 @@ function getLangNamesInNativeLang() {
script: 'Hant',
nativeName: '吳語(正體)'
},
wrh: { nativeName: 'Wiradjuri' },
wth: { nativeName: 'Wathawurrung' },
wyi: { nativeName: 'Woiwurrung' },
xdk: { nativeName: 'Dharug' },
xni: { nativeName: 'Ngarigo' },
xph: { nativeName: 'Tyerrernotepanner' },
xrd: { nativeName: 'Gundungurra' },
'yue-Hans': {
base: 'yue',
script: 'Hans',
@@ -189,7 +218,8 @@ function getLangNamesInNativeLang() {
base: 'zh',
script: 'Latn',
nativeName: 'Zhōngwén (Hànyǔ Pīnyīn)'
}
},
zku: { nativeName: 'Kaurna' },
};
let langDirectoryPaths = fs.readdirSync(cldrMainDir);