Merge pull request #1080 from kiwix/improve-custom-lang-mapping

Complete custom language mapping
This commit is contained in:
Kelson 2024-05-12 15:02:58 +02:00 committed by GitHub
commit a0c4118fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -10,10 +10,12 @@ namespace
// These mappings are not provided by the ICU library, any such mappings can be manually added here // These mappings are not provided by the ICU library, any such mappings can be manually added here
std::map<std::string, std::string> iso639_3 = { std::map<std::string, std::string> iso639_3 = {
{"ami", "Amis"},
{"atj", "atikamekw"}, {"atj", "atikamekw"},
{"azb", "آذربایجان دیلی"}, {"azb", "آذربایجان دیلی"},
{"bcl", "central bikol"}, {"bcl", "central bikol"},
{"bgs", "tagabawa"}, {"bgs", "tagabawa"},
{"blk", "ပအိုဝ်ႏ"},
{"bxr", "буряад хэлэн"}, {"bxr", "буряад хэлэн"},
{"cbk", "chavacano"}, {"cbk", "chavacano"},
{"cdo", "閩東語"}, {"cdo", "閩東語"},
@ -23,13 +25,16 @@ std::map<std::string, std::string> iso639_3 = {
{"eml", "emiliân-rumagnōl"}, {"eml", "emiliân-rumagnōl"},
{"fbs", "српскохрватски"}, {"fbs", "српскохрватски"},
{"fon", "fɔ̀ngbè"}, {"fon", "fɔ̀ngbè"},
{"gcr", "Kriyòl gwiyannen"},
{"guw", "Gungbe"}, {"guw", "Gungbe"},
{"hbs", "srpskohrvatski"}, {"hbs", "srpskohrvatski"},
{"hyw", "հայերէն/հայերեն"},
{"ido", "ido"}, {"ido", "ido"},
{"kbp", "kabɩ"}, {"kbp", "kabɩ"},
{"kld", "Gamilaraay"}, {"kld", "Gamilaraay"},
{"lbe", "лакку маз"}, {"lbe", "лакку маз"},
{"lbj", "ལ་དྭགས་སྐད་"}, {"lbj", "ལ་དྭགས་སྐད་"},
{"lld", "ladin"},
{"map", "Austronesian"}, {"map", "Austronesian"},
{"mhr", "марий йылме"}, {"mhr", "марий йылме"},
{"mnw", "ဘာသာမန်"}, {"mnw", "ဘာသာမန်"},
@ -41,10 +46,15 @@ std::map<std::string, std::string> iso639_3 = {
{"olo", "livvi"}, {"olo", "livvi"},
{"pih", "Pitcairn-Norfolk"}, {"pih", "Pitcairn-Norfolk"},
{"pnb", "Western Panjabi"}, {"pnb", "Western Panjabi"},
{"pwn", "Pinayuanan"},
{"rmr", "Caló"}, {"rmr", "Caló"},
{"rmy", "romani shib"}, {"rmy", "romani shib"},
{"roa", "romance languages"}, {"roa", "romance languages"},
{"twi", "twi"}, {"skr", "سرائیکی"},
{"szy", "Sakizaya"},
{"tay", "Tayal"},
{"tgl", "Wikang Tagalog"},
{"twi", "Akwapem Twi"},
// ICU for Ubuntu versions <= focal (20.04) returns "" for the language code "" // ICU for Ubuntu versions <= focal (20.04) returns "" for the language code ""
// unlike the later versions - which returns "und". We map this value to "Undetermined" for a common ground. // unlike the later versions - which returns "und". We map this value to "Undetermined" for a common ground.
{"", "Undetermined"}, {"", "Undetermined"},