feat: load custom translations from datastore #950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Fetches translations in the form of JSON from the datastore and adds them to
i18ntranslation bundles-- There's currently a race condition though that needs addressing: bundles need to be loaded by
i18nextbefore components are rendered; the bundle updates won't trigger rerenders for react componentsWe 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:dataStore/custom-translationsin parallel withuserSettingsinuseLocale<app>--<locale>key is in there, THEN await the request todataStore/customTranslations/<appName>--<locale>Before adding translations:

After adding translations:
