From e8ffb2c023e74e6b46623aaf131544312ef829ab Mon Sep 17 00:00:00 2001 From: Ased Mammad Date: Sat, 9 Mar 2024 03:33:20 +0330 Subject: [PATCH] fix: configure i18next to not return empty strings --- i18next-parser.config.ts | 4 +--- src/lib/i18n/index.ts | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/i18next-parser.config.ts b/i18next-parser.config.ts index 0db38bd36..37ce57ee1 100644 --- a/i18next-parser.config.ts +++ b/i18next-parser.config.ts @@ -10,9 +10,7 @@ export default { contextSeparator: '_', createOldCatalogs: false, defaultNamespace: 'translation', - defaultValue: function (locale, namespace, key, value) { - return key; - }, + defaultValue: '', indentation: 2, keepRemoved: false, keySeparator: false, diff --git a/src/lib/i18n/index.ts b/src/lib/i18n/index.ts index 1a45f7ac8..43aec1644 100644 --- a/src/lib/i18n/index.ts +++ b/src/lib/i18n/index.ts @@ -56,6 +56,7 @@ i18next default: ['en'] }, ns: 'translation', + returnEmptyString: false, interpolation: { escapeValue: false // not needed for svelte as it escapes by default }