mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-13 18:47:36 +03:00
improve lifecycle description labeling
This commit is contained in:
parent
f257125fde
commit
ce4c288e4a
@ -9,7 +9,9 @@ export function getLifecycleItemDescription(
|
|||||||
? lifecycleItem.data.sub_label[0]
|
? lifecycleItem.data.sub_label[0]
|
||||||
: lifecycleItem.data.sub_label || lifecycleItem.data.label;
|
: lifecycleItem.data.sub_label || lifecycleItem.data.label;
|
||||||
|
|
||||||
const label = getTranslatedLabel(rawLabel);
|
const label = lifecycleItem.data.sub_label
|
||||||
|
? rawLabel
|
||||||
|
: getTranslatedLabel(rawLabel);
|
||||||
|
|
||||||
switch (lifecycleItem.class_type) {
|
switch (lifecycleItem.class_type) {
|
||||||
case "visible":
|
case "visible":
|
||||||
@ -44,14 +46,18 @@ export function getLifecycleItemDescription(
|
|||||||
{
|
{
|
||||||
ns: "views/explore",
|
ns: "views/explore",
|
||||||
label,
|
label,
|
||||||
attribute: lifecycleItem.data.attribute.replaceAll("_", " "),
|
attribute: getTranslatedLabel(
|
||||||
|
lifecycleItem.data.attribute.replaceAll("_", " "),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
title = t("objectLifecycle.lifecycleItemDesc.attribute.other", {
|
title = t("objectLifecycle.lifecycleItemDesc.attribute.other", {
|
||||||
ns: "views/explore",
|
ns: "views/explore",
|
||||||
label: lifecycleItem.data.label,
|
label: lifecycleItem.data.label,
|
||||||
attribute: lifecycleItem.data.attribute.replaceAll("_", " "),
|
attribute: getTranslatedLabel(
|
||||||
|
lifecycleItem.data.attribute.replaceAll("_", " "),
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return title;
|
return title;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user