svelte-i18n
svelte-i18n copied to clipboard
Cannot update changed messages in the dictionary
Describe the bug Snowpack hot reload receives updated json translations and tries to pass them to addMessages() again. However, _() still returns old texts after that.
To Reproduce Just call addMessages() twice with different texts and see that second call has no effect.
Expected behavior I expect the addMessages() to override the texts, so that _() would return new ones.
Information about your project:
-
Your browser and the version: any
-
svelte-i18n
version 3.2.5 -
Whether your project uses Webpack or Rollup: Snowpack
It seems that the dictionary is updated, but there is no way to clear the lookupCache
, so _() returns old values