Add configurable report language
This commit is contained in:
@@ -235,6 +235,27 @@ def test_render_html_keeps_css_unescaped() -> None:
|
||||
assert '<h1 class="section-group-title">Retention des sauvegardes VM/CT</h1>' not in html
|
||||
|
||||
|
||||
def test_render_html_supports_english_labels() -> None:
|
||||
report_data = ReportData(
|
||||
coverage=[
|
||||
BackupCoverage(
|
||||
guest=Guest(vmid=100, name="srv", guest_type="qemu"),
|
||||
status="non_sauvegardee",
|
||||
)
|
||||
],
|
||||
summary=ReportSummary(generated_at=datetime(2026, 5, 9, 2, 0)),
|
||||
)
|
||||
|
||||
html = render_html(report_data, language="en")
|
||||
|
||||
assert '<html lang="en">' in html
|
||||
assert "Proxmox VE Backup Report" in html
|
||||
assert "Table of contents" in html
|
||||
assert "VM/CT without backup" in html
|
||||
assert "not specified" in html
|
||||
assert "Rapport des sauvegardes Proxmox VE" not in html
|
||||
|
||||
|
||||
def test_pdf_pbs_access_users_table_keeps_expected_fields_without_raw_secrets() -> None:
|
||||
report_data = ReportData(
|
||||
pbs_access_users=[
|
||||
|
||||
Reference in New Issue
Block a user