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:
parent
ae8a72a5f3
commit
b4f5f060cc
5 changed files with 52 additions and 18 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
1.15.3
|
1.15.4
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.8.0`). File `VERSION` omits the `v` pre
|
||||||
|
|
||||||
| Tag | Date (UTC) | Notes |
|
| Tag | Date (UTC) | Notes |
|
||||||
|-----|------------|--------|
|
|-----|------------|--------|
|
||||||
|
| **v1.15.4** | 2026-07-19 | **Bugfix:** French sticky titles — page label *surveillance*, stack summary *public + interne*, SUMMARY verdict/totals via i18n (`tout est clair`, `totaux :`). |
|
||||||
| **v1.15.3** | 2026-07-19 | **Bugfix:** console language auto-**fr** for `*lefrancpaysan*` domains again — env `TALER_MON_LANG=en` no longer locks English; only `--lang` / `TALER_MON_LANG_SET=1` is explicit. |
|
| **v1.15.3** | 2026-07-19 | **Bugfix:** console language auto-**fr** for `*lefrancpaysan*` domains again — env `TALER_MON_LANG=en` no longer locks English; only `--lang` / `TALER_MON_LANG_SET=1` is explicit. |
|
||||||
| **v1.15.2** | 2026-07-19 | **Bugfix:** warn/error filter — drop blank log lines from HTML; compact console (no black voids above/mid/below); context skips SUMMARY chrome & pure box frames; tighter filter-gap. |
|
| **v1.15.2** | 2026-07-19 | **Bugfix:** warn/error filter — drop blank log lines from HTML; compact console (no black voids above/mid/below); context skips SUMMARY chrome & pure box frames; tighter filter-gap. |
|
||||||
| **v1.15.1** | 2026-07-19 | **Bugfix:** mon HTML — phase `section()` boxes no longer painted as SUMMARY (were blue/green `sum-header`); only real SUMMARY rows get solid severity backgrounds (OK/WARN/ERROR/INFO). |
|
| **v1.15.1** | 2026-07-19 | **Bugfix:** mon HTML — phase `section()` boxes no longer painted as SUMMARY (were blue/green `sum-header`); only real SUMMARY rows get solid severity backgrounds (OK/WARN/ERROR/INFO). |
|
||||||
|
|
|
||||||
5
i18n.sh
5
i18n.sh
|
|
@ -73,6 +73,11 @@ i18n_text() {
|
||||||
"pay/withdraw cannot finish") printf 'paiement/retrait impossible a terminer' ;;
|
"pay/withdraw cannot finish") printf 'paiement/retrait impossible a terminer' ;;
|
||||||
"SUMMARY") printf 'RESUME' ;;
|
"SUMMARY") printf 'RESUME' ;;
|
||||||
"totals:") printf 'totaux :' ;;
|
"totals:") printf 'totaux :' ;;
|
||||||
|
"all clear") printf 'tout est clair' ;;
|
||||||
|
"warnings only (no hard fail)") printf 'avertissements seulement (pas d'\''echec dur)' ;;
|
||||||
|
"monitoring") printf 'surveillance' ;;
|
||||||
|
"surface") printf 'surface' ;;
|
||||||
|
"aptdeploy") printf 'aptdeploy' ;;
|
||||||
"container") printf 'conteneur' ;;
|
"container") printf 'conteneur' ;;
|
||||||
"disk") printf 'disque' ;;
|
"disk") printf 'disque' ;;
|
||||||
"package") printf 'paquet' ;;
|
"package") printf 'paquet' ;;
|
||||||
|
|
|
||||||
18
lib.sh
18
lib.sh
|
|
@ -944,7 +944,7 @@ _summary_totals_box() {
|
||||||
[ "$blk_n" -gt 0 ] && _sum_row "$ROW_BLK" "$BG_BLK" "BLOCK" "$blk_n" "$M"
|
[ "$blk_n" -gt 0 ] && _sum_row "$ROW_BLK" "$BG_BLK" "BLOCK" "$blk_n" "$M"
|
||||||
|
|
||||||
# totals rollup on tinted bar
|
# totals rollup on tinted bar
|
||||||
printf -- ' %s %s totals: %s%d OK%s' "$ROW_TOT" "$B" "$G$B" "$pass_n" "$N$ROW_TOT"
|
printf -- ' %s %s %s %s%d OK%s' "$ROW_TOT" "$B" "$(i18n_text 'totals:')" "$G$B" "$pass_n" "$N$ROW_TOT"
|
||||||
[ "$fail_n" -gt 0 ] && printf -- ' %s·%s %s%d ERROR%s' "$D" "$N$ROW_TOT" "$R$B" "$fail_n" "$N$ROW_TOT"
|
[ "$fail_n" -gt 0 ] && printf -- ' %s·%s %s%d ERROR%s' "$D" "$N$ROW_TOT" "$R$B" "$fail_n" "$N$ROW_TOT"
|
||||||
[ "$warn_n" -gt 0 ] && printf -- ' %s·%s %s%d WARN%s' "$D" "$N$ROW_TOT" "$Y$B" "$warn_n" "$N$ROW_TOT"
|
[ "$warn_n" -gt 0 ] && printf -- ' %s·%s %s%d WARN%s' "$D" "$N$ROW_TOT" "$Y$B" "$warn_n" "$N$ROW_TOT"
|
||||||
[ "$info_n" -gt 0 ] && printf -- ' %s·%s %s%d INFO%s' "$D" "$N$ROW_TOT" "$C$B" "$info_n" "$N$ROW_TOT"
|
[ "$info_n" -gt 0 ] && printf -- ' %s·%s %s%d INFO%s' "$D" "$N$ROW_TOT" "$C$B" "$info_n" "$N$ROW_TOT"
|
||||||
|
|
@ -957,28 +957,30 @@ _summary_totals_box() {
|
||||||
[ "$warn_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag WARN)" "$Y$B" "$warn_n" "$N"
|
[ "$warn_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag WARN)" "$Y$B" "$warn_n" "$N"
|
||||||
[ "$info_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag INFO)" "$C$B" "$info_n" "$N"
|
[ "$info_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag INFO)" "$C$B" "$info_n" "$N"
|
||||||
[ "$blk_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag BLOCK)" "$M$B" "$blk_n" "$N"
|
[ "$blk_n" -gt 0 ] && printf -- ' [ %-5s ] %s%4d%s\n' "$(i18n_tag BLOCK)" "$M$B" "$blk_n" "$N"
|
||||||
printf -- ' %stotals:%s %s%d OK%s' "$B" "$N" "$G$B" "$pass_n" "$N"
|
printf -- ' %s%s%s %s%d OK%s' "$B" "$(i18n_text 'totals:')" "$N" "$G$B" "$pass_n" "$N"
|
||||||
[ "$fail_n" -gt 0 ] && printf -- ' · %s%d ERROR%s' "$R$B" "$fail_n" "$N"
|
[ "$fail_n" -gt 0 ] && printf -- ' · %s%d ERROR%s' "$R$B" "$fail_n" "$N"
|
||||||
[ "$warn_n" -gt 0 ] && printf -- ' · %s%d WARN%s' "$Y$B" "$warn_n" "$N"
|
[ "$warn_n" -gt 0 ] && printf -- ' · %s%d WARN%s' "$Y$B" "$warn_n" "$N"
|
||||||
[ "$info_n" -gt 0 ] && printf -- ' · %s%d INFO%s' "$C$B" "$info_n" "$N"
|
[ "$info_n" -gt 0 ] && printf -- ' · %s%d INFO%s' "$C$B" "$info_n" "$N"
|
||||||
[ "$blk_n" -gt 0 ] && printf -- ' · %s%d BLOCKER%s' "$M$B" "$blk_n" "$N"
|
[ "$blk_n" -gt 0 ] && printf -- ' · %s%d BLOCKER%s' "$M$B" "$blk_n" "$N"
|
||||||
printf '\n'
|
printf '\n'
|
||||||
fi
|
fi
|
||||||
# overall verdict — bold label, filled badge
|
# overall verdict — bold label, filled badge (i18n for FR console/HTML)
|
||||||
|
local _ok_msg _warn_msg _fail_msg
|
||||||
|
_ok_msg=$(i18n_text 'all clear')
|
||||||
|
_warn_msg=$(i18n_text 'warnings only (no hard fail)')
|
||||||
if [ "$fail_n" -eq 0 ] && [ "$blk_n" -eq 0 ] && [ "$warn_n" -eq 0 ]; then
|
if [ "$fail_n" -eq 0 ] && [ "$blk_n" -eq 0 ] && [ "$warn_n" -eq 0 ]; then
|
||||||
if [ "${BOX:-0}" = "1" ]; then
|
if [ "${BOX:-0}" = "1" ]; then
|
||||||
printf -- ' %s┌ OK ┐%s %s%sall clear%s\n' "$BG_OK" "$N" "$G" "$B" "$N"
|
printf -- ' %s┌ OK ┐%s %s%s%s%s\n' "$BG_OK" "$N" "$G" "$B" "$_ok_msg" "$N"
|
||||||
else
|
else
|
||||||
printf -- ' %s[ OK ] %sall clear%s\n' "$G" "$B" "$N"
|
printf -- ' %s[ OK ] %s%s%s\n' "$G" "$B" "$_ok_msg" "$N"
|
||||||
fi
|
fi
|
||||||
elif [ "$fail_n" -eq 0 ] && [ "$blk_n" -eq 0 ]; then
|
elif [ "$fail_n" -eq 0 ] && [ "$blk_n" -eq 0 ]; then
|
||||||
if [ "${BOX:-0}" = "1" ]; then
|
if [ "${BOX:-0}" = "1" ]; then
|
||||||
printf -- ' %s┌ WARN ┐%s %s%swarnings only (no hard fail)%s\n' "$BG_WARN" "$N" "$Y" "$B" "$N"
|
printf -- ' %s┌ WARN ┐%s %s%s%s%s\n' "$BG_WARN" "$N" "$Y" "$B" "$_warn_msg" "$N"
|
||||||
else
|
else
|
||||||
printf -- ' %s[ WARN ] %swarnings only (no hard fail)%s\n' "$Y" "$B" "$N"
|
printf -- ' %s[ WARN ] %s%s%s\n' "$Y" "$B" "$_warn_msg" "$N"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
local _fail_msg
|
|
||||||
_fail_msg=$(i18n_text 'failed — see list above')
|
_fail_msg=$(i18n_text 'failed — see list above')
|
||||||
if [ "${BOX:-0}" = "1" ]; then
|
if [ "${BOX:-0}" = "1" ]; then
|
||||||
printf -- ' %s┌ ERROR ┐%s %s%s%s%s\n' "$BG_ERR" "$N" "$R" "$B" "$_fail_msg" "$N"
|
printf -- ' %s┌ ERROR ┐%s %s%s%s%s\n' "$BG_ERR" "$N" "$R" "$B" "$_fail_msg" "$N"
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,12 @@ def ui(lang: str, key: str, **kwargs) -> str:
|
||||||
"stack_i4": "HTML host: {host}",
|
"stack_i4": "HTML host: {host}",
|
||||||
"stack_i5": "Timer: host-agent path + 4h · /monitoring on bank, exchange, merchant fronts",
|
"stack_i5": "Timer: host-agent path + 4h · /monitoring on bank, exchange, merchant fronts",
|
||||||
"stack_i_phases": "Log header phases= {phases}",
|
"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_title": "Monitoring pages (suite HTML)",
|
||||||
"pages_summary": "Public sticky-bar reports · phase monpages · part of taler-monitoring",
|
"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):",
|
"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_merchant": "Backend marchand / SPA HTTPS public + contrôles inside conteneur",
|
||||||
"focus_stack": "Pile Taler public + inside",
|
"focus_stack": "Pile Taler public + inside",
|
||||||
"stack_title": "Surveillance de pile · {host}",
|
"stack_title": "Surveillance de pile · {host}",
|
||||||
"stack_summary": "{phases} · public + inside",
|
"stack_summary": "{phases} · public + interne",
|
||||||
"stack_i1": "Focus : {focus}",
|
"stack_i1": "Focus : {focus}",
|
||||||
"stack_i2": "Phases de cette exécution : {phases}",
|
"stack_i2": "Phases de cette exécution : {phases}",
|
||||||
"stack_i3": "Typique : URL publiques (HTTPS, QR, perf), inside (podman/ssh), versions des paquets",
|
"stack_i3": "Typique : URL publiques (HTTPS, QR, perf), inside (podman/ssh), versions des paquets",
|
||||||
"stack_i4": "Hôte HTML : {host}",
|
"stack_i4": "Hôte HTML : {host}",
|
||||||
"stack_i5": "Minuterie : host-agent path + 4 h · /monitoring sur bank, exchange, fronts marchands",
|
"stack_i5": "Minuterie : host-agent path + 4 h · /monitoring sur bank, exchange, fronts marchands",
|
||||||
"stack_i_phases": "En-tête de journal phases= {phases}",
|
"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_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_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",
|
"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"
|
return "meta"
|
||||||
if "numbered checks" in low:
|
if "numbered checks" in low:
|
||||||
return "meta"
|
return "meta"
|
||||||
if "totals:" in low:
|
if "totals:" in low or "totaux :" in low or low.strip().startswith("totaux"):
|
||||||
return "sum-totals"
|
return "sum-totals"
|
||||||
# SUMMARY verdict chrome (not a check) — keep distinct for HTML boxes
|
# 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"
|
return "sum-verdict-warn"
|
||||||
if "all clear" in low:
|
if "all clear" in low or "tout est clair" in low:
|
||||||
return "sum-verdict-ok"
|
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"
|
return "sum-verdict-err"
|
||||||
# host-agent tees converter "wrote … (errors=N …)" into the same log
|
# host-agent tees converter "wrote … (errors=N …)" into the same log
|
||||||
if line.lstrip().lower().startswith("wrote ") and "errors=" in low:
|
if line.lstrip().lower().startswith("wrote ") and "errors=" in low:
|
||||||
|
|
@ -443,8 +455,12 @@ def is_summary_error_line(ln: str) -> bool:
|
||||||
return True
|
return True
|
||||||
if "warnings only" in low or "all clear" in low:
|
if "warnings only" in low or "all clear" in low:
|
||||||
return True
|
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")
|
# 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
|
ln
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|
@ -1066,6 +1082,16 @@ def sticky_bar_html(
|
||||||
version_html = f'<span class="version-link muted">{html.escape(ver)}</span>'
|
version_html = f'<span class="version-link muted">{html.escape(ver)}</span>'
|
||||||
else:
|
else:
|
||||||
version_html = ""
|
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
|
# Compact sticky row always visible; "Was geprüft wird" expands inside sticky-bar
|
||||||
return f"""
|
return f"""
|
||||||
<div class="sticky-bar sticky-{level}" id="status-bar" role="status"
|
<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}>
|
data-scope-kind="{scope_kind}" {filter_i18n}>
|
||||||
<div class="sticky-bar-row primary">
|
<div class="sticky-bar-row primary">
|
||||||
<span class="status-pill sticky-{level}">{html.escape(status_txt)}</span>
|
<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>
|
<span class="sep">·</span>
|
||||||
{err_stat}
|
{err_stat}
|
||||||
<span class="sep">·</span>
|
<span class="sep">·</span>
|
||||||
|
|
@ -1098,7 +1124,7 @@ def sticky_bar_html(
|
||||||
</div>
|
</div>
|
||||||
<div class="sticky-scope-panel" id="sticky-scope-panel" hidden>
|
<div class="sticky-scope-panel" id="sticky-scope-panel" hidden>
|
||||||
<div class="sticky-bar-row secondary">
|
<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}
|
{html.escape(ui(lang, "source"))} {commit_html}{suite_bit}
|
||||||
{(" · " + other) if other else ""}
|
{(" · " + other) if other else ""}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue