Kaynağa Gözat

fix: configure i18next to not return empty strings

Ased Mammad 1 yıl önce
ebeveyn
işleme
e8ffb2c023
2 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 1 3
      i18next-parser.config.ts
  2. 1 0
      src/lib/i18n/index.ts

+ 1 - 3
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,

+ 1 - 0
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
 		}