-
Notifications
You must be signed in to change notification settings - Fork 86
feat(tabs): add de-De, fr-CA, fr-FR & pt-PT status translations #7750
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
Conversation
nuria1110
left a comment
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.
Looks like the english file needs updating too since it doesn't match the format of the new translations:
tabs: {
error: () => "contains errors",
warning: () => "contains warnings",
info: () => "contains information",
},
DipperTheDan
left a comment
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.
Happy to approve once @nuria1110 's comment has been adressed.
08ea4c3 to
9b72af7
Compare
src/style/utils/extract-text.ts
Outdated
| } | ||
|
|
||
| if (Array.isArray(node)) { | ||
| return node.map(extractTextFromNode).join(""); |
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(non-blocking): If we have an array of React nodes like [<span>First</span>, <span>Second</span>], joining with an empty string produces "FirstSecond", but joining with a space produces "First Second", which is more likely what we want for accessible labels and generally reads better. I might just be thinking of an edge-case scenario though.
| return node.map(extractTextFromNode).join(""); | |
| return node.map(extractTextFromNode).join(" "); |
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.
And just so we don't forget. This and the test file will need moving to a more suitable location than style/utils.
|
🎉 This PR is included in version 158.28.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Proposed behaviour
Adds:
de-DEfr-CAfr-FRpt-PRTranslations for info, error and warning states.
es-ESwill be added a later date, consumers are advised to use a local override if needed.Current behaviour
Currently, only an
en-GBtranslation is provided for info, error and warning statesChecklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions
The
With Error And Warningstories should now have a correct accessible name which contains the tab title in every locale apart from spanish (es-ES).With Error And WarningstoryNote: you can see the original translations in the attached JSON files on the parent ticket on JIRA (FE-7580)