[FIX] qemu plan : retirer l'avertissement que NixOS ne s'installe pas
Le dernier écran avant de créer portait « ERPLibre ne s'installe pas encore sur NixOS : la VM est créée, l'installation échoue ». Il s'y installe, de bout en bout : clone, make install_os, make install_odoo_18, Odoo enregistré en service et servant 8069. Un avertissement périmé à cet endroit ne fait pas qu'induire en erreur, il décourage d'essayer ce qui marche — et c'est la seule ligne de l'écran qui parle d'un échec. Sa traduction part avec lui, une entrée que personne n'appelle vieillissant sans qu'on le sache. --- EN --- The last screen before creating carried « ERPLibre does not install on NixOS yet: the VM is created, the install fails ». It does install, end to end: clone, make install_os, make install_odoo_18, Odoo registered as a service and serving 8069. A stale warning there does not merely mislead, it discourages trying what works — and it is the screen's only line that speaks of a failure. Its translation goes with it, an entry nobody calls ageing unnoticed. Assisted-by: Claude Opus 5
This commit is contained in:
parent
286328215d
commit
36fa84b037
3 changed files with 35 additions and 28 deletions
|
|
@ -1128,14 +1128,6 @@ class QemuDeployMixin:
|
||||||
lignes.append(
|
lignes.append(
|
||||||
t("release pinned to %s, sha256 fixed in the repository") % tag
|
t("release pinned to %s, sha256 fixed in the repository") % tag
|
||||||
)
|
)
|
||||||
if spec.get("install") and "nixos" in distros:
|
|
||||||
lignes.append(
|
|
||||||
"⚠ "
|
|
||||||
+ t(
|
|
||||||
"ERPLibre does not install on NixOS yet: the VM is"
|
|
||||||
" created, the install fails"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
return lignes
|
return lignes
|
||||||
|
|
||||||
def _qemu_sudo_lines(self):
|
def _qemu_sudo_lines(self):
|
||||||
|
|
|
||||||
|
|
@ -5811,17 +5811,6 @@ TRANSLATIONS = {
|
||||||
"fr": "release épinglée sur %s, sha256 figée dans le dépôt",
|
"fr": "release épinglée sur %s, sha256 figée dans le dépôt",
|
||||||
"en": "release pinned to %s, sha256 fixed in the repository",
|
"en": "release pinned to %s, sha256 fixed in the repository",
|
||||||
},
|
},
|
||||||
"ERPLibre does not install on NixOS yet: the VM is created, the install"
|
|
||||||
" fails": {
|
|
||||||
"fr": (
|
|
||||||
"ERPLibre ne s'installe pas encore sur NixOS : la VM est créée,"
|
|
||||||
" l'installation échoue"
|
|
||||||
),
|
|
||||||
"en": (
|
|
||||||
"ERPLibre does not install on NixOS yet: the VM is created, the"
|
|
||||||
" install fails"
|
|
||||||
),
|
|
||||||
},
|
|
||||||
# Pourquoi le déploiement demande un mot de passe, dit AVANT l'invite.
|
# Pourquoi le déploiement demande un mot de passe, dit AVANT l'invite.
|
||||||
"sudo password: asked when the deployment starts": {
|
"sudo password: asked when the deployment starts": {
|
||||||
"fr": "Mot de passe sudo : demandé au lancement du déploiement, pour",
|
"fr": "Mot de passe sudo : demandé au lancement du déploiement, pour",
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,9 @@ class CeQuiSeDitALEcran(unittest.TestCase):
|
||||||
with self.subTest(distro=distro):
|
with self.subTest(distro=distro):
|
||||||
self.assertIsNone(DQ.image_source_note(distro))
|
self.assertIsNone(DQ.image_source_note(distro))
|
||||||
|
|
||||||
def test_the_recap_shows_the_link_and_the_warning(self):
|
def test_the_recap_shows_where_the_image_comes_from(self):
|
||||||
|
"""L'origine d'une image rebâtie par un tiers se dit AVANT de créer
|
||||||
|
quoi que ce soit : c'est la seule des neuf dans ce cas."""
|
||||||
todo = TODO.__new__(TODO)
|
todo = TODO.__new__(TODO)
|
||||||
spec = {
|
spec = {
|
||||||
"vms": [{"name": "vm", "distro": "nixos"}],
|
"vms": [{"name": "vm", "distro": "nixos"}],
|
||||||
|
|
@ -174,16 +176,40 @@ class CeQuiSeDitALEcran(unittest.TestCase):
|
||||||
texte = " ".join(lignes)
|
texte = " ".join(lignes)
|
||||||
self.assertIn(DQ.NIXOS_IMAGE_TAG, texte)
|
self.assertIn(DQ.NIXOS_IMAGE_TAG, texte)
|
||||||
self.assertIn("https://", texte)
|
self.assertIn("https://", texte)
|
||||||
self.assertIn("ERPLibre", texte)
|
|
||||||
|
|
||||||
def test_without_an_install_the_warning_is_not_shown(self):
|
def test_the_plan_no_longer_promises_the_install_will_fail(self):
|
||||||
"""Une VM NixOS sans installation ERPLibre n'a rien qui échoue : le
|
"""L'écran portait « ERPLibre ne s'installe pas encore sur NixOS ».
|
||||||
dire serait du bruit."""
|
Il s'y installe, vérifié de bout en bout sur une VM — un avertissement
|
||||||
|
périmé sur le DERNIER écran avant de créer ne fait pas qu'induire en
|
||||||
|
erreur, il décourage d'essayer ce qui marche.
|
||||||
|
|
||||||
|
L'épreuve porte sur le texte RENDU et non sur la clé de traduction :
|
||||||
|
c'est ce que l'opérateur lit, et la clé pouvait partir en laissant la
|
||||||
|
phrase ailleurs."""
|
||||||
todo = TODO.__new__(TODO)
|
todo = TODO.__new__(TODO)
|
||||||
spec = {"vms": [{"name": "vm", "distro": "nixos"}], "install": None}
|
for install in ({"branch": "develop"}, None):
|
||||||
with mock.patch.object(TODO, "_qemu_import_module", return_value=DQ):
|
spec = {
|
||||||
lignes = todo._qemu_image_lines(spec)
|
"vms": [{"name": "vm", "distro": "nixos"}],
|
||||||
self.assertNotIn("ERPLibre", " ".join(lignes))
|
"install": install,
|
||||||
|
}
|
||||||
|
with self.subTest(install=bool(install)):
|
||||||
|
with mock.patch.object(
|
||||||
|
TODO, "_qemu_import_module", return_value=DQ
|
||||||
|
):
|
||||||
|
texte = " ".join(todo._qemu_image_lines(spec))
|
||||||
|
for interdit in ("ERPLibre", "échoue", "fails"):
|
||||||
|
self.assertNotIn(interdit, texte)
|
||||||
|
|
||||||
|
def test_no_orphan_translation_is_left_behind(self):
|
||||||
|
"""Une entrée que plus personne n'appelle vieillit sans qu'on le
|
||||||
|
sache, et réapparaît le jour où quelqu'un la recopie."""
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
racine = Path(__file__).resolve().parent.parent
|
||||||
|
i18n = (racine / "script/todo/todo_i18n.py").read_text(
|
||||||
|
encoding="utf-8"
|
||||||
|
)
|
||||||
|
self.assertNotIn("does not install on NixOS", i18n)
|
||||||
|
|
||||||
def test_a_deployment_without_nixos_says_nothing(self):
|
def test_a_deployment_without_nixos_says_nothing(self):
|
||||||
todo = TODO.__new__(TODO)
|
todo = TODO.__new__(TODO)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue