diff --git a/VERSION b/VERSION index f2380cc..e34208c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.3 +1.15.4 diff --git a/VERSIONS.md b/VERSIONS.md index b900ef4..ee61b4c 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -17,6 +17,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.8.0`). File `VERSION` omits the `v` pre | 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.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). | diff --git a/i18n.sh b/i18n.sh index 1b0c90d..a5a2285 100644 --- a/i18n.sh +++ b/i18n.sh @@ -73,6 +73,11 @@ i18n_text() { "pay/withdraw cannot finish") printf 'paiement/retrait impossible a terminer' ;; "SUMMARY") printf 'RESUME' ;; "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' ;; "disk") printf 'disque' ;; "package") printf 'paquet' ;; diff --git a/lib.sh b/lib.sh index d9ca60c..4e7f137 100755 --- a/lib.sh +++ b/lib.sh @@ -944,7 +944,7 @@ _summary_totals_box() { [ "$blk_n" -gt 0 ] && _sum_row "$ROW_BLK" "$BG_BLK" "BLOCK" "$blk_n" "$M" # 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" [ "$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" @@ -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" [ "$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" - 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" [ "$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" [ "$blk_n" -gt 0 ] && printf -- ' · %s%d BLOCKER%s' "$M$B" "$blk_n" "$N" printf '\n' 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 [ "${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 - printf -- ' %s[ OK ] %sall clear%s\n' "$G" "$B" "$N" + printf -- ' %s[ OK ] %s%s%s\n' "$G" "$B" "$_ok_msg" "$N" fi elif [ "$fail_n" -eq 0 ] && [ "$blk_n" -eq 0 ]; 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 - 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 else - local _fail_msg _fail_msg=$(i18n_text 'failed — see list above') if [ "${BOX:-0}" = "1" ]; then printf -- ' %s┌ ERROR ┐%s %s%s%s%s\n' "$BG_ERR" "$N" "$R" "$B" "$_fail_msg" "$N" diff --git a/site-gen/console_to_html.py b/site-gen/console_to_html.py index 89dd4ee..0874c1e 100755 --- a/site-gen/console_to_html.py +++ b/site-gen/console_to_html.py @@ -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'{html.escape(ver)}' 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"""