-
Notifications
You must be signed in to change notification settings - Fork 86
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 additional locale support to Carbon #6731
Conversation
src/locales/en-gb.ts
Outdated
@@ -229,3 +229,4 @@ const enGB: Locale = { | |||
}; | |||
|
|||
export default enGB; | |||
export { enGB }; |
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.
suggestion: lets just make the breaking change an update the default export in the index and remove this
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.
Goof stuff @tomdavies73 I think we should make the breaking change I mention below as part of this PR, I also think we should tweak the commit message slightly (I've pinged you on slack about that). I think the rest of it looks fine, but perhaps we have a chat in office on Thursday with Will as well and iron out anything else we think needs to
docs/i18n.mdx
Outdated
switch: { | ||
on: () => "sur", | ||
off: () => "de", | ||
locale: () => "eo-EO", |
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.
suggestion: believe for Esperanto it would just be eo
As there is no regional option? Nice flex though. Just not sure it's the ideal example, but shouldn't cause any problems.
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.
suggstion: add caveat that we only officially support enGB locale
We need to stipulate that we don't officially support the other locales and that they're provided as an open source implementation only. We aren't responsible for any mistakes and a PR should be raised for corrections
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.
suggestion: add info about fall back to enGB
568c4be
to
4297940
Compare
docs/i18n.mdx
Outdated
|
||
| Component | Link to translation keys table | | ||
|-----------------------|-------------------------------------------------------------------------------------------| | ||
| actions | [Table](https://carbon.sage.com/?path=/docs/pod--docs#translation-keys) | |
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.
question(non-blocking): why are we using absolute links rather than relative?
BREAKING CHANGE: Changes the named export of the en-gb locale from EnGb to enGB
🎉 This PR is included in version 137.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Proposed behaviour
Adds native locale support for
de-DE
,en-CA
,en-US
,es-ES
,fr-FR
andfr-CA
. The only distinction betweenen-CA
anden-US
compared toen-GB
currently is date formatting.de-DE
,es-ES
andfr-FR
are completely new locales.fr-CA
has also been added which inherits the translations provided infr-FR
but some specific locale objects are overridden due to language variation.PLEASE NOTE: Not all translations have been provided, you will find for some locale objects either the
"NO TRANSLATION PROVIDED"
string has been passed or the locale objects using string interpolation have been left empty. We have requested these translations, and they are in the process of being translated by the translations team. This PR will not be merged until we have all required translations.Our
i18n
documentation has also been updated to represent these new changes, and to improve the general quality of the documentation overall.Current behaviour
Currently, only the
en-GB
locale is supported in Carbon.Checklist
d.ts
file added or updated if requiredQA
Additional context
Testing instructions