Revert silentTranslationWarn change

This commit is contained in:
Adam Stachowicz 2021-10-04 23:33:52 +02:00
parent 8ae64843fc
commit 4da63c5fb8

View file

@ -3,9 +3,9 @@ import bgBG from "./languages/bg-BG";
import daDK from "./languages/da-DK"; import daDK from "./languages/da-DK";
import deDE from "./languages/de-DE"; import deDE from "./languages/de-DE";
import en from "./languages/en"; import en from "./languages/en";
import fa from "./languages/fa";
import esEs from "./languages/es-ES"; import esEs from "./languages/es-ES";
import etEE from "./languages/et-EE"; import etEE from "./languages/et-EE";
import fa from "./languages/fa";
import frFR from "./languages/fr-FR"; import frFR from "./languages/fr-FR";
import hu from "./languages/hu"; import hu from "./languages/hu";
import itIT from "./languages/it-IT"; import itIT from "./languages/it-IT";
@ -52,12 +52,13 @@ const rtlLangs = ["fa"];
export const currentLocale = () => localStorage.locale || "en"; export const currentLocale = () => localStorage.locale || "en";
export const localeDirection = () => { export const localeDirection = () => {
return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr" return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr";
} };
export const i18n = createI18n({ export const i18n = createI18n({
locale: currentLocale(), locale: currentLocale(),
fallbackLocale: "en", fallbackLocale: "en",
silentFallbackWarn: true, silentFallbackWarn: true,
silentTranslationWarn: process.env.NODE_ENV !== "development", silentTranslationWarn: true,
messages: languageList, messages: languageList,
}); });