-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(i18n): incorporate 52 languages into messages pipeline #5781
Changes from 6 commits
c95c7a8
156074e
063c75f
28eabc7
671edb9
2638750
b579ce5
79d8a67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,63 @@ | |
|
||
/** @type {Record<LH.Locale, LocaleMessages>} */ | ||
const locales = { | ||
'ar': require('./ar-XB.json'), // TODO: fallback not needed when ar translation available | ||
'ar-XB': require('./ar-XB.json'), | ||
'en': require('./en-US.json'), // en-* fallback | ||
'en-US': require('./en-US.json'), | ||
'en-XA': require('./en-XA.json'), | ||
'en-US': require('./en-US.json'), // The 'source' strings, with descriptions | ||
'en': require('./en-US.json'), // According to CLDR/ICU, 'en' == 'en-US' dates/numbers (Why?!) | ||
|
||
// TODO: en-IE has just ~10 messages that are different from en-US. We should only ship those. | ||
'en-AU': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
'en-GB': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
'en-IE': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
'en-SG': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
'en-ZA': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
'en-IN': require('./en-IE.json'), // Don't fallback to en (which -> en-US) | ||
|
||
'gsw': require('./de.json'), // swiss german. identical (for our purposes) to 'de' | ||
|
||
// All locales from here have a messages file, though we allow fallback to the base locale when the files are identical | ||
'ar-XB': require('./ar-XB.json'), // psuedolocalization | ||
'ar': require('./ar.json'), | ||
'bg': require('./bg.json'), | ||
'ca': require('./ca.json'), | ||
'cs': require('./cs.json'), | ||
'da': require('./da.json'), | ||
'de': require('./de.json'), // de-AT, de-CH identical, so they fall back into de | ||
'el': require('./el.json'), | ||
'en-XA': require('./en-XA.json'), // psuedolocalization | ||
'es': require('./es.json'), | ||
'fi': require('./fi.json'), | ||
'fil': require('./fil.json'), | ||
'fr': require('./fr.json'), // fr-CH identical, so it falls back into fr | ||
'hi': require('./hi.json'), | ||
'hr': require('./hr.json'), | ||
'hu': require('./hu.json'), | ||
'id': require('./id.json'), | ||
'it': require('./it.json'), | ||
'iw': require('./iw.json'), | ||
'ja': require('./ja.json'), | ||
'ko': require('./ko.json'), | ||
'lt': require('./lt.json'), | ||
'lv': require('./lv.json'), | ||
'nl': require('./nl.json'), | ||
'no': require('./no.json'), | ||
'pl': require('./pl.json'), | ||
'pt': require('./pt.json'), // pt-BR identical, so it falls back into pt | ||
'pt-PT': require('./pt-PT.json'), | ||
'ro': require('./ro.json'), | ||
'ru': require('./ru.json'), | ||
'sk': require('./sk.json'), | ||
'sl': require('./sl.json'), | ||
'sr': require('./sr.json'), | ||
'sv': require('./sv.json'), | ||
'ta': require('./ta.json'), | ||
'te': require('./te.json'), | ||
'th': require('./th.json'), | ||
'tr': require('./tr.json'), | ||
'uk': require('./uk.json'), | ||
'vi': require('./vi.json'), | ||
'zh-CN': require('./zh-CN.json'), | ||
'zh-HK': require('./zh-HK.json'), | ||
'zh-TW': require('./zh-TW.json'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on looking more, it seems like we should have a |
||
}; | ||
|
||
module.exports = locales; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might want a command for listing available locales, but something for another day :)