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", "documentTitle": "Classification Models - Frigate",
"details": { "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": { "button": {
"deleteClassificationAttempts": "Delete Classification Images", "deleteClassificationAttempts": "Delete Classification Images",
@ -83,7 +85,6 @@
"aria": "Select Recent Classifications" "aria": "Select Recent Classifications"
}, },
"categories": "Classes", "categories": "Classes",
"none": "None",
"createCategory": { "createCategory": {
"new": "Create New Class" "new": "Create New Class"
}, },

View File

@ -161,7 +161,11 @@ export const ClassificationCard = forwardRef<
)} )}
> >
<div className="smart-capitalize"> <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> </div>
{data.score != undefined && ( {data.score != undefined && (
<div <div

View File

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

View File

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

View File

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