fix(i18n): delete local translations

This commit is contained in:
Amruth Pillai
2023-11-10 13:14:44 +01:00
parent d8c605d047
commit 48727be809
65 changed files with 143 additions and 70442 deletions

View File

@ -1,6 +1,8 @@
import { i18n } from "@lingui/core";
import { t } from "@lingui/macro";
import { axios } from "./axios";
type Locale = "en-US" | "de-DE" | "zu-ZA";
export const defaultLocale = "en-US";
@ -20,7 +22,8 @@ export const getLocales = () => {
};
export async function dynamicActivate(locale: string) {
const { messages } = await import(`../locales/${locale}/messages.po`);
const response = await axios(`translation/${locale}`);
const messages = await response.data;
i18n.load(locale, messages);
i18n.activate(locale);