mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-23 16:48:23 +03:00
fix: add i18n keys, lazy logging, and improve tests per contributor guide
- Add storage.breakdown.* i18n keys to en/views/system.json locale file and remove inline fallback strings from t() calls - Use lazy logging format (%s) instead of f-string in new debug log line - Rewrite retain_policy tests to target RecordConfig directly, avoiding Docker-only dependencies (labelmap, /config, detector runtimes) - Add enum value and serialization roundtrip tests
This commit is contained in:
parent
71645b07df
commit
5ed2e15172
@ -356,7 +356,8 @@ class RecordingCleanup(threading.Thread):
|
|||||||
# StorageMaintainer handles space reclamation by deleting oldest recordings.
|
# StorageMaintainer handles space reclamation by deleting oldest recordings.
|
||||||
if is_rollover:
|
if is_rollover:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"Skipping time-based expiry for {camera} (continuous_rollover mode)."
|
"Skipping time-based expiry for %s (continuous_rollover mode).",
|
||||||
|
camera,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
continuous_expire_date = (
|
continuous_expire_date = (
|
||||||
|
|||||||
@ -110,6 +110,11 @@
|
|||||||
"title": "SHM (shared memory) allocation",
|
"title": "SHM (shared memory) allocation",
|
||||||
"warning": "The current SHM size of {{total}}MB is too small. Increase it to at least {{min_shm}}MB."
|
"warning": "The current SHM size of {{total}}MB is too small. Increase it to at least {{min_shm}}MB."
|
||||||
},
|
},
|
||||||
|
"breakdown": {
|
||||||
|
"overwritable": "Continuous (overwritable)",
|
||||||
|
"eventRetention": "Events (aging out)",
|
||||||
|
"protected": "Protected (indefinite)"
|
||||||
|
},
|
||||||
"cameraStorage": {
|
"cameraStorage": {
|
||||||
"title": "Camera Storage",
|
"title": "Camera Storage",
|
||||||
"camera": "Camera",
|
"camera": "Camera",
|
||||||
|
|||||||
@ -138,28 +138,19 @@ export default function StorageMetrics({
|
|||||||
<div className="mt-3 space-y-1 text-xs">
|
<div className="mt-3 space-y-1 text-xs">
|
||||||
<div className="flex justify-between text-primary-variant">
|
<div className="flex justify-between text-primary-variant">
|
||||||
<span>
|
<span>
|
||||||
{t(
|
{t("storage.breakdown.overwritable")}
|
||||||
"storage.breakdown.overwritable",
|
|
||||||
"Continuous (overwritable)",
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<span>{getUnitSize(storageBreakdown.overwritable)}</span>
|
<span>{getUnitSize(storageBreakdown.overwritable)}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between text-primary-variant">
|
<div className="flex justify-between text-primary-variant">
|
||||||
<span>
|
<span>
|
||||||
{t(
|
{t("storage.breakdown.eventRetention")}
|
||||||
"storage.breakdown.eventRetention",
|
|
||||||
"Events (aging out)",
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<span>{getUnitSize(storageBreakdown.event_retention)}</span>
|
<span>{getUnitSize(storageBreakdown.event_retention)}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between text-primary-variant">
|
<div className="flex justify-between text-primary-variant">
|
||||||
<span>
|
<span>
|
||||||
{t(
|
{t("storage.breakdown.protected")}
|
||||||
"storage.breakdown.protected",
|
|
||||||
"Protected (indefinite)",
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<span>{getUnitSize(storageBreakdown.protected)}</span>
|
<span>{getUnitSize(storageBreakdown.protected)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user