Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(society): HUD counts accept the {0} placeholder the section's locale overrides use

rubenluetke10-beepfb0d21ef0f64
diff --git a/jarvis/ui/web/frontend/src/components/society/world/WorldHud.tsx b/jarvis/ui/web/frontend/src/components/society/world/WorldHud.tsx
index a5628791e1..52b409cf72 100644
--- a/jarvis/ui/web/frontend/src/components/society/world/WorldHud.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/world/WorldHud.tsx
@@ -26,14 +26,17 @@ export function WorldHud({ agents, sample, awake, reducedMotion, topRight }: Pro
const zoom = useCameraStore((s) => s.zoom);
const zoomStep = useCameraStore((s) => s.zoomStep);
const active = agents.filter((a) => a.state === "working").length;
+ // The main locale file may override these keys with the `{0}` placeholder
+ // convention the society rail uses; accept both spellings.
+ const count = (key: string, n: number) => fill(t(key), { count: n }).replace("{0}", String(n));
return (
<div className="sw-hud" aria-live="off">
<div className="sw-hud-top">
<div className="sw-chip-row">
<div className="sw-chip">
- <strong>{fill(t("society.world.hud_agents"), { count: agents.length })}</strong>
+ <strong>{count("society.world.hud_agents", agents.length)}</strong>
<span className="sw-chip-sep" />
- <span>{fill(t("society.world.hud_active"), { count: active })}</span>
+ <span>{count("society.world.hud_active", active)}</span>
</div>
{sample && <div className="sw-chip sw-chip-note">{t("society.world.sample_badge")}</div>}
{reducedMotion && <div className="sw-chip sw-chip-note">{t("society.world.reduced_motion_note")}</div>}