-
-
Notifications
You must be signed in to change notification settings - Fork 939
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(location): add list of spoken languages (#3333)
* add list of spoken languages * remove dupes * add language definition * add language module * add test case for `language()` * autogenerated supporting code * add languages for urdu * add test to make sure the values are truthy * update seed to match new format * update language list slim them down to a few languages as the long list was not easy to build up * update documentation * update returns * language: convert alpha2 to lowercase * update seed flies * covert alpha3 to lowercase * update seeders * update example * update version * use interface for language * Update index.ts * Revert "Update index.ts" This reverts commit 72a18e9. * Update src/modules/location/index.ts Co-authored-by: ST-DDT <[email protected]> * Update src/modules/location/index.ts Co-authored-by: ST-DDT <[email protected]> * Update src/definitions/location.ts Co-authored-by: ST-DDT <[email protected]> * language semantic Co-authored-by: ST-DDT <[email protected]> * add additional test cases * add examples for each property * add languages for the supported locales * update seeds * use example of german instead of english * Update src/definitions/location.ts Co-authored-by: ST-DDT <[email protected]> --------- Co-authored-by: ST-DDT <[email protected]>
- Loading branch information
1 parent
3c7abb5
commit ff6dda9
Showing
9 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
export default [ | ||
{ name: 'Afrikaans', alpha2: 'af', alpha3: 'afr' }, | ||
{ name: 'Azerbaijani', alpha2: 'az', alpha3: 'aze' }, | ||
{ name: 'Maldivian', alpha2: 'dv', alpha3: 'div' }, | ||
{ name: 'Farsi/Persian', alpha2: 'fa', alpha3: 'fas' }, | ||
{ name: 'Latvian', alpha2: 'lv', alpha3: 'lav' }, | ||
{ name: 'Indonesian', alpha2: 'id', alpha3: 'ind' }, | ||
{ name: 'Nepali', alpha2: 'ne', alpha3: 'nep' }, | ||
{ name: 'Thai', alpha2: 'th', alpha3: 'tha' }, | ||
{ name: 'Uzbek', alpha2: 'uz', alpha3: 'uzb' }, | ||
{ name: 'Yoruba', alpha2: 'yo', alpha3: 'yor' }, | ||
{ name: 'Pashto', alpha2: 'ps', alpha3: 'pus' }, | ||
{ name: 'English', alpha2: 'en', alpha3: 'eng' }, | ||
{ name: 'Urdu', alpha2: 'ur', alpha3: 'urd' }, | ||
{ name: 'German', alpha2: 'de', alpha3: 'deu' }, | ||
{ name: 'French', alpha2: 'fr', alpha3: 'fra' }, | ||
{ name: 'Spanish', alpha2: 'es', alpha3: 'spa' }, | ||
{ name: 'Italian', alpha2: 'it', alpha3: 'ita' }, | ||
{ name: 'Dutch', alpha2: 'nl', alpha3: 'nld' }, | ||
{ name: 'Russian', alpha2: 'ru', alpha3: 'rus' }, | ||
{ name: 'Portuguese', alpha2: 'pt', alpha3: 'por' }, | ||
{ name: 'Polish', alpha2: 'pl', alpha3: 'pol' }, | ||
{ name: 'Arabic', alpha2: 'ar', alpha3: 'ara' }, | ||
{ name: 'Japanese', alpha2: 'ja', alpha3: 'jpn' }, | ||
{ name: 'Chinese', alpha2: 'zh', alpha3: 'zho' }, | ||
{ name: 'Hindi', alpha2: 'hi', alpha3: 'hin' }, | ||
{ name: 'Bengali', alpha2: 'bn', alpha3: 'ben' }, | ||
{ name: 'Gujarati', alpha2: 'gu', alpha3: 'guj' }, | ||
{ name: 'Tamil', alpha2: 'ta', alpha3: 'tam' }, | ||
{ name: 'Telugu', alpha2: 'te', alpha3: 'tel' }, | ||
{ name: 'Punjabi', alpha2: 'pa', alpha3: 'pan' }, | ||
{ name: 'Vietnamese', alpha2: 'vi', alpha3: 'vie' }, | ||
{ name: 'Korean', alpha2: 'ko', alpha3: 'kor' }, | ||
{ name: 'Turkish', alpha2: 'tr', alpha3: 'tur' }, | ||
{ name: 'Swedish', alpha2: 'sv', alpha3: 'swe' }, | ||
{ name: 'Greek', alpha2: 'el', alpha3: 'ell' }, | ||
{ name: 'Czech', alpha2: 'cs', alpha3: 'ces' }, | ||
{ name: 'Hungarian', alpha2: 'hu', alpha3: 'hun' }, | ||
{ name: 'Romanian', alpha2: 'ro', alpha3: 'ron' }, | ||
{ name: 'Ukrainian', alpha2: 'uk', alpha3: 'ukr' }, | ||
{ name: 'Norwegian', alpha2: 'no', alpha3: 'nor' }, | ||
{ name: 'Serbian', alpha2: 'sr', alpha3: 'srp' }, | ||
{ name: 'Croatian', alpha2: 'hr', alpha3: 'hrv' }, | ||
{ name: 'Slovak', alpha2: 'sk', alpha3: 'slk' }, | ||
{ name: 'Slovenian', alpha2: 'sl', alpha3: 'slv' }, | ||
{ name: 'Icelandic', alpha2: 'is', alpha3: 'isl' }, | ||
{ name: 'Finnish', alpha2: 'fi', alpha3: 'fin' }, | ||
{ name: 'Danish', alpha2: 'da', alpha3: 'dan' }, | ||
{ name: 'Swahili', alpha2: 'sw', alpha3: 'swa' }, | ||
{ name: 'Bashkir', alpha2: 'ba', alpha3: 'bak' }, | ||
{ name: 'Basque', alpha2: 'eu', alpha3: 'eus' }, | ||
{ name: 'Catalan', alpha2: 'ca', alpha3: 'cat' }, | ||
{ name: 'Galician', alpha2: 'gl', alpha3: 'glg' }, | ||
{ name: 'Esperanto', alpha2: 'eo', alpha3: 'epo' }, | ||
{ name: 'Fijian', alpha2: 'fj', alpha3: 'fij' }, | ||
{ name: 'Malagasy', alpha2: 'mg', alpha3: 'mlg' }, | ||
{ name: 'Maltese', alpha2: 'mt', alpha3: 'mlt' }, | ||
{ name: 'Albanian', alpha2: 'sq', alpha3: 'sqi' }, | ||
{ name: 'Armenian', alpha2: 'hy', alpha3: 'hye' }, | ||
{ name: 'Georgian', alpha2: 'ka', alpha3: 'kat' }, | ||
{ name: 'Macedonian', alpha2: 'mk', alpha3: 'mkd' }, | ||
{ name: 'Kazakh', alpha2: 'kk', alpha3: 'kaz' }, | ||
{ name: 'Haitian Creole', alpha2: 'ht', alpha3: 'hat' }, | ||
{ name: 'Mongolian', alpha2: 'mn', alpha3: 'mon' }, | ||
{ name: 'Kyrgyz', alpha2: 'ky', alpha3: 'kir' }, | ||
{ name: 'Finnish', alpha2: 'fi', alpha3: 'fin' }, | ||
{ name: 'Tagalog', alpha2: 'tl', alpha3: 'tgl' }, | ||
{ name: 'Malay', alpha2: 'ms', alpha3: 'msa' }, | ||
{ name: 'Tajik', alpha2: 'tg', alpha3: 'tgk' }, | ||
{ name: 'Swati', alpha2: 'ss', alpha3: 'ssw' }, | ||
{ name: 'Tatar', alpha2: 'tt', alpha3: 'tat' }, | ||
{ name: 'Zulu', alpha2: 'zu', alpha3: 'zul' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export default [ | ||
{ name: 'پشتو', alpha2: 'ps', alpha3: 'pus' }, | ||
{ name: 'اردو', alpha2: 'ur', alpha3: 'urd' }, | ||
{ name: 'انگریزی', alpha2: 'en', alpha3: 'eng' }, | ||
{ name: 'جرمن', alpha2: 'de', alpha3: 'deu' }, | ||
{ name: 'فرانسیسی', alpha2: 'fr', alpha3: 'fra' }, | ||
{ name: 'اسپینش', alpha2: 'es', alpha3: 'spa' }, | ||
{ name: 'دچ', alpha2: 'nl', alpha3: 'nld' }, | ||
{ name: 'روسی', alpha2: 'ru', alpha3: 'rus' }, | ||
{ name: 'پرتگالی', alpha2: 'pt', alpha3: 'por' }, | ||
{ name: 'پولش', alpha2: 'pl', alpha3: 'pol' }, | ||
{ name: 'عربی', alpha2: 'ar', alpha3: 'ara' }, | ||
{ name: 'جاپانی', alpha2: 'ja', alpha3: 'jpn' }, | ||
{ name: 'چینی', alpha2: 'zh', alpha3: 'zho' }, | ||
{ name: 'ہندی', alpha2: 'hi', alpha3: 'hin' }, | ||
{ name: 'بنگالی', alpha2: 'bn', alpha3: 'ben' }, | ||
{ name: 'تمل', alpha2: 'ta', alpha3: 'tam' }, | ||
{ name: 'تلگو', alpha2: 'te', alpha3: 'tel' }, | ||
{ name: 'پنجابی', alpha2: 'pa', alpha3: 'pan' }, | ||
{ name: 'ترکی', alpha2: 'tr', alpha3: 'tur' }, | ||
{ name: 'سویڈش', alpha2: 'sv', alpha3: 'swe' }, | ||
{ name: 'یونانی', alpha2: 'el', alpha3: 'ell' }, | ||
{ name: 'چیک', alpha2: 'cs', alpha3: 'ces' }, | ||
{ name: 'ہنگرین', alpha2: 'hu', alpha3: 'hun' }, | ||
{ name: 'نارویجن', alpha2: 'no', alpha3: 'nor' }, | ||
{ name: 'کروشیائی', alpha2: 'hr', alpha3: 'hrv' }, | ||
{ name: 'سلوواک', alpha2: 'sk', alpha3: 'slk' }, | ||
{ name: 'سلووینیائی', alpha2: 'sl', alpha3: 'slv' }, | ||
{ name: 'فنش', alpha2: 'fi', alpha3: 'fin' }, | ||
{ name: 'دنش', alpha2: 'da', alpha3: 'dan' }, | ||
{ name: 'مالٹی', alpha2: 'mt', alpha3: 'mlt' }, | ||
{ name: 'تاجک', alpha2: 'tg', alpha3: 'tgk' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters