Skip to content

[i18n] Generate EUI tokens mapping automatically from i18ntokens.json #99759

@afharo

Description

@afharo

As a follow up to #99613, we might want to stop maintaining a manual mapping of the EUI i18n tokens to Kibana's core.{TOKEN}.

The function getEuiContextMapping could loop through each element in @elastic/eui/i18ntokens.json and register them as i18n.translate(`core.{TOKEN}`, {...}). The logic might need to identify when values are required to wrap them in a function.

Pending questions:

  • How to identify when to call i18n.translate or FormattedMessage? There are some entries that preferred FormattedMessage for some reason.
  • What changes are required in the i18n-tools (i18n_integrate, i18n_check, i18n_extract)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Project:i18nTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//technical debtImprovement of the software architecture and operational architecture

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions