diff --git a/js/data/localeInfoModule.js b/js/data/localeInfoModule.js new file mode 100644 index 000000000..7576e4056 --- /dev/null +++ b/js/data/localeInfoModule.js @@ -0,0 +1,1033 @@ +// Copyright 2015-2022, University of Colorado Boulder + +/** + * Locale information for all locales that we support + * + * Auto-generated by ExportPhetcommonLocales.java. We have decided that we will not auto-generate this file again, + * so it is okay to modify this file if things need to be corrected or added. + * + * language codes are ISO 639-1, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + * country codes are ISO 3166-1 alpha2, see http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 + * + * NOTE: We are using an older version of ISO 639-1 because java.util.Locale maps some of the newer language codes to + * older codes. See Locale.convertOldISOCodes. + * The affected country codes are: + * he -> iw (Hebrew) + * yi -> ji (Yiddish) + * id -> in (Indonesian) + * + * ALSO NOTE: We had a request to support Lakota, which is not included in ISO 639-1, and is only defined as a three- + * letter code in ISO 639-3. The locale combination 'lk' was not taken in ISO 639-1, so we added it. Strictly + * speaking, this is a deviation from the spec. + */ + +/* eslint-env browser, node */ + + +export default { + aa: { + name: 'Afar', + localizedName: 'Afar', + direction: 'ltr' + }, + ab: { + name: 'Abkhazian', + localizedName: 'Abkhazian', + direction: 'ltr' + }, + ae: { + name: 'Avestan', + localizedName: 'Avestan', + direction: 'rtl' + }, + af: { + name: 'Afrikaans', + localizedName: 'Afrikaans', + direction: 'ltr' + }, + ak: { + name: 'Akan', + localizedName: 'Akan', + direction: 'ltr' + }, + am: { + name: 'Amharic', + localizedName: 'Amharic', + direction: 'ltr' + }, + an: { + name: 'Aragonese', + localizedName: 'Aragonese', + direction: 'ltr' + }, + ar: { + name: 'Arabic', + localizedName: 'العربية', + direction: 'rtl' + }, + ar_MA: { + name: 'Arabic, Morocco', + localizedName: 'العربية (المغرب)', + direction: 'rtl' + }, + ar_SA: { + name: 'Arabic, Saudi Arabia', + localizedName: 'العربية (السعودية)', + direction: 'rtl' + }, + as: { + name: 'Assamese', + localizedName: 'Assamese', + direction: 'ltr' + }, + av: { + name: 'Avaric', + localizedName: 'Avaric', + direction: 'ltr' + }, + ay: { + name: 'Aymara', + localizedName: 'Aymara', + direction: 'ltr' + }, + az: { + name: 'Azerbaijani', + localizedName: 'Azerbaijani', + direction: 'ltr' + }, + ba: { + name: 'Bashkir', + localizedName: 'Bashkir', + direction: 'ltr' + }, + be: { + name: 'Belarusian', + localizedName: 'беларускі', + direction: 'ltr' + }, + bg: { + name: 'Bulgarian', + localizedName: 'български', + direction: 'ltr' + }, + bh: { + name: 'Bihari', + localizedName: 'Bihari', + direction: 'ltr' + }, + bi: { + name: 'Bislama', + localizedName: 'Bislama', + direction: 'ltr' + }, + bm: { + name: 'Bambara', + localizedName: 'Bambara', + direction: 'ltr' + }, + bn: { + name: 'Bengali', + localizedName: 'Bengali', + direction: 'ltr' + }, + bo: { + name: 'Tibetan', + localizedName: 'Tibetan', + direction: 'ltr' + }, + br: { + name: 'Breton', + localizedName: 'Breton', + direction: 'ltr' + }, + bs: { + name: 'Bosnian', + localizedName: 'Bosnian', + direction: 'ltr' + }, + ca: { + name: 'Catalan', + localizedName: 'català', + direction: 'ltr' + }, + ce: { + name: 'Chechen', + localizedName: 'Chechen', + direction: 'ltr' + }, + ch: { + name: 'Chamorro', + localizedName: 'Chamorro', + direction: 'ltr' + }, + co: { + name: 'Corsican', + localizedName: 'Corsican', + direction: 'ltr' + }, + cr: { + name: 'Cree', + localizedName: 'Cree', + direction: 'ltr' + }, + cs: { + name: 'Czech', + localizedName: 'čeština', + direction: 'ltr' + }, + cu: { + name: 'Church Slavic', + localizedName: 'Church Slavic', + direction: 'ltr' + }, + cv: { + name: 'Chuvash', + localizedName: 'Chuvash', + direction: 'ltr' + }, + cy: { + name: 'Welsh', + localizedName: 'Welsh', + direction: 'ltr' + }, + da: { + name: 'Danish', + localizedName: 'Dansk', + direction: 'ltr' + }, + de: { + name: 'German', + localizedName: 'Deutsch', + direction: 'ltr' + }, + dv: { + name: 'Divehi', + localizedName: 'Divehi', + direction: 'ltr' + }, + dz: { + name: 'Dzongkha', + localizedName: 'Dzongkha', + direction: 'ltr' + }, + ee: { + name: 'Ewe', + localizedName: 'Ewe', + direction: 'ltr' + }, + el: { + name: 'Greek', + localizedName: 'Ελληνικά', + direction: 'ltr' + }, + en: { + name: 'English', + localizedName: 'English', + direction: 'ltr' + }, + en_CA: { + name: 'English, Canada', + localizedName: 'English (Canada)', + direction: 'ltr' + }, + en_GB: { + name: 'English, United Kingdom', + localizedName: 'English (United Kingdom)', + direction: 'ltr' + }, + eo: { + name: 'Esperanto', + localizedName: 'Esperanto', + direction: 'ltr' + }, + es: { + name: 'Spanish', + localizedName: 'español', + direction: 'ltr' + }, + es_CO: { + name: 'Spanish, Colombia', + localizedName: 'español (Colombia)', + direction: 'ltr' + }, + es_CR: { + name: 'Spanish, Costa Rica', + localizedName: 'español (Costa Rica)', + direction: 'ltr' + }, + es_ES: { + name: 'Spanish, Spain', + localizedName: 'español (España)', + direction: 'ltr' + }, + es_MX: { + name: 'Spanish, Mexico', + localizedName: 'español (México)', + direction: 'ltr' + }, + es_PE: { + name: 'Spanish, Peru', + localizedName: 'español (Perú)', + direction: 'ltr' + }, + et: { + name: 'Estonian', + localizedName: 'Eesti', + direction: 'ltr' + }, + eu: { + name: 'Basque', + localizedName: 'Basque', + direction: 'ltr' + }, + fa: { + name: 'Persian', + localizedName: 'Persian', + direction: 'rtl' + }, + ff: { + name: 'Fulah', + localizedName: 'Fulah', + direction: 'ltr' + }, + fi: { + name: 'Finnish', + localizedName: 'suomi', + direction: 'ltr' + }, + fj: { + name: 'Fijian', + localizedName: 'Fijian', + direction: 'ltr' + }, + fo: { + name: 'Faroese', + localizedName: 'Faroese', + direction: 'ltr' + }, + fr: { + name: 'French', + localizedName: 'français', + direction: 'ltr' + }, + fu: { + name: 'Friulian', + localizedName: 'fu', + direction: 'ltr' + }, + fy: { + name: 'Western Frisian', + localizedName: 'Frisian', + direction: 'ltr' + }, + ga: { + name: 'Irish', + localizedName: 'Gaeilge', + direction: 'ltr' + }, + gd: { + name: 'Scottish Gaelic', + localizedName: 'Scottish Gaelic', + direction: 'ltr' + }, + gl: { + name: 'Galician', + localizedName: 'Gallegan', + direction: 'ltr' + }, + gn: { + name: 'Guarani', + localizedName: 'Guarani', + direction: 'ltr' + }, + gu: { + name: 'Gujarati', + localizedName: 'Gujarati', + direction: 'ltr' + }, + gv: { + name: 'Manx', + localizedName: 'Manx', + direction: 'ltr' + }, + ha: { + name: 'Hausa', + localizedName: 'Hausa', + direction: 'ltr' + }, + hi: { + name: 'Hindi', + localizedName: 'हिंदी', + direction: 'ltr' + }, + ho: { + name: 'Hiri Motu', + localizedName: 'Hiri Motu', + direction: 'ltr' + }, + hr: { + name: 'Croatian', + localizedName: 'hrvatski', + direction: 'ltr' + }, + ht: { + name: 'Haitian', + localizedName: 'Haitian', + direction: 'ltr' + }, + hu: { + name: 'Hungarian', + localizedName: 'magyar', + direction: 'ltr' + }, + hy: { + name: 'Armenian', + localizedName: 'Armenian', + direction: 'ltr' + }, + hz: { + name: 'Herero', + localizedName: 'Herero', + direction: 'ltr' + }, + ia: { + name: 'Interlingua', + localizedName: 'Interlingua', + direction: 'ltr' + }, + ie: { + name: 'Interlingue', + localizedName: 'Interlingue', + direction: 'ltr' + }, + ig: { + name: 'Igbo', + localizedName: 'Igbo', + direction: 'ltr' + }, + ii: { + name: 'Sichuan Yi', + localizedName: 'Sichuan Yi', + direction: 'ltr' + }, + ik: { + name: 'Inupiaq', + localizedName: 'Inupiaq', + direction: 'ltr' + }, + in: { + name: 'Indonesian', + localizedName: 'Bahasa Indonesia', + direction: 'ltr' + }, + io: { + name: 'Ido', + localizedName: 'Ido', + direction: 'ltr' + }, + is: { + name: 'Icelandic', + localizedName: 'íslenska', + direction: 'ltr' + }, + it: { + name: 'Italian', + localizedName: 'italiano', + direction: 'ltr' + }, + iu: { + name: 'Inuktitut', + localizedName: 'Inuktitut', + direction: 'ltr' + }, + iw: { + name: 'Hebrew', + localizedName: 'עברית', + direction: 'rtl' + }, + ja: { + name: 'Japanese', + localizedName: '日本語', + direction: 'ltr' + }, + ji: { + name: 'Yiddish', + localizedName: 'Yiddish', + direction: 'ltr' + }, + jv: { + name: 'Javanese', + localizedName: 'Javanese', + direction: 'ltr' + }, + ka: { + name: 'Georgian', + localizedName: 'Georgian', + direction: 'ltr' + }, + kg: { + name: 'Kongo', + localizedName: 'Kongo', + direction: 'ltr' + }, + ki: { + name: 'Kikuyu', + localizedName: 'Kikuyu', + direction: 'ltr' + }, + kj: { + name: 'Kwanyama', + localizedName: 'Kwanyama', + direction: 'ltr' + }, + kk: { + name: 'Kazakh', + localizedName: 'Kazakh', + direction: 'ltr' + }, + kl: { + name: 'Kalaallisut', + localizedName: 'Greenlandic', + direction: 'ltr' + }, + km: { + name: 'Khmer', + localizedName: 'Khmer', + direction: 'ltr' + }, + kn: { + name: 'Kannada', + localizedName: 'Kannada', + direction: 'ltr' + }, + ko: { + name: 'Korean', + localizedName: '한국어', + direction: 'ltr' + }, + kr: { + name: 'Kanuri', + localizedName: 'Kanuri', + direction: 'ltr' + }, + ks: { + name: 'Kashmiri', + localizedName: 'Kashmiri', + direction: 'ltr' + }, + ku: { + name: 'Kurdish', + localizedName: 'Kurdish', + direction: 'ltr' + }, + ku_TR: { + name: 'Kurdish, Turkey', + localizedName: 'Kurdish (Turkey)', + direction: 'ltr' + }, + kv: { + name: 'Komi', + localizedName: 'Komi', + direction: 'ltr' + }, + kw: { + name: 'Cornish', + localizedName: 'Cornish', + direction: 'ltr' + }, + ky: { + name: 'Kirghiz', + localizedName: 'Kirghiz', + direction: 'ltr' + }, + la: { + name: 'Latin', + localizedName: 'Latin', + direction: 'ltr' + }, + lb: { + name: 'Luxembourgish', + localizedName: 'Luxembourgish', + direction: 'ltr' + }, + lg: { + name: 'Ganda', + localizedName: 'Ganda', + direction: 'ltr' + }, + li: { + name: 'Limburgish', + localizedName: 'Limburgish', + direction: 'ltr' + }, + lk: { + name: 'Lakota', + localizedName: 'Lakota', + direction: 'ltr' + }, + ln: { + name: 'Lingala', + localizedName: 'Lingala', + direction: 'ltr' + }, + lo: { + name: 'Lao', + localizedName: 'Lao', + direction: 'ltr' + }, + lt: { + name: 'Lithuanian', + localizedName: 'Lietuvių', + direction: 'ltr' + }, + lu: { + name: 'Luba-Katanga', + localizedName: 'Luba-Katanga', + direction: 'ltr' + }, + lv: { + name: 'Latvian', + localizedName: 'Latviešu', + direction: 'ltr' + }, + mg: { + name: 'Malagasy', + localizedName: 'Malagasy', + direction: 'ltr' + }, + mh: { + name: 'Marshallese', + localizedName: 'Marshallese', + direction: 'ltr' + }, + mi: { + name: 'Maori', + localizedName: 'Maori', + direction: 'ltr' + }, + mk: { + name: 'Macedonian', + localizedName: 'македонски', + direction: 'ltr' + }, + ml: { + name: 'Malayalam', + localizedName: 'Malayalam', + direction: 'ltr' + }, + mn: { + name: 'Mongolian', + localizedName: 'Mongolian', + direction: 'ltr' + }, + mo: { + name: 'Moldavian', + localizedName: 'Moldavian', + direction: 'ltr' + }, + mr: { + name: 'Marathi', + localizedName: 'Marathi', + direction: 'ltr' + }, + ms: { + name: 'Malay', + localizedName: 'Bahasa Melayu', + direction: 'ltr' + }, + mt: { + name: 'Maltese', + localizedName: 'Malti', + direction: 'ltr' + }, + my: { + name: 'Burmese', + localizedName: 'Burmese', + direction: 'ltr' + }, + na: { + name: 'Nauru', + localizedName: 'Nauru', + direction: 'ltr' + }, + nb: { + name: 'Norwegian Bokmal', + localizedName: 'Norwegian Bokmål', + direction: 'ltr' + }, + nd: { + name: 'North Ndebele', + localizedName: 'North Ndebele', + direction: 'ltr' + }, + ne: { + name: 'Nepali', + localizedName: 'Nepali', + direction: 'ltr' + }, + ng: { + name: 'Ndonga', + localizedName: 'Ndonga', + direction: 'ltr' + }, + nl: { + name: 'Dutch', + localizedName: 'Nederlands', + direction: 'ltr' + }, + nn: { + name: 'Norwegian Nynorsk', + localizedName: 'Norwegian Nynorsk', + direction: 'ltr' + }, + nr: { + name: 'South Ndebele', + localizedName: 'South Ndebele', + direction: 'ltr' + }, + nv: { + name: 'Navajo', + localizedName: 'Navajo', + direction: 'ltr' + }, + ny: { + name: 'Chichewa', + localizedName: 'Nyanja', + direction: 'ltr' + }, + oc: { + name: 'Occitan', + localizedName: 'Occitan', + direction: 'ltr' + }, + oj: { + name: 'Ojibwa', + localizedName: 'Ojibwa', + direction: 'ltr' + }, + om: { + name: 'Oromo', + localizedName: 'Oromo', + direction: 'ltr' + }, + or: { + name: 'Oriya', + localizedName: 'Oriya', + direction: 'ltr' + }, + os: { + name: 'Ossetian', + localizedName: 'Ossetian', + direction: 'ltr' + }, + pa: { + name: 'Panjabi', + localizedName: 'Panjabi', + direction: 'ltr' + }, + pi: { + name: 'Pali', + localizedName: 'Pali', + direction: 'ltr' + }, + pl: { + name: 'Polish', + localizedName: 'polski', + direction: 'ltr' + }, + ps: { + name: 'Pashto', + localizedName: 'Pushto', + direction: 'ltr' + }, + pt: { + name: 'Portuguese', + localizedName: 'português', + direction: 'ltr' + }, + pt_BR: { + name: 'Portuguese, Brazil', + localizedName: 'português (Brasil)', + direction: 'ltr' + }, + qu: { + name: 'Quechua', + localizedName: 'Quechua', + direction: 'ltr' + }, + rm: { + name: 'Raeto-Romance', + localizedName: 'Raeto-Romance', + direction: 'ltr' + }, + rn: { + name: 'Kirundi', + localizedName: 'Rundi', + direction: 'ltr' + }, + ro: { + name: 'Romanian', + localizedName: 'română', + direction: 'ltr' + }, + ru: { + name: 'Russian', + localizedName: 'русский', + direction: 'ltr' + }, + rw: { + name: 'Kinyarwanda', + localizedName: 'Kinyarwanda', + direction: 'ltr' + }, + ry: { + name: 'Rusyn', + localizedName: 'ry', + direction: 'ltr' + }, + sa: { + name: 'Sanskrit', + localizedName: 'Sanskrit', + direction: 'ltr' + }, + sc: { + name: 'Sardinian', + localizedName: 'Sardinian', + direction: 'ltr' + }, + sd: { + name: 'Sindhi', + localizedName: 'Sindhi', + direction: 'ltr' + }, + se: { + name: 'Northern Sami', + localizedName: 'Northern Sami', + direction: 'ltr' + }, + sg: { + name: 'Sango', + localizedName: 'Sango', + direction: 'ltr' + }, + sh: { + name: 'Serbo-Croatian', + localizedName: 'sh', + direction: 'ltr' + }, + si: { + name: 'Sinhalese', + localizedName: 'Sinhalese', + direction: 'ltr' + }, + sk: { + name: 'Slovak', + localizedName: 'Slovenčina', + direction: 'ltr' + }, + sl: { + name: 'Slovenian', + localizedName: 'Slovenščina', + direction: 'ltr' + }, + sm: { + name: 'Samoan', + localizedName: 'Samoan', + direction: 'ltr' + }, + sn: { + name: 'Shona', + localizedName: 'Shona', + direction: 'ltr' + }, + so: { + name: 'Somali', + localizedName: 'Somali', + direction: 'ltr' + }, + sq: { + name: 'Albanian', + localizedName: 'shqipe', + direction: 'ltr' + }, + sr: { + name: 'Serbian', + localizedName: 'Српски', + direction: 'ltr' + }, + ss: { + name: 'Swati', + localizedName: 'Swati', + direction: 'ltr' + }, + st: { + name: 'Sotho', + localizedName: 'Southern Sotho', + direction: 'ltr' + }, + su: { + name: 'Sundanese', + localizedName: 'Sundanese', + direction: 'ltr' + }, + sv: { + name: 'Swedish', + localizedName: 'svenska', + direction: 'ltr' + }, + sw: { + name: 'Swahili', + localizedName: 'Swahili', + direction: 'ltr' + }, + ta: { + name: 'Tamil', + localizedName: 'Tamil', + direction: 'ltr' + }, + te: { + name: 'Telugu', + localizedName: 'Telugu', + direction: 'ltr' + }, + tg: { + name: 'Tajik', + localizedName: 'Tajik', + direction: 'ltr' + }, + th: { + name: 'Thai', + localizedName: 'ไทย', + direction: 'ltr' + }, + ti: { + name: 'Tigrinya', + localizedName: 'Tigrinya', + direction: 'ltr' + }, + tk: { + name: 'Turkmen', + localizedName: 'Turkmen', + direction: 'ltr' + }, + tl: { + name: 'Tagalog', + localizedName: 'Tagalog', + direction: 'ltr' + }, + tn: { + name: 'Tswana', + localizedName: 'Tswana', + direction: 'ltr' + }, + to: { + name: 'Tonga', + localizedName: 'Tonga', + direction: 'ltr' + }, + tr: { + name: 'Turkish', + localizedName: 'Türkçe', + direction: 'ltr' + }, + ts: { + name: 'Tsonga', + localizedName: 'Tsonga', + direction: 'ltr' + }, + tt: { + name: 'Tatar', + localizedName: 'Tatar', + direction: 'ltr' + }, + tw: { + name: 'Twi', + localizedName: 'Twi', + direction: 'ltr' + }, + ty: { + name: 'Tahitian', + localizedName: 'Tahitian', + direction: 'ltr' + }, + ug: { + name: 'Uighur', + localizedName: 'Uighur', + direction: 'ltr' + }, + uk: { + name: 'Ukrainian', + localizedName: 'українська', + direction: 'ltr' + }, + ur: { + name: 'Urdu', + localizedName: 'Urdu', + direction: 'rtl' + }, + uz: { + name: 'Uzbek', + localizedName: 'Uzbek', + direction: 'ltr' + }, + ve: { + name: 'Venda', + localizedName: 'Venda', + direction: 'ltr' + }, + vi: { + name: 'Vietnamese', + localizedName: 'Tiếng Việt', + direction: 'ltr' + }, + vo: { + name: 'Volapuk', + localizedName: 'Volapük', + direction: 'ltr' + }, + wa: { + name: 'Walloon', + localizedName: 'Walloon', + direction: 'ltr' + }, + wo: { + name: 'Wolof', + localizedName: 'Wolof', + direction: 'ltr' + }, + xh: { + name: 'Xhosa', + localizedName: 'Xhosa', + direction: 'ltr' + }, + yo: { + name: 'Yoruba', + localizedName: 'Yoruba', + direction: 'ltr' + }, + za: { + name: 'Zhuang', + localizedName: 'Zhuang', + direction: 'ltr' + }, + zh_CN: { + name: 'Chinese, Simplified', + localizedName: '中文 (中国)', + direction: 'ltr' + }, + zh_HK: { + name: 'Chinese, Hong Kong', + localizedName: '中文 (香港)', + direction: 'ltr' + }, + zh_TW: { + name: 'Chinese, Traditional', + localizedName: '中文 (台灣)', + direction: 'ltr' + }, + zu: { + name: 'Zulu', + localizedName: 'Zulu', + direction: 'ltr' + } +}; diff --git a/js/grunt/getStringMap.js b/js/grunt/getStringMap.js index da36bdb3f..36b5f58a8 100644 --- a/js/grunt/getStringMap.js +++ b/js/grunt/getStringMap.js @@ -174,7 +174,7 @@ module.exports = function( mainRepo, locales, phetLibs, usedModules ) { // this must support JS code and minified TypeScript code const matches = fileContent.match( new RegExp( `${prefix}(\\.[a-zA-Z_$][a-zA-Z0-9_$]*|\\[\\s*['"][^'"]+['"]\\s*\\])+[^\\.\\[]`, 'g' ) ); if ( matches ) { - stringAccesses.push( ...matches.map( match => match.slice( 0, match.length - 1 ) ).filter( m => m !== `${prefix}.get` ) ); + stringAccesses.push( ...matches.map( match => match.slice( 0, match.length - 1 ).replace( /Property$/, '' ) ).filter( m => m !== `${prefix}.get` ) ); } // Look for backup matches, e.g. `joistStrings.get( 'fullString' )`