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": {
"apply": "Apply",
"reset": "Reset",
"done": "Done",
"enabled": "Enabled",
"enable": "Enable",
"disabled": "Disabled",

View File

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

View File

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

View File

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

View File

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