You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm opening this issue to discuss the fact that, for some reason, the i18next-tolgee adapter is failing to load some translations.
After some debugging, I figured out the issue was here:
tolgee.getAllRecords().forEach(({ language, namespace, data }) => {
if (i18n.getResourceBundle(language, namespace)) {
i18n.removeResourceBundle(language, namespace);
i18n.addResources(language, namespace, Object.fromEntries(data));
}
});
and it spats out the following error:
I'm not sure why only some translations fail (maybe a race condition on the side of i18next due to eliminating and recreating them one after the other?).
Anyway, looking at the i18next documentation, I saw that there's the addResourceBundle function for adding/overwriting resources, so with the changes proposed in this PR it works like a charm.
Hi, I'm opening this issue to discuss the fact that, for some reason, the i18next-tolgee adapter is failing to load some translations.
After some debugging, I figured out the issue was here:
and it spats out the following error:
I'm not sure why only some translations fail (maybe a race condition on the side of i18next due to eliminating and recreating them one after the other?).
Anyway, looking at the i18next documentation, I saw that there's the
addResourceBundle
function for adding/overwriting resources, so with the changes proposed in this PR it works like a charm.#3304
Please let me know if I can help with anything to accelerate solving this issue, and thank you for your awesome platform! ;)
The text was updated successfully, but these errors were encountered: