diff --git a/AppImage/messages/de/common.json b/AppImage/messages/de/common.json index 6e08d617..1206f5e4 100644 --- a/AppImage/messages/de/common.json +++ b/AppImage/messages/de/common.json @@ -3976,8 +3976,8 @@ "scopeAriaLabel": "Backups zum Anzeigen", "scopeShowAll": "Alle anzeigen", "scopeThisNode": "Dieser Knoten", - "formerJob": "Ehemaliger Job", - "formerJobTitle": "Der Job, der diese Sicherung erstellt hat, ist auf diesem Knoten nicht mehr vorhanden.Das Backup bleibt bis zur Löschung erhalten." + "formerJob": "Ehemaliger Auftrag", + "formerJobTitle": "Der Auftrag, der diese Sicherung erstellt hat, ist auf diesem Knoten nicht mehr vorhanden. Die Sicherung bleibt bis zur Löschung erhalten." }, "backends": { "borgDescription": "Borg-Repository für deduplizierte Host-Backups.", diff --git a/AppImage/messages/fr/common.json b/AppImage/messages/fr/common.json index 2b0ef60a..beaf6426 100644 --- a/AppImage/messages/fr/common.json +++ b/AppImage/messages/fr/common.json @@ -3976,8 +3976,8 @@ "scopeAriaLabel": "Sauvegardes à afficher", "scopeShowAll": "Afficher tout", "scopeThisNode": "Ce nœud", - "formerJob": "Ancien emploi", - "formerJobTitle": "Le travail qui a effectué cette sauvegarde n'existe plus sur ce nœud.La sauvegarde est conservée jusqu'à sa suppression." + "formerJob": "Ancien travail", + "formerJobTitle": "Le travail qui a effectué cette sauvegarde n'existe plus sur ce nœud. La sauvegarde est conservée jusqu'à sa suppression." }, "backends": { "borgDescription": "Référentiel Borg pour les sauvegardes d'hôtes dédupliquées.", diff --git a/AppImage/messages/it/common.json b/AppImage/messages/it/common.json index 084e91c2..37bdb0e4 100644 --- a/AppImage/messages/it/common.json +++ b/AppImage/messages/it/common.json @@ -3971,13 +3971,13 @@ "title": "Backup", "viewContentsTitle": "Visualizza contenuto backup", "emptyMessage": "Nessun archivio di backup trovato.", - "hiddenOtherNodes": "backup di altri nodi non mostrati: {count}.", - "scopeAllNodes": "tutti i nodi", - "scopeAriaLabel": "backup da mostrare", - "scopeShowAll": "mostra tutto", - "scopeThisNode": "questo nodo", - "formerJob": "Ex lavoro", - "formerJobTitle": "il lavoro che ha effettuato questo backup non esiste più su questo nodo.Il backup viene conservato finché non viene eliminato." + "hiddenOtherNodes": "Backup di altri nodi non mostrati: {count}.", + "scopeAllNodes": "Tutti i nodi", + "scopeAriaLabel": "Backup da mostrare", + "scopeShowAll": "Mostra tutto", + "scopeThisNode": "Questo nodo", + "formerJob": "Attività precedente", + "formerJobTitle": "L'attività che ha creato questo backup non esiste più su questo nodo. Il backup viene conservato finché non viene eliminato." }, "backends": { "borgDescription": "Repository Borg per backup host deduplicati.", diff --git a/AppImage/messages/pt/common.json b/AppImage/messages/pt/common.json index 44cced3c..fbc3414f 100644 --- a/AppImage/messages/pt/common.json +++ b/AppImage/messages/pt/common.json @@ -3976,8 +3976,8 @@ "scopeAriaLabel": "Backups para mostrar", "scopeShowAll": "Mostrar tudo", "scopeThisNode": "Este nó", - "formerJob": "Trabalho anterior", - "formerJobTitle": "A tarefa que fez esse backup não existe mais neste nó.O backup é mantido até ser excluído." + "formerJob": "Tarefa anterior", + "formerJobTitle": "A tarefa que fez esse backup não existe mais neste nó. O backup é mantido até ser excluído." }, "backends": { "borgDescription": "Repositório Borg para backups de host desduplicados.", diff --git a/AppImage/messages/sk/common.json b/AppImage/messages/sk/common.json index 077f0dba..846469f4 100644 --- a/AppImage/messages/sk/common.json +++ b/AppImage/messages/sk/common.json @@ -3975,8 +3975,8 @@ "scopeAriaLabel": "Zálohy na zobrazenie", "scopeShowAll": "Zobraziť všetko", "scopeThisNode": "Tento uzol", - "formerJob": "Bývalá práca", - "formerJobTitle": "Úloha, ktorá vytvorila túto zálohu, už v tomto uzle neexistuje.Záloha sa uchováva, kým sa neodstráni." + "formerJob": "Predchádzajúca úloha", + "formerJobTitle": "Úloha, ktorá vytvorila túto zálohu, už v tomto uzle neexistuje. Záloha sa uchováva, kým sa neodstráni." }, "backends": { "borgDescription": "Borg repozitár pre deduplikované zálohy servera.", diff --git a/AppImage/messages/sv/common.json b/AppImage/messages/sv/common.json index 3a30f941..7174ac00 100644 --- a/AppImage/messages/sv/common.json +++ b/AppImage/messages/sv/common.json @@ -3971,13 +3971,13 @@ "viewContentsTitle": "Visa säkerhetskopieringsinnehåll", "descriptionAfter": "", "emptyMessage": "Inga backup-arkiv hittades.", - "hiddenOtherNodes": "Säkerhetskopiering av andra noder som inte visas: {count}.", - "scopeAllNodes": "All nodes", - "scopeAriaLabel": "Backups to show", + "hiddenOtherNodes": "Säkerhetskopior från andra noder som inte visas: {count}.", + "scopeAllNodes": "Alla noder", + "scopeAriaLabel": "Säkerhetskopior som visas", "scopeShowAll": "Visa alla", "scopeThisNode": "Denna nod", - "formerJob": "Former job", - "formerJobTitle": "Jobbet som gjorde denna säkerhetskopia finns inte längre på den här noden.Säkerheten sparas tills den raderas." + "formerJob": "Tidigare jobb", + "formerJobTitle": "Jobbet som gjorde den här säkerhetskopian finns inte längre på den här noden. Säkerhetskopian sparas tills den raderas." }, "backends": { "borgDescription": "Borg-arkiv för deduplicerade värdsäkerhetskopior.", diff --git a/tests/test_backup_archives_empty.cjs b/tests/test_backup_archives_empty.cjs index 66b126ea..89164c70 100644 --- a/tests/test_backup_archives_empty.cjs +++ b/tests/test_backup_archives_empty.cjs @@ -17,7 +17,7 @@ assert.ok(branch, 'real archives loading/error/empty decision'); // list with a sentinel: rendering its controls is outside this message test. const transformed = ts.transform(branch, [context => root => { const visit = node => { - if (ts.isConditionalExpression(node) && node.condition.getText(source) === 'unifiedArchives.length === 0') { + if (ts.isConditionalExpression(node) && node.condition.getText(source) === 'visibleArchives.length === 0 && hiddenArchives === 0') { return ts.factory.updateConditionalExpression(node, node.condition, node.questionToken, node.whenTrue, node.colonToken, ts.factory.createStringLiteral('NONEMPTY_ARCHIVES')); } @@ -28,14 +28,14 @@ const transformed = ts.transform(branch, [context => root => { const expression = printer.printNode(ts.EmitHint.Expression, transformed.transformed[0], source); transformed.dispose(); const render = new Function('React', 'Loader2', 't', 'archivesErr', 'remoteArchivesErr', - 'archivesResp', 'remoteArchivesResp', 'unifiedArchives', compile(`const result = ${expression};`) + '\nreturn result;'); + 'archivesResp', 'remoteArchivesResp', 'visibleArchives', 'hiddenArchives', compile(`const result = ${expression};`) + '\nreturn result;'); // Text-only JSX sink: TypeScript performs the real JSX whitespace conversion. const React = { createElement: (tag, props, ...children) => children.flat(Infinity).filter(x => x != null && x !== false).join('') }; const text = (locale = 'en', overrides = {}, messages = catalogs) => { const state = { archivesErr: null, remoteArchivesErr: null, archivesResp: { archives: [] }, - remoteArchivesResp: { snapshots: [] }, unifiedArchives: [], ...overrides }; + remoteArchivesResp: { snapshots: [] }, visibleArchives: [], hiddenArchives: 0, ...overrides }; return render(React, 'spinner', translator(locale, messages), state.archivesErr, state.remoteArchivesErr, - state.archivesResp, state.remoteArchivesResp, state.unifiedArchives); + state.archivesResp, state.remoteArchivesResp, state.visibleArchives, state.hiddenArchives); }; const emptyMessage = 'No backup archives found.'; @@ -54,7 +54,10 @@ for (const locale of locales) { assert.ok(locales.some(locale => locale !== 'en' && typeof catalogs[locale].backup?.archives?.emptyMessage === 'string' && catalogs[locale].backup.archives.emptyMessage !== emptyMessage), 'localized shipped archive message exercised'); -for (const count of [1, 3]) assert.equal(text('en', { unifiedArchives: Array(count).fill({}) }), 'NONEMPTY_ARCHIVES'); +for (const count of [1, 3]) assert.equal(text('en', { visibleArchives: Array(count).fill({}) }), 'NONEMPTY_ARCHIVES'); +// Backups of other nodes hidden by the node filter are not an empty list: +// the list shows the note that offers them. +assert.equal(text('en', { hiddenArchives: 2 }), 'NONEMPTY_ARCHIVES'); assert.equal(text('en', { archivesResp: undefined, remoteArchivesResp: undefined }), translator('en')('backup.common.loading')); assert.equal(text('en', { archivesErr: true, remoteArchivesErr: true }), translator('en')('backup.archives.loadFailed')); // Preserve existing partial-source semantics; no claim that every source was queried.