Build intl files#367
Open
bearfriend wants to merge 15 commits into
Open
Conversation
dlockhart
reviewed
May 14, 2026
| { id: 20, code: 'zh-tw', pack: 'zh-tw', overrideCode: 'zh-Hant', dir: 'ltr', name: '中文(繁体)' } | ||
| ]; | ||
| export const supportedLocales = supportedLocalesDetails.map((l) => l.code); | ||
| export { defaultLocale, supportedBaseLocales, supportedLangpacks, supportedLocalesDetails, supportedLocales }; |
bearfriend
commented
May 14, 2026
| export const supportedLocales = supportedLocalesDetails.map((l) => l.code); | ||
| export { defaultLocale, supportedBaseLocales, supportedLangpacks, supportedLocalesDetails, supportedLocales }; | ||
|
|
||
| function tryResolve(langTag) { |
Contributor
Author
There was a problem hiding this comment.
I think there's a bunch of duplication of what this is doing around. I've created a story to look into it separately.
GAUD-10029: Investigate duplication of locale tag parsing code
bearfriend
commented
May 14, 2026
Comment on lines
+1
to
+31
| export const defaultLocale = 'en'; | ||
| export const supportedBaseLocales = ['ar', 'ca', 'cy', 'da', 'de', 'en', 'es', 'fr', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh']; | ||
| export const supportedLangpacks = ['ar', 'ca', 'cy', 'da', 'de', 'en-gb', 'en', 'es-es', 'es', 'fr-fr', 'fr-on', 'fr', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh-cn', 'zh-tw']; | ||
| export const supportedLocalesDetails = [ | ||
| { id: 16, code: 'ar-sa', source: 'ar', pack: 'ar', dir: 'rtl', name: 'العربية' }, | ||
| { id: 38, code: 'ca-es', source: 'ca', pack: 'ca', dir: 'ltr', name: 'Català (Espanya)' }, | ||
| { id: 31, code: 'cy-gb', source: 'cy', pack: 'cy', dir: 'ltr', name: 'Cymraeg (Y Deyrnas Unedig)' }, | ||
| { id: 28, code: 'da-dk', source: 'da', pack: 'da', dir: 'ltr', name: 'Dansk (danmark)' }, | ||
| { id: 26, code: 'de-de', source: 'de', pack: 'de', dir: 'ltr', name: 'Deutsch (Deutschland)' }, | ||
| { id: 13, code: 'en-ca', source: 'en-CA', dir: 'ltr', name: 'English (Canada)' }, | ||
| { id: 11, code: 'en-gb', source: 'en-GB', pack: 'en-gb', dir: 'ltr', name: 'English (United Kingdom)' }, | ||
| { id: 1, code: 'en-us', source: 'en', pack: 'en', dir: 'ltr', name: 'English (United States)' }, | ||
| { id: 30, code: 'es-es', source: 'es', pack: 'es-es', dir: 'ltr', name: 'Español (España)' }, | ||
| { id: 18, code: 'es-mx', source: 'es-MX', pack: 'es', overrideCode: 'es-419', dir: 'ltr', name: 'Español (Latinoamérica)' }, | ||
| { id: 2, code: 'fr-ca', source: 'fr-CA', pack: 'fr', dir: 'ltr', name: 'Français (Canada)' }, | ||
| { id: 29, code: 'fr-fr', source: 'fr', pack: 'fr-fr', dir: 'ltr', name: 'Français (France)' }, | ||
| { id: 32, code: 'fr-on', source: 'fr-CA', pack: 'fr-on', overrideCode: 'fr-CA-Ontario', dir: 'ltr', name: 'Français (Ontario)' }, | ||
| { id: 35, code: 'haw-us', source: 'haw', pack: 'haw', dir: 'ltr', name: 'ʻŌlelo Hawaiʻi (ʻAmelika Hui Pū ʻIa)' }, | ||
| { id: 33, code: 'hi-in', source: 'hi', pack: 'hi', dir: 'ltr', name: 'हिंदी (भारत)' }, | ||
| { id: 21, code: 'ja-jp', source: 'ja', pack: 'ja', dir: 'ltr', name: '日本語 (日本)' }, | ||
| { id: 22, code: 'ko-kr', source: 'ko', pack: 'ko', dir: 'ltr', name: '한국어 (대한민국)' }, | ||
| { id: 34, code: 'mi-nz', source: 'mi', pack: 'mi', dir: 'ltr', name: 'Māori (Aotearoa)' }, | ||
| { id: 25, code: 'nl-nl', source: 'nl', pack: 'nl', dir: 'ltr', name: 'Nederlands (Nederland)' }, | ||
| { id: 19, code: 'pt-br', source: 'pt', pack: 'pt', dir: 'ltr', name: 'Português (Brasil)' }, | ||
| { id: 24, code: 'sv-se', source: 'sv', pack: 'sv', dir: 'ltr', name: 'Svenska (Sverige)' }, | ||
| { id: 37, code: 'th-th', source: 'th', pack: 'th', dir: 'ltr', name: 'ไทย (ไทย)' }, | ||
| { id: 23, code: 'tr-tr', source: 'tr', pack: 'tr', dir: 'ltr', name: 'Türkçe (Türkiye)' }, | ||
| { id: 36, code: 'vi-vn', source: 'vi', pack: 'vi', dir: 'ltr', name: 'Tiếng Việt (Việt Nam)' }, | ||
| { id: 17, code: 'zh-cn', source: 'zh', pack: 'zh-cn', overrideCode: 'zh-Hans', dir: 'ltr', name: '中文(简体)' }, | ||
| { id: 20, code: 'zh-tw', source: 'zh-Hant', pack: 'zh-tw', overrideCode: 'zh-Hant', dir: 'ltr', name: '中文(繁体)' }, | ||
| ]; |
Contributor
Author
3e7d52c to
a848715
Compare
dlockhart
approved these changes
May 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

GAUD-9823: Build (current) intl locale files
Builds the existing
common.jslocale data dynamically and moves it tolocale-data/supported.js