mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-29 18:16:43 +00:00
Merge pull request #363 from f3rs3n/fix/backup-message-batch
fix(backup): use complete messages for archives and destinations
This commit is contained in:
@@ -1300,7 +1300,7 @@ export function HostBackup() {
|
||||
</div>
|
||||
) : unifiedArchives.length === 0 ? (
|
||||
<div className="text-sm text-muted-foreground py-4">
|
||||
{t("backup.archives.emptyBefore")} <span className="font-medium">{t("backup.manual.run")}</span> {t("backup.archives.emptyAfter")}
|
||||
{t("backup.archives.emptyMessage")}
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
@@ -4089,7 +4089,7 @@ function CreateJobDialog({
|
||||
className="font-mono"
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{t("backup.destinations.localAttachHelpBefore")} <code className="font-mono">/dump</code> {t("backup.destinations.localAttachHelpMiddle")} <code className="font-mono">/var/lib/vz/dump</code>.
|
||||
{t("backup.destinations.localAttachHelpMessage")}
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
@@ -5709,7 +5709,7 @@ function DestinationsSection({
|
||||
)}
|
||||
{backups > 0 && (
|
||||
<div className="px-3 py-2 rounded-md border border-blue-500/40 bg-blue-500/5">
|
||||
{t("backup.destinations.backupsKeptBefore", { count: backups })} <span className="font-medium">{t("backup.destinations.kept")}</span>.
|
||||
{t("backup.destinations.backupsKeptMessage")}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -7,4 +7,22 @@ The ProxMenux Monitor dashboard uses a small client-side i18n layer.
|
||||
|
||||
To improve a translation, edit the values in your locale's `common.json` — keep placeholders such as `{uptime}`, `{vmid}` or `{count}` unchanged, and don't translate brand or product names (`ProxMenux Monitor`, `Proxmox Backup Server`, `Secure Gateway`, `Tailscale`, etc.). Missing keys fall back to English at runtime, so a partial refresh is always safe to merge.
|
||||
|
||||
## Backup message composition regressions
|
||||
|
||||
From the repository root, run:
|
||||
|
||||
```sh
|
||||
node tests/test_backup_archives_empty.cjs
|
||||
node tests/test_backup_destination_messages.cjs
|
||||
```
|
||||
|
||||
Prerequisites: Node.js and the `typescript` development dependency from
|
||||
`AppImage/package.json` must be installed/resolvable (normally in
|
||||
`AppImage/node_modules`). These tests compile actual JSX message branches and
|
||||
pure i18n lookup functions without importing the component or calling a backend.
|
||||
They cover whole English messages, missing-key locale fallback, loading/error
|
||||
branches, nonempty lists, the removal notice at zero/one/multiple archives,
|
||||
local-attach help, and unchanged shared labels. They do not replace browser or
|
||||
real-host acceptance. Keep literal paths in the local-attach help unchanged.
|
||||
|
||||
To add a new locale, see [§11 → Adding a new locale](../../CONTRIBUTING.md#adding-a-new-locale) in the Contributing Guide.
|
||||
|
||||
@@ -3828,6 +3828,7 @@
|
||||
"downloadTitle": "Download this backup",
|
||||
"emptyAfter": "backups yet.",
|
||||
"emptyBefore": "No",
|
||||
"emptyMessage": "No backup archives found.",
|
||||
"encrypted": "Encrypted",
|
||||
"encryptedTitle": "This backup is encrypted",
|
||||
"filesInBackup": "Files in backup",
|
||||
@@ -3903,6 +3904,7 @@
|
||||
"addPbsRepository": "Add PBS repository",
|
||||
"appendAuthorizedKeyBefore": "Append the generated public key to",
|
||||
"backupsKeptBefore": "Existing backups are kept in",
|
||||
"backupsKeptMessage": "Existing backup archives are not deleted.",
|
||||
"borgEncryptionInherited": "Borg encryption is controlled by the repository.",
|
||||
"builtIn": "Built-in",
|
||||
"builtInDefault": "Built-in default",
|
||||
@@ -3923,6 +3925,7 @@
|
||||
"leavePassphraseBlank": "Leave blank to keep the saved passphrase.",
|
||||
"leavePasswordBlank": "Leave blank to keep the saved password.",
|
||||
"localAttachHelpBefore": "Use a mounted local path. For USB drives, mount them first in",
|
||||
"localAttachHelpMessage": "Mount USB drives first. Leave blank to use the PVE storage path + /dump (fallback: /var/lib/vz/dump).",
|
||||
"localAttachHelpMiddle": "USB drives",
|
||||
"localManualPickHelp": "Pick a local path for one-shot backup output.",
|
||||
"localPathHelpAfter": "or another mounted path.",
|
||||
|
||||
Reference in New Issue
Block a user