mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
follow the node filter in the empty backup list test
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -3976,7 +3976,7 @@
|
||||
"scopeAriaLabel": "Sauvegardes à afficher",
|
||||
"scopeShowAll": "Afficher tout",
|
||||
"scopeThisNode": "Ce nœud",
|
||||
"formerJob": "Ancien emploi",
|
||||
"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": {
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -3976,7 +3976,7 @@
|
||||
"scopeAriaLabel": "Backups para mostrar",
|
||||
"scopeShowAll": "Mostrar tudo",
|
||||
"scopeThisNode": "Este nó",
|
||||
"formerJob": "Trabalho anterior",
|
||||
"formerJob": "Tarefa anterior",
|
||||
"formerJobTitle": "A tarefa que fez esse backup não existe mais neste nó. O backup é mantido até ser excluído."
|
||||
},
|
||||
"backends": {
|
||||
|
||||
@@ -3975,7 +3975,7 @@
|
||||
"scopeAriaLabel": "Zálohy na zobrazenie",
|
||||
"scopeShowAll": "Zobraziť všetko",
|
||||
"scopeThisNode": "Tento uzol",
|
||||
"formerJob": "Bývalá práca",
|
||||
"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": {
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user