[IMP] script todo: dashboard de suivi — défaut OUI

« Suivi interactif (dashboard) ? » répondait NON par défaut (réponse vide).
Le défaut est désormais OUI : nouveau helper _is_yes_default_yes (vide = oui)
et libellé « (O/n, défaut : oui) » / « (Y/n, default: yes) ».

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mathieu Benoit 2026-07-30 00:09:37 -04:00
parent e3c548e57b
commit c60b3f5cbd
2 changed files with 9 additions and 3 deletions

View file

@ -2345,6 +2345,12 @@ class TODO:
"""Réponse affirmative, FR et EN (o/oui/y/yes).""" """Réponse affirmative, FR et EN (o/oui/y/yes)."""
return ans.strip().lower() in ("y", "yes", "o", "oui") return ans.strip().lower() in ("y", "yes", "o", "oui")
@staticmethod
def _is_yes_default_yes(ans):
"""Comme _is_yes mais le DÉFAUT (réponse vide) est OUI."""
a = ans.strip().lower()
return a == "" or a in ("y", "yes", "o", "oui")
@staticmethod @staticmethod
def _is_no(ans): def _is_no(ans):
"""Réponse négative explicite, FR et EN (n/no/non). Utile pour les """Réponse négative explicite, FR et EN (n/no/non). Utile pour les
@ -3248,7 +3254,7 @@ class TODO:
if self._is_yes(ans): if self._is_yes(ans):
install_branch = self._qemu_pick_branch() install_branch = self._qemu_pick_branch()
_label, install_cmd = self._qemu_pick_install_profile() _label, install_cmd = self._qemu_pick_install_profile()
install_monitor = self._is_yes( install_monitor = self._is_yes_default_yes(
input(t("Interactive monitoring dashboard? (y/N): ")) input(t("Interactive monitoring dashboard? (y/N): "))
) )

View file

@ -2102,8 +2102,8 @@ TRANSLATIONS = {
"en": "ERPLibre Deployment (+ QEMU + dev)", "en": "ERPLibre Deployment (+ QEMU + dev)",
}, },
"Interactive monitoring dashboard? (y/N): ": { "Interactive monitoring dashboard? (y/N): ": {
"fr": "Suivi interactif (dashboard) ? (o/N, défaut : non) : ", "fr": "Suivi interactif (dashboard) ? (O/n, défaut : oui) : ",
"en": "Interactive monitoring dashboard? (y/N, default: no): ", "en": "Interactive monitoring dashboard? (Y/n, default: yes): ",
}, },
"resolving IP...": { "resolving IP...": {
"fr": "résolution de l'IP...", "fr": "résolution de l'IP...",