Rename unspecified coverage table title

This commit is contained in:
2026-05-31 07:47:07 +02:00
parent 95ef28065a
commit c0933bc3a1
5 changed files with 19 additions and 4 deletions
+2
View File
@@ -82,6 +82,7 @@ TRANSLATIONS = {
"missing_guests": "VM/CT non sauvegardees",
"coverage_group": "Sauvegarde des VM/CT",
"coverage_title": "Sauvegarde des VM/CT - {namespace}",
"coverage_unspecified_title": "VM/CT non sauvegardée",
"retention_group": "Retention des sauvegardes VM/CT",
"retention_title": "Retention des sauvegardes VM/CT {server_name} - {namespace}",
"issues": "Anomalies",
@@ -116,6 +117,7 @@ TRANSLATIONS = {
"missing_guests": "VM/CT without backup",
"coverage_group": "VM/CT backups",
"coverage_title": "VM/CT backups - {namespace}",
"coverage_unspecified_title": "VM/CT without backup",
"retention_group": "VM/CT backup retention",
"retention_title": "VM/CT backup retention {server_name} - {namespace}",
"issues": "Anomalies",
+8 -4
View File
@@ -345,9 +345,7 @@ def build_coverage_sections(
return [
ReportSection(
section_id="sauvegarde-vmct",
title=translator.text("coverage_title").format(
namespace=translator.cell("non renseigne")
),
title=coverage_section_title("non renseigne", translator),
headers=coverage_headers_without_namespace(translator),
rows=[],
empty_message=translator.text("no_guest"),
@@ -374,7 +372,7 @@ def build_coverage_sections(
sections.append(
ReportSection(
section_id=f"sauvegarde-vmct-{section_id_fragment(namespace)}",
title=translator.text("coverage_title").format(namespace=translator.cell(namespace)),
title=coverage_section_title(namespace, translator),
headers=coverage_headers_without_namespace(translator),
rows=rows,
empty_message=translator.text("no_guest"),
@@ -384,6 +382,12 @@ def build_coverage_sections(
return sections
def coverage_section_title(namespace: str, translator: Translator) -> str:
if namespace == "non renseigne":
return translator.text("coverage_unspecified_title")
return translator.text("coverage_title").format(namespace=translator.cell(namespace))
def coverage_headers_without_namespace(translator: Translator) -> list[str]:
return translator.row([
"VMID",