From 43c7193a3ab3decef8f8697dcde93675484fd213 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 31 Jan 2026 11:03:31 -0600 Subject: [PATCH] tweaks --- frigate/config/classification.py | 6 ++-- .../config-form/sections/BaseSection.tsx | 6 ++++ web/src/views/settings/GlobalConfigView.tsx | 30 +++++++++++++++---- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/frigate/config/classification.py b/frigate/config/classification.py index c13d8e394..e5ea9240a 100644 --- a/frigate/config/classification.py +++ b/frigate/config/classification.py @@ -51,17 +51,17 @@ class AudioTranscriptionConfig(FrigateBaseModel): language: str = Field( default="en", title="Transcription language", - description="Language code used for transcription/translation (for example 'en' for English).", + description="Language code used for transcription/translation (for example 'en' for English). See https://whisper-api.com/docs/languages/ for supported language codes.", ) device: Optional[EnrichmentsDeviceEnum] = Field( default=EnrichmentsDeviceEnum.CPU, title="Transcription device", - description="Device key (CPU/GPU) to run the transcription model on.", + description="Device key (CPU/GPU) to run the transcription model on. Only NVIDIA CUDA GPUs are currently supported for transcription.", ) model_size: str = Field( default="small", title="Model size", - description="Model size to use for transcription; the small model runs on CPU, large model requires a GPU.", + description="Model size to use for offline audio event transcription.", ) live_enabled: Optional[bool] = Field( default=False, diff --git a/web/src/components/config-form/sections/BaseSection.tsx b/web/src/components/config-form/sections/BaseSection.tsx index e9972a24e..116731d43 100644 --- a/web/src/components/config-form/sections/BaseSection.tsx +++ b/web/src/components/config-form/sections/BaseSection.tsx @@ -223,6 +223,12 @@ export function createConfigSection({ } }, [formKey]); + // Build a minimal overrides payload by comparing `current` against `base` + // (existing config) and `defaults` (schema defaults). + // - Returns `undefined` for null/empty values or when `current` equals `base` + // (or equals `defaults` when `base` is undefined). + // - For objects, recurses and returns an object containing only keys that + // are overridden; returns `undefined` if no keys are overridden. const buildOverrides = useCallback( ( current: unknown, diff --git a/web/src/views/settings/GlobalConfigView.tsx b/web/src/views/settings/GlobalConfigView.tsx index 4d4b7f59d..f6deed86e 100644 --- a/web/src/views/settings/GlobalConfigView.tsx +++ b/web/src/views/settings/GlobalConfigView.tsx @@ -353,17 +353,17 @@ const systemSections = [ "ffmpeg", "detectors", "model", - "classification", ]; // Integration sections (global only) const integrationSections = [ "mqtt", - "audio_transcription", - "genai", "semantic_search", + "genai", "face_recognition", "lpr", + "classification", + "audio_transcription", ]; interface GlobalConfigSectionProps { @@ -382,7 +382,11 @@ function GlobalConfigSection({ title, }: GlobalConfigSectionProps) { const sectionConfig = globalSectionConfigs[sectionKey]; - const { t } = useTranslation(["config/global", "views/settings", "common"]); + const { t, i18n } = useTranslation([ + "config/global", + "views/settings", + "common", + ]); const [pendingData, setPendingData] = useState(null); const [isSaving, setIsSaving] = useState(false); const [formKey, setFormKey] = useState(0); @@ -538,7 +542,11 @@ function GlobalConfigSection({ } export default function GlobalConfigView() { - const { t } = useTranslation(["views/settings", "config/global", "common"]); + const { t, i18n } = useTranslation([ + "views/settings", + "config/global", + "common", + ]); const [activeTab, setActiveTab] = useState("shared"); const [activeSection, setActiveSection] = useState("detect"); @@ -669,7 +677,7 @@ export default function GlobalConfigView() { activeSection === section.key ? "block" : "hidden", )} > - + {t(`${section.key}.label`, { ns: "config/global", defaultValue: @@ -677,6 +685,16 @@ export default function GlobalConfigView() { section.key.slice(1).replace(/_/g, " "), })} + {i18n.exists(`${section.key}.description`, { + ns: "config/global", + }) && ( +

+ {t(`${section.key}.description`, { + ns: "config/global", + })} +

+ )} +