chore(i18n): update zu-ZA translations

This commit is contained in:
Amruth Pillai
2023-11-10 11:22:19 +01:00
parent 1057d390da
commit f3ad994753
19 changed files with 1666 additions and 135 deletions

View File

@ -1,12 +1,23 @@
import { i18n } from "@lingui/core";
import { t } from "@lingui/macro";
type Locale = "en-US" | "de-DE" | "zu-ZA";
export const defaultLocale = "en-US";
export const getLocales = () => ({
"en-US": t`English`,
"de-DE": t`German`,
});
export const getLocales = () => {
const locales = {
"en-US": t`English`,
"de-DE": t`German`,
} as Record<Locale, string>;
if (process.env.NODE_ENV === "development") {
// eslint-disable-next-line lingui/no-unlocalized-strings
locales["zu-ZA"] = "Pseudolocalization";
}
return locales;
};
export async function dynamicActivate(locale: string) {
const { messages } = await import(`../locales/${locale}/messages.po`);