mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
i18n miscellaneous fixes (#21614)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* fix: fix face library unknown label i18n wrong * fix: fix review genai threat level i18n * fix: fix preview unknown label i18n * fix: fix AM/PM i18n display issue
This commit is contained in:
parent
7b5a1b7284
commit
91cc6747b6
@ -164,7 +164,7 @@ export const ClassificationCard = forwardRef<
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="break-all smart-capitalize">
|
<div className="break-all smart-capitalize">
|
||||||
{data.name == "unknown"
|
{data.name.toLowerCase() == "unknown"
|
||||||
? t("details.unknown")
|
? t("details.unknown")
|
||||||
: data.name.toLowerCase() == "none"
|
: data.name.toLowerCase() == "none"
|
||||||
? t("details.none")
|
? t("details.none")
|
||||||
@ -336,7 +336,7 @@ export function GroupedClassificationCard({
|
|||||||
<ContentTitle className="flex items-center gap-2 font-normal capitalize">
|
<ContentTitle className="flex items-center gap-2 font-normal capitalize">
|
||||||
{classifiedEvent?.label && classifiedEvent.label !== "none"
|
{classifiedEvent?.label && classifiedEvent.label !== "none"
|
||||||
? classifiedEvent.label
|
? classifiedEvent.label
|
||||||
: t(noClassificationLabel)}
|
: t(noClassificationLabel, { ns: i18nLibrary })}
|
||||||
{classifiedEvent?.label &&
|
{classifiedEvent?.label &&
|
||||||
classifiedEvent.label !== "none" &&
|
classifiedEvent.label !== "none" &&
|
||||||
classifiedEvent.score !== undefined && (
|
classifiedEvent.score !== undefined && (
|
||||||
|
|||||||
@ -57,7 +57,7 @@ export function GenAISummaryDialog({
|
|||||||
!aiAnalysis ||
|
!aiAnalysis ||
|
||||||
(!aiAnalysis.potential_threat_level && !aiAnalysis.other_concerns)
|
(!aiAnalysis.potential_threat_level && !aiAnalysis.other_concerns)
|
||||||
) {
|
) {
|
||||||
return "None";
|
return t("label.none", { ns: "common" });
|
||||||
}
|
}
|
||||||
|
|
||||||
let concerns = "";
|
let concerns = "";
|
||||||
@ -74,7 +74,9 @@ export function GenAISummaryDialog({
|
|||||||
label = t("securityConcern", { ns: "views/events" });
|
label = t("securityConcern", { ns: "views/events" });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
label = THREAT_LEVEL_LABELS[threatLevel as ThreatLevel] || "Unknown";
|
label =
|
||||||
|
THREAT_LEVEL_LABELS[threatLevel as ThreatLevel] ||
|
||||||
|
t("details.unknown", { ns: "views/classificationModel" });
|
||||||
}
|
}
|
||||||
concerns = `• ${label}\n`;
|
concerns = `• ${label}\n`;
|
||||||
}
|
}
|
||||||
@ -83,7 +85,7 @@ export function GenAISummaryDialog({
|
|||||||
concerns += `• ${c}\n`;
|
concerns += `• ${c}\n`;
|
||||||
});
|
});
|
||||||
|
|
||||||
return concerns || "None";
|
return concerns || t("label.none", { ns: "common" });
|
||||||
}, [aiAnalysis, t]);
|
}, [aiAnalysis, t]);
|
||||||
|
|
||||||
// layout
|
// layout
|
||||||
|
|||||||
@ -342,7 +342,9 @@ export default function PreviewThumbnailPlayer({
|
|||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
THREAT_LEVEL_LABELS[threatLevel as ThreatLevel] ||
|
THREAT_LEVEL_LABELS[threatLevel as ThreatLevel] ||
|
||||||
"Unknown"
|
t("details.unknown", {
|
||||||
|
ns: "views/classificationModel",
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
|
|||||||
@ -165,7 +165,7 @@ export const formatUnixTimestampToDateTime = (
|
|||||||
// Uppercase AM/PM for 12-hour formats
|
// Uppercase AM/PM for 12-hour formats
|
||||||
if (date_format.includes("a") || date_format.includes("aaa")) {
|
if (date_format.includes("a") || date_format.includes("aaa")) {
|
||||||
formatted = formatted.replace(/am|pm/gi, (match) =>
|
formatted = formatted.replace(/am|pm/gi, (match) =>
|
||||||
match.toUpperCase(),
|
i18n.t(`time.${match.toLowerCase()}`, { ns: "common" }).toUpperCase(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return formatted;
|
return formatted;
|
||||||
@ -217,7 +217,7 @@ export const formatUnixTimestampToDateTime = (
|
|||||||
// Uppercase AM/PM in fallback
|
// Uppercase AM/PM in fallback
|
||||||
if (options.hour12) {
|
if (options.hour12) {
|
||||||
fallbackFormatted = fallbackFormatted.replace(/am|pm/gi, (match) =>
|
fallbackFormatted = fallbackFormatted.replace(/am|pm/gi, (match) =>
|
||||||
match.toUpperCase(),
|
i18n.t(`time.${match.toLowerCase()}`, { ns: "common" }).toUpperCase(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return fallbackFormatted;
|
return fallbackFormatted;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user