Skip to content

Edit language list, remove dialect specificity #848

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

Merged
merged 2 commits into from
Mar 11, 2025
Merged
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
89 changes: 46 additions & 43 deletions src/constants/languages.js
Original file line number Diff line number Diff line change
@@ -1,103 +1,106 @@
/*
Language List: used as source for langage search, and for code-to-name lookup.
Language codes are limited to primary two-character tags, except for Chinese
(two separate region subtags) and limited cases including script subtags.
Language codes can appear multiple times with different names to support
flexible name search.
*/
const languages = [
{ value: 'af', label: 'Afrikaans' },
{ value: 'sq', label: 'Albanian' },
{ value: 'gsw-fr', label: 'Alsatian (France)' },
{ value: 'am-et', label: 'Amharic (Ethiopia)' },
{ value: 'gsw', label: 'Alsatian' },
{ value: 'am', label: 'Amharic' },
{ value: 'ar', label: 'Arabic' },
{ value: 'hy', label: 'Armenian' },
{ value: 'as-in', label: 'Assamese (India)' },
{ value: 'as', label: 'Assamese' },
{ value: 'az', label: 'Azeri' },
{ value: 'ba-ru', label: 'Bashkir (Russia)' },
{ value: 'ba', label: 'Bashkir' },
{ value: 'eu', label: 'Basque' },
{ value: 'be', label: 'Belarusian' },
{ value: 'bn', label: 'Bengali' },
{ value: 'bn-bd', label: 'Bengali (Bangladesh)' },
{ value: 'bn-in', label: 'Bengali (India)' },
{ value: 'bs', label: 'Bosnian' },
{ value: 'bs-cyrl-ba', label: 'Bosnian (Cyrillic, Bosnia and Herzegovina)' },
{ value: 'bs-latn-ba', label: 'Bosnian (Latin, Bosnia and Herzegovina)' },
{ value: 'br-fr', label: 'Breton (France)' },
{ value: 'br', label: 'Breton' },
{ value: 'bg', label: 'Bulgarian' },
{ value: 'ca', label: 'Catalan' },
{ value: 'zh-cn', label: 'Chinese (Simplified)' },
{ value: 'zh-tw', label: 'Chinese (Traditional)' },
{ value: 'hr', label: 'Croatian' },
{ value: 'cs', label: 'Czech' },
{ value: 'da', label: 'Danish' },
{ value: 'prs-af', label: 'Dari (Afghanistan)' },
{ value: 'prs', label: 'Dari' },
{ value: 'div', label: 'Divehi' },
{ value: 'nl', label: 'Dutch' },
{ value: 'en', label: 'English' },
{ value: 'en-gb', label: 'English (United Kingdom)' },
{ value: 'en-us', label: 'English (United States)' },
{ value: 'et', label: 'Estonian' },
{ value: 'fo', label: 'Faroese' },
{ value: 'fil-ph', label: 'Filipino (Philippines)' },
{ value: 'fil', label: 'Filipino' },
{ value: 'fi', label: 'Finnish' },
{ value: 'fr', label: 'French' },
{ value: 'gl', label: 'Galician' },
{ value: 'ka', label: 'Georgian' },
{ value: 'de', label: 'German' },
{ value: 'el', label: 'Greek' },
{ value: 'kl-gl', label: 'Greenlandic (Greenland)' },
{ value: 'kl', label: 'Greenlandic' },
{ value: 'gu', label: 'Gujarati' },
{ value: 'ha-latn-ng', label: 'Hausa (Latin, Nigeria)' },
{ value: 'ha', label: 'Hausa' },
{ value: 'he', label: 'Hebrew' },
{ value: 'hi', label: 'Hindi' },
{ value: 'hu', label: 'Hungarian' },
{ value: 'is', label: 'Icelandic' },
{ value: 'ig-ng', label: 'Igbo (Nigeria)' },
{ value: 'ig', label: 'Igbo' },
{ value: 'id', label: 'Indonesian' },
{ value: 'iu', label: 'Inuktitut' },
{ value: 'iu-latn-ca', label: 'Inuktitut (Latin, Canada)' },
{ value: 'iu-cans-ca', label: 'Inuktitut (Syllabics, Canada)' },
{ value: 'ga-ie', label: 'Irish (Ireland)' },
{ value: 'ga', label: 'Irish' },
{ value: 'xh', label: 'isiXhosa' },
{ value: 'zu', label: 'isiZulu' },
{ value: 'it', label: 'Italian' },
{ value: 'ja', label: 'Japanese' },
{ value: 'kn', label: 'Kannada' },
{ value: 'kk', label: 'Kazakh' },
{ value: 'km-kh', label: 'Khmer (Cambodia)' },
{ value: 'qut-gt', label: 'K\'iche (Guatemala)' },
{ value: 'rw-rw', label: 'Kinyarwanda (Rwanda)' },
{ value: 'km', label: 'Khmer' },
{ value: 'qut', label: 'K\'iche' },
{ value: 'rw', label: 'Kinyarwanda' },
{ value: 'sw', label: 'Kiswahili' },
{ value: 'kok', label: 'Konkani' },
{ value: 'ko', label: 'Korean' },
{ value: 'ky', label: 'Kyrgyz' },
{ value: 'lo-la', label: 'Lao (Lao P.D.R.)' },
{ value: 'lo', label: 'Lao' },
{ value: 'lv', label: 'Latvian' },
{ value: 'lt', label: 'Lithuanian' },
{ value: 'wee-de', label: 'Lower Sorbian (Germany)' },
{ value: 'lb-lu', label: 'Luxembourgish (Luxembourg)' },
{ value: 'wee', label: 'Lower Sorbian' },
{ value: 'lb', label: 'Luxembourgish' },
{ value: 'mk', label: 'Macedonian' },
{ value: 'ms', label: 'Malay' },
{ value: 'ml-in', label: 'Malayalam (India)' },
{ value: 'mt-mt', label: 'Maltese (Malta)' },
{ value: 'mi-nz', label: 'Maori (New Zealand)' },
{ value: 'arn-cl', label: 'Mapudungun (Chile)' },
{ value: 'ml', label: 'Malayalam' },
{ value: 'mt', label: 'Maltese' },
{ value: 'mi', label: 'Maori' },
{ value: 'arn', label: 'Mapudungun' },
{ value: 'mr', label: 'Marathi' },
{ value: 'moh-ca', label: 'Mohawk (Mohawk)' },
{ value: 'moh', label: 'Mohawk' },
{ value: 'mn', label: 'Mongolian' },
{ value: 'ne-np', label: 'Nepali (Nepal)' },
{ value: 'ne', label: 'Nepali' },
{ value: 'no', label: 'Norwegian' },
{ value: 'oc-fr', label: 'Occitan (France)' },
{ value: 'or-in', label: 'Oriya (India)' },
{ value: 'ps-af', label: 'Pashto (Afghanistan)' },
{ value: 'oc', label: 'Occitan' },
{ value: 'or', label: 'Oriya' },
{ value: 'ps', label: 'Pashto' },
{ value: 'fa', label: 'Persian' },
{ value: 'pl', label: 'Polish' },
{ value: 'pt', label: 'Portuguese' },
{ value: 'pa', label: 'Punjabi' },
{ value: 'quz-bo', label: 'Quechua (Bolivia)' },
{ value: 'quz-ec', label: 'Quechua (Ecuador)' },
{ value: 'quz-pe', label: 'Quechua (Peru)' },
{ value: 'qu', label: 'Quechua' },
{ value: 'ro', label: 'Romanian' },
{ value: 'rm-ch', label: 'Romansh (Switzerland)' },
{ value: 'rm', label: 'Romansh' },
{ value: 'ru', label: 'Russian' },
{ value: 'sa', label: 'Sanskrit' },
{ value: 'sr', label: 'Serbian' },
{ value: 'st', label: 'Sesotho' },
{ value: 'nso', label: 'Sesotho sa Leboa' },
{ value: 'tn', label: 'Setswana' },
{ value: 'si-lk', label: 'Sinhala (Sri Lanka)' },
{ value: 'si', label: 'Sinhala' },
{ value: 'sk', label: 'Slovak' },
{ value: 'sl', label: 'Slovenian' },
{ value: 'es', label: 'Spanish' },
Expand All @@ -109,24 +112,24 @@ const languages = [
{ value: 'tt', label: 'Tatar' },
{ value: 'te', label: 'Telugu' },
{ value: 'th', label: 'Thai' },
{ value: 'bo-cn', label: 'Tibetan (PRC)' },
{ value: 'bo', label: 'Tibetan' },
{ value: 've', label: 'Tshivenḓa' },
{ value: 've', label: 'Venḓa' },
Comment on lines 116 to 117
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my comments on the Tsonga/Xitsonga labels, there are two possible labels for the Venda language. PFE as of the matching PR 7134, only uses the "Xitsonga" label.

https://en.wikipedia.org/wiki/Venda_language

Again, no changes for this PR or the PFE one, but worth a follow up discussion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same logic described here applies in this case.

{ value: 'tr', label: 'Turkish' },
{ value: 'tk-tm', label: 'Turkmen (Turkmenistan)' },
{ value: 'ug-cn', label: 'Uighur (PRC)' },
{ value: 'tk', label: 'Turkmen' },
{ value: 'ug', label: 'Uighur' },
{ value: 'uk', label: 'Ukrainian' },
{ value: 'wen-de', label: 'Upper Sorbian (Germany)' },
{ value: 'wen', label: 'Upper Sorbian' },
{ value: 'ur', label: 'Urdu' },
{ value: 'uz', label: 'Uzbek' },
{ value: 'vi', label: 'Vietlabelse' },
{ value: 'cy', label: 'Welsh' },
{ value: 'wo-sn', label: 'Wolof (Senegal)' },
{ value: 'wo', label: 'Wolof' },
{ value: 'ts', label: 'Xitsonga'},
{ value: 'ts', label: 'Tsonga'},
Comment on lines 128 to 129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fascinating, there are two possible labels for the Tsonga language. Both are valid, though I'm noting that PFE (as of PR 7134) only uses the 'Xitsonga' label

https://en.wikipedia.org/wiki/Tsonga_language

No changes necessary on either this PR or the PF PR, but worth a follow up discussion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate entries allow for more flexible language name search. As implemented in #666, these multiple entries allow users to match via endonym and exonym language names.

For additional related discussion, see: zooniverse/Panoptes-Front-End#6729 (comment), zooniverse/Panoptes-Front-End#6732 (comment)

Note: this multiple label flexibility is a Pandora-only feature, so a single value/label combination must be chosen for the PFE language list. To choose single labels, we defer to the option used or preferred by local speakers.

{ value: 'sah-ru', label: 'Yakut (Russia)' },
{ value: 'ii-cn', label: 'Yi (PRC)' },
{ value: 'yo-ng', label: 'Yoruba (Nigeria)' }
{ value: 'sah', label: 'Yakut' },
{ value: 'ii', label: 'Yi' },
{ value: 'yo', label: 'Yoruba' }
];

export default languages;
Loading