From 56d51dd4615b0d9f945cc5c113272f5cdf7e06e8 Mon Sep 17 00:00:00 2001 From: martino <32328813+f3rs3n@users.noreply.github.com> Date: Tue, 22 Sep 2026 18:59:50 +0200 Subject: [PATCH] fix(monitor): clarify BORG key guidance --- .../tests/test_command_descriptions.py | 10 + AppImage/components/host-backup.tsx | 13 +- AppImage/messages/en/common.json | 6 + tests/README-borg-ssh.md | 70 +++++++ tests/test_borg_ssh_browser.cjs | 177 ++++++++++++++++++ tests/test_borg_ssh_guidance.cjs | 121 ++++++++++++ 6 files changed, 390 insertions(+), 7 deletions(-) create mode 100644 tests/README-borg-ssh.md create mode 100644 tests/test_borg_ssh_browser.cjs create mode 100644 tests/test_borg_ssh_guidance.cjs diff --git a/.github/scripts/tests/test_command_descriptions.py b/.github/scripts/tests/test_command_descriptions.py index f86afd0c..873b2be0 100644 --- a/.github/scripts/tests/test_command_descriptions.py +++ b/.github/scripts/tests/test_command_descriptions.py @@ -115,6 +115,16 @@ class CommandDescriptionsTests(unittest.TestCase): report["recommendations"].setdefault( key, source_report["recommendations"][key]) path.write_text(json.dumps(temporary, ensure_ascii=False)) + # Model steady-state generation for the six intentional English-only + # Borg additions, in temporary copies only. Keep every other gap visible. + if lang != "en": + copied = json.loads(path.read_text()) + english = catalog("en")["backup"] + for key in ("sshUserHelpMessage", "sshKeyHelpMessage", "sshKeySetupTitle", + "sshKeySetupHelp", "sshAuthorizedKeyHelp"): + copied["backup"]["destinations"].setdefault(key, english["destinations"][key]) + copied["backup"]["actions"].setdefault("prepareSshKey", english["actions"]["prepareSshKey"]) + path.write_text(json.dumps(copied), encoding="utf-8") before = {p: p.read_bytes() for p in root.glob("*/common.json")} argv = [str(SCRIPT), "--source", str(root / "en/common.json"), "--messages-dir", str(root), "--languages", languages, "--sleep", "0"] diff --git a/AppImage/components/host-backup.tsx b/AppImage/components/host-backup.tsx index 9226f0cd..2a071781 100644 --- a/AppImage/components/host-backup.tsx +++ b/AppImage/components/host-backup.tsx @@ -6435,7 +6435,7 @@ function AddDestinationDialog({ setBorgSshUser(e.target.value)} className="font-mono mt-1" placeholder="borg" />

- {t("backup.destinations.sshUserHelpBefore")} borg serve. {t("backup.destinations.sshUserHelpAfter")} borg, {t("backup.destinations.not")} root. + {t("backup.destinations.sshUserHelpMessage")}

@@ -6464,14 +6464,13 @@ function AddDestinationDialog({ setBorgSshKeyPath(e.target.value)} className="font-mono mt-1" />

- {t("backup.destinations.sshKeyHelpBefore")} - {" "}{t("backup.destinations.sshKeyHelpMiddle")} {t("backup.actions.generateKey")} {t("backup.destinations.sshKeyHelpAfter")} + {t("backup.destinations.sshKeyHelpMessage", { action: t("backup.actions.prepareSshKey") })}

- {t("backup.destinations.generateNewSshKey")} + {t("backup.destinations.sshKeySetupTitle")}
{generatedKey ? ( <>

- {t("backup.destinations.appendAuthorizedKeyBefore")} ~{borgSshUser}/.ssh/authorized_keys: + {t("backup.destinations.sshAuthorizedKeyHelp", { user: borgSshUser })}