Removing debug variable from i18n init

This commit is contained in:
André Glatzl committed 2020-11-13 12:31:09 +01:00
1 parent e14135d96c
commit 5190057a9c
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ import de_DE from "./de_DE.json";
import en_US from "./default.json";
import pt_PT from "./pt_PT.json";
const initI18n = (debug = true) => {
const initI18n = () => {
i18n.use(initReactI18next).init({
interpolation: {
escapeValue: false,
+5 -5
View File
@@ -4,7 +4,7 @@ import { initI18n, i18n, en_US, de_DE, pt_PT } from "./i18n";
describe("i18n configuration", () => {
beforeEach(() => {
initI18n(false);
initI18n();
});
it("en_US and de_DE should have same keys", () => {
const en_US_Keys = Object.keys(en_US);
@@ -37,7 +37,7 @@ describe("i18n configuration", () => {
describe("i18n process.env is unset", () => {
beforeEach(() => {
delete process.env.DEFAULT_LANGUAGE;
initI18n(false);
initI18n();
});
it("translation of key should match", () =>
@@ -57,7 +57,7 @@ describe("i18n process.env is unset", () => {
describe("i18n process.env is en_US", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "en_US";
initI18n(false);
initI18n();
});
it("translation of key should match", () =>
@@ -77,7 +77,7 @@ describe("i18n process.env is en_US", () => {
describe("i18n process.env is de_DE", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "de_DE";
initI18n(false);
initI18n();
});
it("translation of key should match", () =>
@@ -97,7 +97,7 @@ describe("i18n process.env is de_DE", () => {
describe("i18n process.env is pt_PT", () => {
beforeEach(() => {
process.env.DEFAULT_LANGUAGE = "pt_PT";
initI18n(false);
initI18n();
});
it("translation of key should match", () =>