fix: fix classification pages none label i18n

This commit is contained in:
ZhaiSoul 2025-12-17 10:52:25 +00:00
parent 78eace258e
commit a4c8c72a77
5 changed files with 13 additions and 6 deletions

View File

@ -1,7 +1,9 @@
{
"documentTitle": "Classification Models - Frigate",
"details": {
"scoreInfo": "Score represents the average classification confidence across all detections of this object."
"scoreInfo": "Score represents the average classification confidence across all detections of this object.",
"none": "None",
"unknown": "Unknown"
},
"button": {
"deleteClassificationAttempts": "Delete Classification Images",
@ -83,7 +85,6 @@
"aria": "Select Recent Classifications"
},
"categories": "Classes",
"none": "None",
"createCategory": {
"new": "Create New Class"
},

View File

@ -161,7 +161,11 @@ export const ClassificationCard = forwardRef<
)}
>
<div className="smart-capitalize">
{data.name == "unknown" ? t("details.unknown") : data.name}
{data.name == "unknown"
? t("details.unknown")
: data.name == "none"
? t("details.none")
: data.name}
</div>
{data.score != undefined && (
<div

View File

@ -132,7 +132,7 @@ export default function ClassificationSelectionDialog({
onClick={() => onCategorizeImage(category)}
>
{category === "none"
? t("none")
? t("details.none")
: category.replaceAll("_", " ")}
</SelectorItem>
))}

View File

@ -170,7 +170,9 @@ export function ClassFilterContent({
<FilterSwitch
key={item}
label={
item === "none" ? t("none") : item.replaceAll("_", " ")
item === "none"
? t("details.none", { ns: "views/classificationModel" })
: item.replaceAll("_", " ")
}
isChecked={classes?.includes(item) ?? false}
onCheckedChange={(isChecked) => {

View File

@ -707,7 +707,7 @@ function LibrarySelector({
className="flex-grow cursor-pointer capitalize"
onClick={() => setPageToggle(id)}
>
{id === "none" ? t("none") : id.replaceAll("_", " ")}
{id === "none" ? t("details.none") : id.replaceAll("_", " ")}
<span className="ml-2 text-muted-foreground">
({dataset?.[id].length})
</span>