-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Maori support #125
Add Maori support #125
Conversation
lib/common.js
Outdated
aliases: { | ||
'en-AU': 'en-GB' | ||
} | ||
}; |
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.
What's this stuff for?
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.
This is to replace frau-locale-provider
stuff.
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.
Cool. Just wondering what value it has here vs. in frau-localize-provider
directly and having frau-locale-provider
import defaultLocale
, supportedBaseLocales
and supportedLocalesDetails
from here. Just don't love this library needing to know about "frau" or "FRAs" at all.
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.
Good point! I'll make that change.
lib/common.js
Outdated
@@ -25,6 +27,15 @@ export const supportedLocalesDetails = [ | |||
]; | |||
export const supportedLocales = supportedLocalesDetails.map((l) => l.code); |
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.
Haha these different lists are pretty confusing and I was responsible for making some/all of them! Is it:
supportedLocales
: full base + regional codes... not sure what this is actually used for?supportedLocalesDetails
: only used in core demo snippetsupportedBaseLocales
: supported locales but just the base part... seems to only be used within IntlsupportedLangpacks
: are these the full langpack codes coming out of Brightspace?
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.
supportedLocales
: looks to only be used in tests in this repo, but is the same asfrauConfig.regions
, with different casesupportedLocalesDetails
: I'd like to expand this with more keys and use it (or a mapped version ofit) instead ofsupportedLocales
,supportedBaseLocales
, andsupportedLangpacks
supportedBaseLocales
: Yeah, this could be generated in place in the testssupportedLangpacks
: These are the codes coming out of serge/TIE, and should map 1:1 with lang files
months = [ | ||
['Kohitātea', 'Huitanguru', 'Poutūterangi', 'Paengawhāwhā', 'Haratua', 'Pipiri', 'Hōngongoi', 'Hereturikōkā', 'Mahuru', 'Whiringa-ā-nuku', 'Whiringa-ā-rangi', 'Hakihea'], | ||
['Kohi', 'Hui', 'Pou', 'Pae', 'Hara', 'Pipi', 'Hōngo', 'Here', 'Mahu', 'Nuku', 'Rangi', 'Haki'] | ||
]; | ||
days = [ | ||
['Rātapu', 'Rāhina', 'Rātū', 'Rāapa', 'Rāpare', 'Rāmere', 'Rāhoroi'], | ||
['Tap', 'Hin', 'Tū', 'Apa', 'Par', 'Mer', 'Hor'], | ||
['T', 'H', 'T', 'A', 'P', 'M', 'H'] |
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.
These are now confirmed correct.
🎉 This PR is included in version 3.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
US156955: Intl
Adds Maori support to date/time, numbers, and supported lang/locales. Also moves some commonly repeated lang/locale lists into Intl, which can be imported from here going forward.
More list changes to come later.