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

chore: fix i18n imports and usage #1380

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Nov 18, 2022

Key features

  1. use the same import for i18n everywhere
  2. ensure i18n.t gets executed for all translatable strings

Description

We had 2 ways of import i18n in the library.
I don't think we had problems due to this, but for consistency sake and to avoid possible issues, it's good to import everywhere from the same place.
Importing from locales/index.js ensures that the library translations are added and are available in the consumer apps.

Some strings did not show translated in consumer apps, the reason is likely marking i18n.t strings in static constants or objects, in that case the i18n.t function is not called at runtime.

Make them all the same and import from locales/index.js to ensure the
translations are always added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant