mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
chore(i18n): update zu-ZA translations
This commit is contained in:
@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user