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:
jon
2026-03-01 21:16:05 -06:00
parent 71645b07df
commit 5ed2e15172
3 changed files with 10 additions and 13 deletions
+3 -12
View File
@@ -138,28 +138,19 @@ export default function StorageMetrics({
<div className="mt-3 space-y-1 text-xs">
<div className="flex justify-between text-primary-variant">
<span>
{t(
"storage.breakdown.overwritable",
"Continuous (overwritable)",
)}
{t("storage.breakdown.overwritable")}
</span>
<span>{getUnitSize(storageBreakdown.overwritable)}</span>
</div>
<div className="flex justify-between text-primary-variant">
<span>
{t(
"storage.breakdown.eventRetention",
"Events (aging out)",
)}
{t("storage.breakdown.eventRetention")}
</span>
<span>{getUnitSize(storageBreakdown.event_retention)}</span>
</div>
<div className="flex justify-between text-primary-variant">
<span>
{t(
"storage.breakdown.protected",
"Protected (indefinite)",
)}
{t("storage.breakdown.protected")}
</span>
<span>{getUnitSize(storageBreakdown.protected)}</span>
</div>