mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
fix: fix system enrichments view classification i18n (#21366)
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
This commit is contained in:
parent
60052e5f9f
commit
8a4d5f34da
@ -192,7 +192,10 @@
|
|||||||
"review_description_events_per_second": "Review Description",
|
"review_description_events_per_second": "Review Description",
|
||||||
"object_description": "Object Description",
|
"object_description": "Object Description",
|
||||||
"object_description_speed": "Object Description Speed",
|
"object_description_speed": "Object Description Speed",
|
||||||
"object_description_events_per_second": "Object Description"
|
"object_description_events_per_second": "Object Description",
|
||||||
|
"classification": "{{name}} Classification",
|
||||||
|
"classification_speed": "{{name}} Classification Speed",
|
||||||
|
"classification_events_per_second": "{{name}} Classification Events Per Second"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,11 +88,20 @@ export default function EnrichmentMetrics({
|
|||||||
|
|
||||||
Object.entries(stats.embeddings).forEach(([rawKey, stat]) => {
|
Object.entries(stats.embeddings).forEach(([rawKey, stat]) => {
|
||||||
const key = rawKey.replaceAll("_", " ");
|
const key = rawKey.replaceAll("_", " ");
|
||||||
|
|
||||||
if (!(key in series)) {
|
if (!(key in series)) {
|
||||||
|
const classificationIndex = rawKey.indexOf("_classification_");
|
||||||
|
const seriesName =
|
||||||
|
classificationIndex === -1
|
||||||
|
? t("enrichments.embeddings." + rawKey)
|
||||||
|
: t(
|
||||||
|
`enrichments.embeddings.${rawKey.substring(classificationIndex + 1)}`,
|
||||||
|
{
|
||||||
|
name: rawKey.substring(0, classificationIndex),
|
||||||
|
},
|
||||||
|
);
|
||||||
series[key] = {
|
series[key] = {
|
||||||
rawKey,
|
rawKey,
|
||||||
name: t("enrichments.embeddings." + rawKey),
|
name: seriesName,
|
||||||
metrics: getThreshold(rawKey),
|
metrics: getThreshold(rawKey),
|
||||||
data: [],
|
data: [],
|
||||||
};
|
};
|
||||||
@ -133,8 +142,14 @@ export default function EnrichmentMetrics({
|
|||||||
isSpeed = false;
|
isSpeed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let categoryName = "";
|
||||||
// Get translated category name
|
// Get translated category name
|
||||||
const categoryName = t("enrichments.embeddings." + categoryKey);
|
if (categoryKey.endsWith("_classification")) {
|
||||||
|
const name = categoryKey.replace("_classification", "");
|
||||||
|
categoryName = t("enrichments.embeddings.classification", { name });
|
||||||
|
} else {
|
||||||
|
categoryName = t("enrichments.embeddings." + categoryKey);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(categoryKey in grouped)) {
|
if (!(categoryKey in grouped)) {
|
||||||
grouped[categoryKey] = {
|
grouped[categoryKey] = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user