mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-31 08:09:02 +03:00
Fix I18n audio labels (#20508)
* ensure i18n audio label keys are translated don't assume they are in the objects namespace * add missing audio labels * Improve handling of label types * simplify * fixes --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
e592c7044b
commit
75d7049b6d
@@ -100,7 +100,12 @@ export default function CameraSettingsView({
|
||||
const alertsLabels = useMemo(() => {
|
||||
return cameraConfig?.review.alerts.labels
|
||||
? cameraConfig.review.alerts.labels
|
||||
.map((label) => getTranslatedLabel(label))
|
||||
.map((label) =>
|
||||
getTranslatedLabel(
|
||||
label,
|
||||
cameraConfig?.audio?.listen?.includes(label) ? "audio" : "object",
|
||||
),
|
||||
)
|
||||
.join(", ")
|
||||
: "";
|
||||
}, [cameraConfig]);
|
||||
@@ -108,7 +113,12 @@ export default function CameraSettingsView({
|
||||
const detectionsLabels = useMemo(() => {
|
||||
return cameraConfig?.review.detections.labels
|
||||
? cameraConfig.review.detections.labels
|
||||
.map((label) => getTranslatedLabel(label))
|
||||
.map((label) =>
|
||||
getTranslatedLabel(
|
||||
label,
|
||||
cameraConfig?.audio?.listen?.includes(label) ? "audio" : "object",
|
||||
),
|
||||
)
|
||||
.join(", ")
|
||||
: "";
|
||||
}, [cameraConfig]);
|
||||
|
||||
Reference in New Issue
Block a user