Translations

This commit is contained in:
Nicolas Mowen 2025-03-17 09:55:20 -06:00
parent 1fbdbd05c1
commit f1ff9107f4
5 changed files with 18 additions and 16 deletions

View File

@ -64,6 +64,7 @@
"button": { "button": {
"apply": "Apply", "apply": "Apply",
"reset": "Reset", "reset": "Reset",
"done": "Done",
"enabled": "Enabled", "enabled": "Enabled",
"enable": "Enable", "enable": "Enable",
"disabled": "Disabled", "disabled": "Disabled",

View File

@ -1,4 +1,7 @@
{ {
"description": {
"addFace": "Walk through adding a new face to the Face Library."
},
"documentTitle": "Face Library - Frigate", "documentTitle": "Face Library - Frigate",
"uploadFaceImage": { "uploadFaceImage": {
"title": "Upload Face Image", "title": "Upload Face Image",
@ -19,12 +22,13 @@
"uploadImage": "Upload Image", "uploadImage": "Upload Image",
"reprocessFace": "Reprocess Face" "reprocessFace": "Reprocess Face"
}, },
"readTheDocs": "Read the documentation to view more details on refining images for the Face Library",
"trainFaceAs": "Train Face as:", "trainFaceAs": "Train Face as:",
"trainFaceAsPerson": "Train Face as Person", "trainFaceAsPerson": "Train Face as Person",
"toast": { "toast": {
"success": { "success": {
"uploadedImage": "Successfully uploaded image.", "uploadedImage": "Successfully uploaded image.",
"addFaceLibrary": "Successfully add face library.", "addFaceLibrary": "{{name}} has successfully been added to the Face Library!",
"deletedFace": "Successfully deleted face.", "deletedFace": "Successfully deleted face.",
"trainedFace": "Successfully trained face.", "trainedFace": "Successfully trained face.",
"updatedFaceScore": "Successfully updated face score." "updatedFaceScore": "Successfully updated face score."

View File

@ -100,10 +100,8 @@ export default function CreateFaceWizardDialog({
> >
<Content> <Content>
<Header> <Header>
<Title>Add New Face</Title> <Title>{t("button.addFace")}</Title>
<Description> <Description>{t("description.addFace")}</Description>
Walk through adding a new face to the Face Library.
</Description>
</Header> </Header>
<StepIndicator steps={STEPS} currentStep={step} /> <StepIndicator steps={STEPS} currentStep={step} />
{step == 0 && ( {step == 0 && (
@ -132,7 +130,6 @@ export default function CreateFaceWizardDialog({
)} )}
{step == 2 && ( {step == 2 && (
<div> <div>
{name} has successfully been added to the Face Library!
<div className="text-s my-4 flex items-center text-secondary-foreground"> <div className="text-s my-4 flex items-center text-secondary-foreground">
<Link <Link
to="https://docs.frigate.video/configuration/face_recognition" to="https://docs.frigate.video/configuration/face_recognition"
@ -140,16 +137,13 @@ export default function CreateFaceWizardDialog({
rel="noopener noreferrer" rel="noopener noreferrer"
className="inline" className="inline"
> >
{t("classification.faceRecognition.readTheDocumentation", { {t("readTheDocs")}
ns: "views/settings",
})}{" "}
to view more details on refining images for the Face Library
<LuExternalLink className="ml-2 inline-flex size-3" /> <LuExternalLink className="ml-2 inline-flex size-3" />
</Link> </Link>
</div> </div>
<div className="flex justify-end"> <div className="flex justify-end">
<Button variant="select" onClick={() => handleReset()}> <Button variant="select" onClick={() => handleReset()}>
Done {t("button.done", { ns: "common" })}
</Button> </Button>
</div> </div>
</div> </div>

View File

@ -29,7 +29,7 @@ export default function TextEntryDialog({
defaultValue = "", defaultValue = "",
allowEmpty = false, allowEmpty = false,
}: TextEntryDialogProps) { }: TextEntryDialogProps) {
const { t } = useTranslation("components/dialog"); const { t } = useTranslation("common");
return ( return (
<Dialog open={open} defaultOpen={false} onOpenChange={setOpen}> <Dialog open={open} defaultOpen={false} onOpenChange={setOpen}>
@ -45,10 +45,10 @@ export default function TextEntryDialog({
> >
<DialogFooter className="pt-4"> <DialogFooter className="pt-4">
<Button type="button" onClick={() => setOpen(false)}> <Button type="button" onClick={() => setOpen(false)}>
{t("button.cancel", { ns: "common" })} {t("button.cancel")}
</Button> </Button>
<Button variant="select" type="submit"> <Button variant="select" type="submit">
{t("button.save", { ns: "common" })} {t("button.save")}
</Button> </Button>
</DialogFooter> </DialogFooter>
</TextEntry> </TextEntry>

View File

@ -8,6 +8,7 @@ import {
DialogHeader, DialogHeader,
DialogTitle, DialogTitle,
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import { useTranslation } from "react-i18next";
type UploadImageDialogProps = { type UploadImageDialogProps = {
open: boolean; open: boolean;
@ -23,6 +24,8 @@ export default function UploadImageDialog({
setOpen, setOpen,
onSave, onSave,
}: UploadImageDialogProps) { }: UploadImageDialogProps) {
const { t } = useTranslation("common");
return ( return (
<Dialog open={open} defaultOpen={false} onOpenChange={setOpen}> <Dialog open={open} defaultOpen={false} onOpenChange={setOpen}>
<DialogContent> <DialogContent>
@ -32,9 +35,9 @@ export default function UploadImageDialog({
</DialogHeader> </DialogHeader>
<ImageEntry onSave={onSave}> <ImageEntry onSave={onSave}>
<DialogFooter className="pt-4"> <DialogFooter className="pt-4">
<Button onClick={() => setOpen(false)}>Cancel</Button> <Button onClick={() => setOpen(false)}>{t("button.cancel")}</Button>
<Button variant="select" type="submit"> <Button variant="select" type="submit">
Save {t("button.save")}
</Button> </Button>
</DialogFooter> </DialogFooter>
</ImageEntry> </ImageEntry>