diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 556c424c4..884b5328c 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -59,8 +59,8 @@ } } }, - "explore": { - "title": "Explore Settings", + "classification": { + "title": "Classification Settings", "semanticSearch": { "title": "Semantic Search", "desc": "Semantic Search in Frigate allows you to find tracked objects within your review items using either the image itself, a user-defined text description, or an automatically generated one.", @@ -78,8 +78,19 @@ "large.desc": "Using large employs the full Jina model and will automatically run on the GPU if applicable." } }, + "faceRecognition": { + "title": "Face Recognition", + "desc": "Face recognition allows people to be assigned names and when their face is recognized Frigate will assign the person's name as a sub label. This information is included in the UI, filters, as well as in notifications.", + "readTheDocumentation": "Read the Documentation" + }, + "licensePlateRecognition": { + "title": "License Plate Recognition", + "desc": "Frigate can recognize license plates on vehicles and automatically add the detected characters to the recognized_license_plate field or a known name as a sub_label to objects that are of type car. A common use case may be to read the license plates of cars pulling into a driveway or cars passing by on a street.", + "readTheDocumentation": "Read the Documentation" + }, "toast": { - "success": "Explore settings have been saved." + "success": "Classification settings have been saved.", + "error": "Failed to save config changes: {{errorMessage}}" } }, "camera": { diff --git a/web/public/locales/zh-CN/views/settings.json b/web/public/locales/zh-CN/views/settings.json index a57fc87e0..e820d1e63 100644 --- a/web/public/locales/zh-CN/views/settings.json +++ b/web/public/locales/zh-CN/views/settings.json @@ -59,8 +59,8 @@ } } }, - "explore": { - "title": "探测设置", + "classification": { + "title": "分类设置", "semanticSearch": { "title": "语义搜索", "desc": "Frigate的语义搜索能够让你使用自然语言根据图像本身、自定义的文本描述或自动生成的描述来搜索视频。", @@ -78,8 +78,19 @@ "large.desc": "使用 模型。该模型采用了完整的Jina模型,并在适用的情况下使用GPU。" } }, + "faceRecognition": { + "title": "人脸识别", + "desc": "人脸识别功能允许为人物分配名称,当识别到他们的面孔时,Frigate 会将人物的名字作为子标签进行分配。这些信息会显示在界面、过滤器以及通知中。", + "readTheDocumentation": "阅读文档(英文)" + }, + "licensePlateRecognition": { + "title": "车牌识别", + "desc": "Frigate 可以识别车辆的车牌,并自动将检测到的字符添加到 recognized_license_plate 字段中,或将已知名称作为子标签添加到汽车类型的对象中。常见的使用场景可能是读取驶入车道的汽车车牌或经过街道的汽车车牌。", + "readTheDocumentation": "阅读文档(英文)" + }, "toast": { - "success": "探测设置已保存。" + "success": "分类设置已保存。", + "error": "保存配置更改失败:{{errorMessage}}" } }, "camera": { @@ -146,6 +157,11 @@ "true": "启用点对齐", "false": "禁用点对齐" }, + "delete": { + "title": "确认删除", + "desc": "你确定要删除{{type}} {{name}} 吗?", + "success": "{{name}} 已被删除。" + }, "error": { "mustBeFinished": "多边形绘制必须完成闭合后才能保存。" } diff --git a/web/src/views/settings/ClassificationSettingsView.tsx b/web/src/views/settings/ClassificationSettingsView.tsx index f6ce3c37d..c34ef37ee 100644 --- a/web/src/views/settings/ClassificationSettingsView.tsx +++ b/web/src/views/settings/ClassificationSettingsView.tsx @@ -20,6 +20,7 @@ import { SelectItem, SelectTrigger, } from "@/components/ui/select"; +import { Trans, useTranslation } from "react-i18next"; type ClassificationSettings = { search: { @@ -41,6 +42,7 @@ type ClassificationSettingsViewProps = { export default function ClassificationSettingsView({ setUnsavedChanges, }: ClassificationSettingsViewProps) { + const { t } = useTranslation("views/settings"); const { data: config, mutate: updateConfig } = useSWR("config"); const [changedValue, setChangedValue] = useState(false); @@ -141,15 +143,18 @@ export default function ClassificationSettingsView({ ) .then((res) => { if (res.status === 200) { - toast.success("Classification settings have been saved.", { + toast.success(t("classification.toast.success"), { position: "top-center", }); setChangedValue(false); updateConfig(); } else { - toast.error(`Failed to save config changes: ${res.statusText}`, { - position: "top-center", - }); + toast.error( + t("classification.toast.error", { errorMessage: res.statusText }), + { + position: "top-center", + }, + ); } }) .catch((error) => { @@ -157,14 +162,14 @@ export default function ClassificationSettingsView({ error.response?.data?.message || error.response?.data?.detail || "Unknown error"; - toast.error(`Failed to save config changes: ${errorMessage}`, { + toast.error(t("toast.save.error", { errorMessage, ns: "common" }), { position: "top-center", }); }) .finally(() => { setIsLoading(false); }); - }, [updateConfig, classificationSettings.search]); + }, [updateConfig, classificationSettings.search, t]); const onCancel = useCallback(() => { setClassificationSettings(origSearchSettings); @@ -200,19 +205,15 @@ export default function ClassificationSettingsView({
- Classification Settings + {t("classification.title")} - Semantic Search + {t("classification.semanticSearch.title")}
-

- Semantic Search in Frigate allows you to find tracked objects - within your review items using either the image itself, a - user-defined text description, or an automatically generated one. -

+

{t("classification.semanticSearch.desc")}

- Read the Documentation + {t("classification.semanticSearch.readTheDocumentation")}
@@ -242,7 +243,9 @@ export default function ClassificationSettingsView({ }} />
- +
@@ -259,31 +262,38 @@ export default function ClassificationSettingsView({ }} />
- +
- Re-indexing will reprocess all thumbnails and descriptions (if - enabled) and apply the embeddings on each startup.{" "} - Don't forget to disable the option after restarting! + + classification.semanticSearch.reindexOnStartup.desc +
-
Model Size
+
+ {t("classification.semanticSearch.modelSize.label")} +

- The size of the model used for Semantic Search embeddings. + + classification.semanticSearch.modelSize.desc +

  • - Using small employs a quantized version of the - model that uses less RAM and runs faster on CPU with a very - negligible difference in embedding quality. + + classification.semanticSearch.modelSize.small.desc +
  • - Using large employs the full Jina model and will - automatically run on the GPU if applicable. + + classification.semanticSearch.modelSize.large.desc +
@@ -309,7 +319,7 @@ export default function ClassificationSettingsView({ className="cursor-pointer" value={size} > - {size} + {t("classification.semanticSearch.modelSize." + size)} ))} @@ -322,16 +332,11 @@ export default function ClassificationSettingsView({ - Face Recognition + {t("classification.faceRecognition.title")}
-

- Face recognition allows people to be assigned names and when - their face is recognized Frigate will assign the person's name - as a sub label. This information is included in the UI, filters, - as well as in notifications. -

+

{t("classification.faceRecognition.desc")}

- Read the Documentation + {t("classification.faceRecognition.readTheDocumentation")}
@@ -361,7 +366,9 @@ export default function ClassificationSettingsView({ }} />
- +
@@ -369,18 +376,11 @@ export default function ClassificationSettingsView({ - License Plate Recognition + {t("classification.licensePlateRecognition.title")}
-

- Frigate can recognize license plates on vehicles and - automatically add the detected characters to the - recognized_license_plate field or a known name as a sub_label to - objects that are of type car. A common use case may be to read - the license plates of cars pulling into a driveway or cars - passing by on a street. -

+

{t("classification.licensePlateRecognition.desc")}

- Read the Documentation + {t( + "classification.licensePlateRecognition.readTheDocumentation", + )}
@@ -410,7 +412,9 @@ export default function ClassificationSettingsView({ }} />
- +
@@ -420,10 +424,10 @@ export default function ClassificationSettingsView({
) : ( - "Save" + t("button.save", { ns: "common" }) )}