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

EUI labels not translating #74657

Closed
zumo64 opened this issue Aug 10, 2020 · 9 comments · Fixed by #106377
Closed

EUI labels not translating #74657

zumo64 opened this issue Aug 10, 2020 · 9 comments · Fixed by #106377
Assignees
Labels
bug Fixes for quality problems that affect the customer experience EUI Project:i18n Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@zumo64
Copy link
Contributor

zumo64 commented Aug 10, 2020

Kibana version:
verified in 7.6.1

Elasticsearch version:

Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Describe the bug:

"Show Dates" (core.euiSuperDatePicker.showDatesButtonLabel) and the associated "Refresh" button (see screenshot attached) are not translated when using Kibana with a different locale.

Expected behavior:
Translation for these 2 labels should apply.

Screenshots (if relevant):
image

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@zumo64 zumo64 changed the title EIU labels not translating EUI labels not translating Aug 10, 2020
@alexfrancoeur alexfrancoeur added bug Fixes for quality problems that affect the customer experience REASSIGN from Team:Core UI Deprecated label for old Core UI team labels Aug 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core-ui (Team:Core UI)

@zumo64
Copy link
Contributor Author

zumo64 commented Sep 1, 2020

Hi @Bamieh do you have any update for this issue ?

@myasonik myasonik added the EUI label Sep 1, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/eui-design (EUI)

@chandlerprall
Copy link
Contributor

Confirmed this is also an issue on the master branch. I updated the default message in

defaultMessage: 'Show dates',
and confirmed that renders as expected, so there is something missing in Kibana which is preventing the translation values from propagating through.

Inspecting the component tree, it appears the PseudoLocaleWrapper is not providing the translated values to EuiContext.

@mshustov mshustov self-assigned this Feb 28, 2021
@pgayvallet pgayvallet added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc and removed REASSIGN from Team:Core UI Deprecated label for old Core UI team labels Apr 13, 2021
@pgayvallet
Copy link
Contributor

Cannot reproduce on current master, both labels are correctly translated when switching to zh-CN

Dashboard

Screenshot 2021-04-14 at 10 21 53

Discover

Screenshot 2021-04-14 at 10 21 32

@Bamieh are you aware of any changes that could have fixed that on the past year?

@Bamieh
Copy link
Member

Bamieh commented Apr 21, 2021

@pgayvallet The tracker issue we have for this is Add test for eui tokens coverage.

This part of the UI gets internationalized and de-internationalized from version to version. At the moment it is working but probably within a few releases some changes will break it again.

We need to add tests to make sure we have full eui tokens i18n coverage in our eui mappings file (https://github.com/elastic/kibana/blob/master/src/core/public/i18n/i18n_eui_mapping.tsx)

This means we need to expose the tokens in eui first then grab that file in a unit test and make sure we have all the labels in the object.

Right now EUI package build process (yarn build) begins by executing yarn extract-i18n-strings, which generates i18ntokens.json. To better coordinate that into the release, we can move that extract-i18n-strings command into scripts/compile-eui.js, which could then copy the result from src-docs/src/i18ntokens.json into the dist directory, which should include it in the npm package.

@afharo
Copy link
Member

afharo commented Apr 30, 2021

I've created elastic/eui#4771 so @elastic/eui publishes i18ntokens.json in their NPM package. Once it's published, and Kibana is updated to that version, I'll follow up with the changes in Kibana to validate that we are not missing any keys :)

@afharo
Copy link
Member

afharo commented May 6, 2021

The PR to upgrade @elastic/eui to the version containing i18ntokens.json is #99382. When that's merged, I'll follow up with adding the tests.

@afharo
Copy link
Member

afharo commented May 11, 2021

Status update: The PR #99613 adds the tests and corrects any mismatches, but it's blocked by the works in #99382, dealing with the changes required in Kibana to upgrade @elastic/eui to v33.0.0. Once #99382 is merged, we can rebase #99613 and submit it for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience EUI Project:i18n Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
9 participants