svelte-i18n icon indicating copy to clipboard operation
svelte-i18n copied to clipboard

Cannot update changed messages in the dictionary

Open cbxp opened this issue 4 years ago • 1 comments

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

cbxp avatar Nov 19 '20 08:11 cbxp

It seems that the dictionary is updated, but there is no way to clear the lookupCache, so _() returns old values

cbxp avatar Nov 19 '20 09:11 cbxp