Skip to content
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

Merged
merged 5 commits into from
Oct 24, 2023
Merged

Add Maori support #125

merged 5 commits into from
Oct 24, 2023

Conversation

bearfriend
Copy link
Contributor

@bearfriend bearfriend commented Oct 24, 2023

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.

@bearfriend bearfriend requested a review from a team as a code owner October 24, 2023 14:21
lib/common.js Outdated
aliases: {
'en-AU': 'en-GB'
}
};
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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);
Copy link
Member

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 snippet
  • supportedBaseLocales: supported locales but just the base part... seems to only be used within Intl
  • supportedLangpacks: are these the full langpack codes coming out of Brightspace?

Copy link
Contributor Author

@bearfriend bearfriend Oct 24, 2023

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 as frauConfig.regions, with different case
  • supportedLocalesDetails: I'd like to expand this with more keys and use it (or a mapped version ofit) instead of supportedLocales, supportedBaseLocales, and supportedLangpacks
  • supportedBaseLocales: Yeah, this could be generated in place in the tests
  • supportedLangpacks: These are the codes coming out of serge/TIE, and should map 1:1 with lang files

Comment on lines +831 to +838
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']
Copy link
Contributor Author

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.

@bearfriend bearfriend merged commit 24fcc45 into main Oct 24, 2023
1 check passed
@bearfriend bearfriend deleted the maori branch October 24, 2023 19:32
@ghost
Copy link

ghost commented Oct 24, 2023

🎉 This PR is included in version 3.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants