release 1.15.4: French sticky titles and SUMMARY verdict strings

Localize monitoring host label, stack summary (public + interne), and
SUMMARY all-clear / warnings-only / totals for FR console and HTML.
This commit is contained in:
Hernâni Marques 2026-07-19 04:51:42 +02:00
parent 4d44f69bd0
commit 2355d2900d
No known key found for this signature in database
5 changed files with 52 additions and 18 deletions

View file

@ -114,6 +114,12 @@ def ui(lang: str, key: str, **kwargs) -> str:
"stack_i4": "HTML host: {host}",
"stack_i5": "Timer: host-agent path + 4h · /monitoring on bank, exchange, merchant fronts",
"stack_i_phases": "Log header phases= {phases}",
"page_label_monitoring": "monitoring",
"page_label_surface": "surface",
"page_label_aptdeploy": "aptdeploy",
"mode_ok": "OK",
"mode_err": "ERR",
"mode_redirect": "REDIR",
"pages_title": "Monitoring pages (suite HTML)",
"pages_summary": "Public sticky-bar reports · phase monpages · part of taler-monitoring",
"pages_i1": "Suite name taler-monitoring ≠ URL. Only three public families (bare + slash each):",
@ -200,14 +206,20 @@ def ui(lang: str, key: str, **kwargs) -> str:
"focus_merchant": "Backend marchand / SPA HTTPS public + contrôles inside conteneur",
"focus_stack": "Pile Taler public + inside",
"stack_title": "Surveillance de pile · {host}",
"stack_summary": "{phases} · public + inside",
"stack_summary": "{phases} · public + interne",
"stack_i1": "Focus : {focus}",
"stack_i2": "Phases de cette exécution : {phases}",
"stack_i3": "Typique : URL publiques (HTTPS, QR, perf), inside (podman/ssh), versions des paquets",
"stack_i4": "Hôte HTML : {host}",
"stack_i5": "Minuterie : host-agent path + 4 h · /monitoring sur bank, exchange, fronts marchands",
"stack_i_phases": "En-tête de journal phases= {phases}",
"pages_title": "Pages de monitoring (HTML de la suite)",
"page_label_monitoring": "surveillance",
"page_label_surface": "surface",
"page_label_aptdeploy": "aptdeploy",
"mode_ok": "OK",
"mode_err": "ERR",
"mode_redirect": "REDIR",
"pages_title": "Pages de monitoring (HTML de la suite)",
"pages_summary": "Rapports publics sticky-bar · phase monpages · partie de taler-monitoring",
"pages_i1": "Nom de suite taler-monitoring ≠ URL. Trois familles publiques seulement (sans et avec /) :",
"pages_i2": "1) /monitoring(+_err) · 2) /taler-monitoring-surface(+_err) · 3) /taler-monitoring-aptdeploy(+_err) sur taler.hacktivism.ch",
@ -288,14 +300,14 @@ def classify(line: str) -> str:
return "meta"
if "numbered checks" in low:
return "meta"
if "totals:" in low:
if "totals:" in low or "totaux :" in low or low.strip().startswith("totaux"):
return "sum-totals"
# SUMMARY verdict chrome (not a check) — keep distinct for HTML boxes
if "warnings only" in low:
if "warnings only" in low or "avertissements seulement" in low:
return "sum-verdict-warn"
if "all clear" in low:
if "all clear" in low or "tout est clair" in low:
return "sum-verdict-ok"
if "failed — see" in low or "failed - see" in low:
if "failed — see" in low or "failed - see" in low or "echec — voir" in low or "échec — voir" in low:
return "sum-verdict-err"
# host-agent tees converter "wrote … (errors=N …)" into the same log
if line.lstrip().lower().startswith("wrote ") and "errors=" in low:
@ -443,8 +455,12 @@ def is_summary_error_line(ln: str) -> bool:
return True
if "warnings only" in low or "all clear" in low:
return True
if "avertissements seulement" in low or "tout est clair" in low:
return True
if "totaux" in low and not is_numbered_check_line(ln):
return True
# SUMMARY count rows without #NNN / tid (e.g. " [ ERROR ] 3")
if re.search(r"[\[\u250c]\s*(ERROR|WARN|OK|INFO|BLOCK)", ln, re.I) and not is_numbered_check_line(
if re.search(r"[\[\u250c]\s*(ERROR|WARN|OK|INFO|BLOCK|ERREUR|AVERT)", ln, re.I) and not is_numbered_check_line(
ln
):
return True
@ -1066,6 +1082,16 @@ def sticky_bar_html(
version_html = f'<span class="version-link muted">{html.escape(ver)}</span>'
else:
version_html = ""
# Localize page label for sticky host title (monitoring → surveillance in FR)
pl = (page_label or "monitoring").lower().replace("_", "-")
if "surface" in pl:
pl_disp = ui(lang, "page_label_surface")
elif "aptdeploy" in pl or "apt-deploy" in pl:
pl_disp = ui(lang, "page_label_aptdeploy")
else:
pl_disp = ui(lang, "page_label_monitoring")
mode_key = f"mode_{mode}" if mode in ("ok", "err", "redirect") else ""
mode_disp = ui(lang, mode_key) if mode_key and ui(lang, mode_key) != mode_key else mode.upper()
# Compact sticky row always visible; "Was geprüft wird" expands inside sticky-bar
return f"""
<div class="sticky-bar sticky-{level}" id="status-bar" role="status"
@ -1073,7 +1099,7 @@ def sticky_bar_html(
data-scope-kind="{scope_kind}" {filter_i18n}>
<div class="sticky-bar-row primary">
<span class="status-pill sticky-{level}">{html.escape(status_txt)}</span>
<span class="host">{html.escape(page_label)} · {html.escape(hostname)}</span>
<span class="host">{html.escape(pl_disp)} · {html.escape(hostname)}</span>
<span class="sep">·</span>
{err_stat}
<span class="sep">·</span>
@ -1098,7 +1124,7 @@ def sticky_bar_html(
</div>
<div class="sticky-scope-panel" id="sticky-scope-panel" hidden>
<div class="sticky-bar-row secondary">
<span class="badge mode-{html.escape(mode)}">{html.escape(mode.upper())}</span>
<span class="badge mode-{html.escape(mode)}">{html.escape(mode_disp)}</span>
{html.escape(ui(lang, "source"))} {commit_html}{suite_bit}
{(" · " + other) if other else ""}
</div>