Kibana: i18n test locale not translating everything

Created on 8 Apr 2020  路  9Comments  路  Source: elastic/kibana

Some phrases in the Kibana are not translated properly using the en-xa test locale. I didn't find a pattern yet what causes this, all places I've found seem to use i18n.translate or FormattedMessage properly:

Screenshot 2020-04-08 at 11 14 56
Screenshot 2020-04-08 at 11 16 13
Screenshot 2020-04-08 at 11 17 38

i18n Localization bug

Most helpful comment

We do have a localization team on github so i think it should go there @elastic/kibana-localization. (Here is a pr to update the file https://github.com/elastic/kibana/pull/63354)

All i18n messages should be translated using the en-xa to the psuedo locale. So I believe this is a bug. I'll try to have this prioratized to investigate further.

All 9 comments

Pinging @elastic/kibana-platform (Team:Platform)

I did not know about this en-xa locale, however from a quick grep I think this is an expected behavior of this locale?

https://github.com/elastic/kibana/blob/848121fb2e02f0b2627eddb4b043381301640ff0/packages/kbn-i18n/src/core/pseudo_locale.ts#L24-L45

Or is the issue here that every message should be displayed with this en-xa locale and are not?

Exactly, from my understanding every message should be displayed with this locale. Platform is probably the wrong team. @Bamieh do you know who to ping?

Platform is probably the wrong team

I see /src/legacy/server/i18n/ @elastic/kibana-platform in CODEOWNERS, so maybe we are the good one. @joshdover are we officially in charge of packages/kbn-i18n ?

No I think that is just outdated from before localization was split out from the Platform team. @Bamieh should be able to help us out here, and I think we should reassign the code owners to @elastic/pulse

Pinging @elastic/kibana-localization (Team:Localization)

We do have a localization team on github so i think it should go there @elastic/kibana-localization. (Here is a pr to update the file https://github.com/elastic/kibana/pull/63354)

All i18n messages should be translated using the en-xa to the psuedo locale. So I believe this is a bug. I'll try to have this prioratized to investigate further.

@Bamieh friendly bump on this one. We have at least one customer who is using the en-xa locale to find strings in the UI that are translatable so that they can provide custom translations for their needed locales. With this feature sort of broken, they're having a harder time determining which strings they can translate. I have pointed them to the i18n_extract tool as a stop-gap, but I think this feature is also helpful.

Our recommended process to creating custom translation is the following:

  1. Extract labels into the en.json file in a custom plugin like this:
    node scripts/i18n_extract --output-dir .\plugins\<custom-plugin>\translations --output-format json

  2. Copy the file under the <locale>.json name in the same folder.

  3. Apply the translations to the locale file.

  4. Update the .i18nrc.json file in custom plugin root to include the translations file path.

  5. Verify the file like this:
    node .\scripts\i18n_check.js --fix --include-config .\plugins\<custom-plugin>\.i18nrc.json

The en-xa is used to verify that we have all of our kibana strings internationalized. We are depending less on it internally by improving our checker and tests.

Was this page helpful?
0 / 5 - 0 ratings