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

@ -0,0 +1,48 @@
import { t } from "@lingui/macro";
import { useLingui } from "@lingui/react";
import { Combobox, Label } from "@reactive-resume/ui";
import { useMemo } from "react";
import { dynamicActivate, getLocales } from "@/client/libs/lingui";
import { useResumeStore } from "@/client/stores/resume";
import { getSectionIcon } from "../shared/section-icon";
export const LocaleSection = () => {
const { _ } = useLingui();
const setValue = useResumeStore((state) => state.setValue);
const locale = useResumeStore((state) => state.resume.data.metadata.locale);
const options = useMemo(() => {
return Object.entries(getLocales()).map(([value, label]) => ({
label,
value,
}));
}, [_]);
const onChangeLanguage = async (value: string) => {
setValue("metadata.locale", value);
await dynamicActivate(value);
// Update resume section titles with new locale
};
return (
<section id="locale" className="grid gap-y-6">
<header className="flex items-center justify-between">
<div className="flex items-center gap-x-4">
{getSectionIcon("locale")}
<h2 className="line-clamp-1 text-3xl font-bold">{t`Locale`}</h2>
</div>
</header>
<main className="grid gap-y-4">
<div className="space-y-1.5">
<Label>{t`Language`}</Label>
<Combobox value={locale} onValueChange={onChangeLanguage} options={options} />
</div>
</main>
</section>
);
};

View File

@ -14,7 +14,7 @@ import { getSectionIcon } from "../shared/section-icon";
const fontSuggestions = [
"Open Sans",
"Merriweather",
"CMU Serif",
"Roboto Condensed",
"Playfair Display",
"Lato",
"Lora",
@ -38,7 +38,6 @@ export const TypographySection = () => {
const loadFontSuggestions = useCallback(async () => {
fontSuggestions.forEach((font) => {
if (font === "CMU Serif") return;
webfontloader.load({
events: false,
classes: false,