Use default namespace for i18next (#24322)

This commit is contained in:
Jon Koops 2023-10-27 18:25:59 +02:00 committed by GitHub
parent ea398c21da
commit 357f3b2978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View file

@ -6,7 +6,6 @@ import { environment } from "./environment";
import { joinPath } from "./utils/joinPath";
const DEFAULT_LOCALE = "en";
const DEFAULT_NAMESPACE = "translation";
// This type is aliased to any, so that we can find all the places where we use it.
// In the future all casts to this type should be removed from the code, so
@ -14,9 +13,7 @@ const DEFAULT_NAMESPACE = "translation";
export type TFuncKey = any;
export const i18n = createInstance({
defaultNS: DEFAULT_NAMESPACE,
fallbackLng: DEFAULT_LOCALE,
ns: [DEFAULT_NAMESPACE],
interpolation: {
escapeValue: false,
},

View file

@ -6,15 +6,11 @@ import { joinPath } from "../utils/joinPath";
import { OverridesBackend } from "./OverridesBackend";
export const DEFAULT_LOCALE = "en";
export const DEFAULT_NAMESPACE = "translation";
export const KEY_SEPARATOR = ".";
export const i18n = createInstance({
fallbackLng: DEFAULT_LOCALE,
defaultNS: DEFAULT_NAMESPACE,
fallbackNS: DEFAULT_NAMESPACE,
keySeparator: KEY_SEPARATOR,
ns: DEFAULT_NAMESPACE,
interpolation: {
escapeValue: false,
},