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(i18n): tokenize assistant name with {name} in Obsidian vault-choice strings

Ruben Lütke58642f9302fc
diff --git a/jarvis/ui/web/frontend/src/components/wiki/ObsidianSetupDialog.test.tsx b/jarvis/ui/web/frontend/src/components/wiki/ObsidianSetupDialog.test.tsx
index b259857706..bdfb4bb429 100644
--- a/jarvis/ui/web/frontend/src/components/wiki/ObsidianSetupDialog.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/wiki/ObsidianSetupDialog.test.tsx
@@ -318,6 +318,24 @@ describe("ObsidianSetupDialog", () => {
});
describe("vault choice (spec A6)", () => {
+ it("interpolates the assistant name into the vault-choice strings (no literal {name})", () => {
+ // The vault-choice strings refer to the assistant by the `{name}`
+ // token (i18n/index.ts invariant), resolved through the same
+ // interpolation `useT()` applies to every sibling string. In tests the
+ // token resolves to the neutral default name ("Assistant"), so the
+ // rendered card must show that — never a raw "{name}" placeholder.
+ render(
+ <ObsidianSetupDialog
+ open
+ onClose={() => {}}
+ initialStatus={STATUS_NOT_REGISTERED}
+ />,
+ );
+ const separateBtn = screen.getByTestId("obsidian-setup-mode-separate");
+ expect(separateBtn.textContent).toContain("Assistant");
+ expect(separateBtn.textContent).not.toContain("{name}");
+ });
+
it("renders both vault-choice options, 'existing' enabled once the vault list loads", async () => {
const fetchImpl = makeVaultAwareFetch(VAULTS, {
status: "added",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 6a99a17db5..02f5e07071 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -1791,7 +1791,7 @@
"did_not_work": "Hat nicht geklappt",
"it_worked": "Hat geklappt — Fertig",
"vault_choice_heading": "Wo soll {name} sein Wiki ablegen?",
- "mode_separate_label": "Ein eigenes Jarvis-Vault anlegen",
+ "mode_separate_label": "Ein eigenes {name}-Vault anlegen",
"mode_separate_hint": "Der Standard — {name} führt ein eigenes Vault, getrennt von deinen anderen Notizen.",
"mode_existing_label": "Mein vorhandenes Vault nutzen",
"mode_existing_hint": "{name} schreibt in einen \"Jarvis\"-Unterordner innerhalb des gewählten Vaults.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 81ddaf1847..d4750fc795 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -1791,15 +1791,15 @@
"open_in_obsidian": "Open in Obsidian",
"did_not_work": "It didn't work",
"it_worked": "It worked — done",
- "vault_choice_heading": "Where should Jarvis keep its wiki?",
- "mode_separate_label": "Create a separate Jarvis vault",
- "mode_separate_hint": "The default — Jarvis keeps its own vault, isolated from your other notes.",
+ "vault_choice_heading": "Where should {name} keep its wiki?",
+ "mode_separate_label": "Create a separate {name} vault",
+ "mode_separate_hint": "The default — {name} keeps its own vault, isolated from your other notes.",
"mode_existing_label": "Use my existing vault",
- "mode_existing_hint": "Jarvis writes into a \"Jarvis\" subfolder inside the vault you pick.",
+ "mode_existing_hint": "{name} writes into a \"Jarvis\" subfolder inside the vault you pick.",
"mode_existing_disabled_hint": "No existing vaults found — register one in Obsidian first.",
"vault_select_label": "Existing vault",
- "active_vault_label": "Jarvis writes to",
- "restart_required_hint": "Restart Jarvis to start writing to the new location.",
+ "active_vault_label": "{name} writes to",
+ "restart_required_hint": "Restart {name} to start writing to the new location.",
"restart_now": "Restart now",
"restarting": "Restarting…"
},