-
Notifications
You must be signed in to change notification settings - Fork 843
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
I18n debug #1541
I18n debug #1541
Conversation
Hmm, can we put the toggle in a less prominent place in the docs? Maybe it's another option in the dropdown? @snide ? |
Yep. I'll provide a design PR for this tomorrow. Off hand a gear popover that has all these kinds of toggles in one place would be good. I think we can also likely remove the K6 themes (not the dist) from the docs at this point since EUI should essentially be locked for 6.x now. |
scripts/babel/fetch-i18n-strings.js
Outdated
} | ||
|
||
function handleJSXPath(path) { | ||
if (path.node.name.name === 'EuiI18n') { |
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 also checked below, for the JSXOpeningElement
handler. Is it needed here also?
scripts/babel/fetch-i18n-strings.js
Outdated
} | ||
|
||
(async () => { | ||
const files = (await asyncGlob( |
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.
You could use glob.sync
to simplify things.
const CHARS_FOR_PSEUDO_LOCALIZATION_REGEX = /[a-z]/gi; | ||
|
||
/** | ||
* Replaces every latin char by pseudo char and repeats every third char twice. |
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.
Iä! Iä! Cthulhu fhtagn!
Summary
Re-doing PR from #1512 as I managed to merge that (and then revert it) while writing this summary.
Huge thanks to @lizozom for initial setup for this work.
toggle for pseudo-translation, showing text that has been localized
Toggle is only present in development environments. It's kinda ugly, could use a design pass.
new I18n Tokens docs page
Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] This was checked for breaking changes and labeled appropriately- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components