fix: changes to plugins translations were not effective until restart
Massimo Melina committed
Dec 10, 2024 at 14:20 UTC
04ce3bf48587bcb263eededdd397dd0d5490190f
1 file changed
+1
-1
src/lang.ts
+1
-1
@@ -42,7 +42,7 @@ export async function getLangData(ctxOrLangCsv: Koa.Context | string) {
42
try { ret[k] = JSON.parse(await readFile(fn, 'utf8')) } // allow external files to override embedded translations
43
catch {
44
if (hasProp(EMBEDDED_TRANSLATIONS, k))
45
- ret[k] = EMBEDDED_TRANSLATIONS[k]
45
+ ret[k] = _.cloneDeep(EMBEDDED_TRANSLATIONS[k])
46
else {
47
do { k = k.substring(0, k.lastIndexOf('-'))
48
} while (k && langs.includes(k))