Skip to content

Conversation

@KaiVandivier
Copy link
Contributor

@KaiVandivier KaiVandivier commented Jan 26, 2026

Fetches translations in the form of JSON from the datastore and adds them to i18n translation bundles

-- There's currently a race condition though that needs addressing: bundles need to be loaded by i18next before components are rendered; the bundle updates won't trigger rerenders for react components

We shouldn't add another request that the app needs to wait on before in series before loading (especially if there aren't custom translations), so that shouldn't be awaited on every load. There are a couple options:

  1. Make a request to dataStore/custom-translations in parallel with userSettings in useLocale
    1. If the target <app>--<locale> key is in there, THEN await the request to dataStore/customTranslations/<appName>--<locale>
  2. Set up a mechanism to rerender the app when a new translation bundle is added

Before adding translations:
translations-before

After adding translations:
translations-after

@sonarqubecloud
Copy link

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.

2 participants