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

[i18n] Support user defined component #5337

Merged
merged 9 commits into from
Nov 1, 2021

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Oct 29, 2021

Summary

Replaces #5236, which got into a bad git state (cc @ym)

We noticed that Chrome's built-in translation feature will break any page with EuiTable.

After investigation, I found that it's caused by the <Fragment> component used by EuiI18n and React or Chrome Trasnlate can't work together when we're using <Fragment> rather than a real DOM component here.

I see i18next has the option to use a different component and we can use the same approach in Eui to make a workaround. That's what the PR is for.

Reference:

[1] i18next/react-i18next#1254
[2] facebook/react#17256

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile

- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@thompsongl
Copy link
Contributor Author

FWIW I was going to approve the original PR after I added 489d981

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5337/

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA and basic functionality LGTM! I have some minor comments around the documentation/demo, but they're not blocking

src-docs/src/views/i18n/context.js Show resolved Hide resolved
src-docs/src/views/i18n/context.js Show resolved Hide resolved
src/components/context/context.tsx Outdated Show resolved Hide resolved
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5337/

@thompsongl thompsongl merged commit 8393e42 into elastic:master Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants