Compare commits
30
Commits
7b4d7ccae5
...
47fd8340a0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47fd8340a0
|
||
|
|
7ad68dcdae
|
||
|
|
63139444f6
|
||
|
|
0516cf705f
|
||
|
|
0e018acc4d
|
||
|
|
45baf4d2f3
|
||
|
|
896ed22aad
|
||
|
|
9d32263fa7
|
||
|
|
9780a6ff28
|
||
|
|
8a21ce8ea3
|
||
|
|
b10251bf91
|
||
|
|
08a81f635b
|
||
|
|
70cfa68743
|
||
|
|
70b64754af
|
||
|
|
79f32f94bc
|
||
|
|
f25937f059
|
||
|
|
8482a3a7c0
|
||
|
|
2307a63d26
|
||
|
|
50fef2d212
|
||
|
|
55be5f91e0
|
||
|
|
b297c435d3
|
||
|
|
aab5ab03df
|
||
|
|
f01a49cc60
|
||
|
|
299039fe6f
|
||
|
|
baabd9568e
|
||
|
|
2a71f0e640
|
||
|
|
2a2890302c
|
||
|
|
c79ef4e72f
|
||
|
|
9ea68ef441
|
||
|
|
bc103f77b7
|
No files matched your search
@@ -31,7 +31,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
|
||||
- **Mémoire** : **4 Go recommandés** pour installer (2 Go minimum — swap **zram** intégré au live ET au système installé ; sous 2 Go le live avertit, à 1 Go sans zram l'installateur graphique gèle)
|
||||
- **Bureaux installables** : GNOME, KDE Plasma, XFCE, **Hyprland** (Wayland — non compatible VR), **i3** (X11 — compatible VR/SteamVR), ou ligne de commande seule
|
||||
- **Disques** : NVMe, SATA, et les disques **cachés derrière un contrôleur Intel VMD** (BIOS réglé sur « Intel RST », « Optane » ou « RAID » — le cas de la plupart des portables récents). Aucun réglage BIOS à changer, et rien à faire : le module est chargé avant que l'installateur ne liste les disques, et inscrit dans l'initramfs du système installé pour qu'il redémarre. **gparted** est dans le live pour les cas qui demandent un coup d'œil à la table
|
||||
- **Boot** : UEFI (systemd-boot) + BIOS (syslinux, splash **FWS**, `DEFAULT fws`) — entrées *normale*, *safe graphics (nomodeset)*, *Réparer FWS (recovery)* et *speech*
|
||||
- **Boot** : UEFI (GRUB, qui lit noyau et initramfs directement dans l'ISO — pas de seconde copie dans la partition EFI) + BIOS (syslinux, splash **FWS**, `DEFAULT fws`) — entrées *normale*, *safe graphics (nomodeset)*, *Réparer FWS (recovery)* et *speech*
|
||||
- **Récupération** : accessible depuis le live (entrée de boot), depuis le **menu GRUB du système installé** (« Réparer FWS ») et depuis son **menu d'applications** (« Récupération FWS », élévation polkit)
|
||||
- **Compression** : squashfs (xz)
|
||||
|
||||
@@ -40,7 +40,7 @@ Le projet est conçu pour être **construit depuis Windows via WSL** (les script
|
||||
## Ce qu'il y a dans FWS
|
||||
|
||||
### À l'installation
|
||||
- **Parcours linéaire** : Langue → Connexion à Internet → Date et heure → Destination → Bureau → Compte utilisateur → Mot de passe administrateur → Récapitulatif → Installation. Aucun menu où l'on peut oublier un écran : chaque étape est présentée, dans l'ordre
|
||||
- **Parcours linéaire** : Langue → Connexion à Internet → Date et heure → Destination → Compte utilisateur → Mot de passe administrateur → Bureau → Récapitulatif → Installation. Aucun menu où l'on peut oublier un écran : chaque étape est présentée, dans l'ordre
|
||||
- **Écran « Prise en charge du disque », uniquement s'il est nécessaire** : sur une machine dont le SSD est caché derrière un contrôleur Intel VMD et que rien n'a réussi à révéler, un écran l'explique sans jargon et propose un bouton. Sur toutes les autres machines il ne s'affiche jamais — Anaconda le saute sans même le construire. FWS ne demande **pas** de basculer le BIOS en AHCI : c'est souvent impossible, et ça empêche Windows de démarrer en dual-boot. Ce recours n'est proposé qu'en dernier, avec l'avertissement qui va avec
|
||||
- **Retour arrière du dernier écran jusqu'au premier**, y compris pour revenir sur la langue — donc sur la disposition clavier — après avoir avancé. Revenir en arrière n'applique rien : aucune écriture disque n'est déclenchée
|
||||
- **Clavier appliqué immédiatement** : la disposition déduite de la langue choisie au 1er écran est poussée dans l'installateur en cours. Les mots de passe Wi-Fi et de compte ne se tapent plus en QWERTY US
|
||||
@@ -326,6 +326,16 @@ Le dépôt distant est partagé avec d'autres projets (fws-deskmanager, fws-kitt
|
||||
- **Swap zram** (live + installé) : `configs/releng/airootfs/etc/systemd/zram-generator.conf` (paquet `zram-generator`)
|
||||
- **Branding ISO** : `configs/releng/profiledef.sh` (`iso_name`, `iso_label`, `iso_publisher`) ; **visuel du menu BIOS** : `configs/releng/syslinux/splash.png` (PNG 8-bit) ; **nom/version affichés par l'installateur** : exports `ANACONDA_PRODUCTNAME`/`ANACONDA_PRODUCTVERSION` dans le `.xinitrc` (lus depuis l'os-release du live)
|
||||
|
||||
### Traductions de l'installateur
|
||||
|
||||
Anaconda traduit ses propres écrans. Tout ce que FWS ajoute (écrans Connexion, Prise en charge du disque, Bureau, Récapitulatif, boutons Précédent/Suivant, messages de progression, fenêtres de fin d'installation) vient d'**un seul fichier** : `configs/baseline/airootfs/usr/local/share/fws/installer-translations.toml`.
|
||||
|
||||
- **Une table par texte, une ligne par langue**, avec les codes de langue d'Anaconda (`fr`, `de`, `pt_BR`, `"sr@latin"`…). `en` est obligatoire : c'est le texte affiché pour toute langue absente. Un code de territoire (`fr_CH`) l'emporte sur la langue (`fr`) pour ce territoire.
|
||||
- **Traduction dynamique** : le code demande `t("clé")` dans la langue choisie au premier écran, et chaque écran relit ses textes à chaque affichage. Revenir changer de langue retraduit donc tout le parcours.
|
||||
- **Côté code** : `t()` vient de `pyanaconda/ui/gui/spokes/fws_i18n.py` ; le `%post` passe des clés (`fws-install-step 32 fws:progress.desktop`) que l'écran de progression traduit ; les scripts shell appellent `fws-i18n <clé> [champ=valeur]`.
|
||||
- **Avant le choix de la langue** (alerte mémoire, écran d'attente du `.xinitrc`), les textes sont en anglais.
|
||||
- **Contrôle** : `python3 scripts/check-installer-translations.py` vérifie le fichier (anglais présent, mêmes `{champs}` dans chaque langue, aucune clé utilisée par le code sans traduction) et affiche la couverture par langue. `build.sh` et `build-offi.sh` le lancent avant de construire.
|
||||
|
||||
> ⚠ **Règle d'or de la fusion** : au build, `configs/baseline/*` est copié **par-dessus** `configs/releng/*` — tout fichier homonyme de baseline **écrase** celui de releng. Ça concerne notamment `profiledef.sh`, `packages.x86_64`, `pacman.conf`, `efiboot/loader/entries/01-archiso-linux.conf` et `syslinux/syslinux.cfg` : **toute modification d'un de ces fichiers doit être reportée dans les deux profils** (des divergences ont déjà fait perdre silencieusement `firewalld` et le cap `udev.event_timeout` d'une ISO ; un `syslinux-linux.cfg` stock orphelin côté baseline définissait aussi un label `arch` sans le cap — supprimé, et le menu BIOS pointe désormais explicitement sur `DEFAULT fws`). Vérifier avec :
|
||||
> ```bash
|
||||
> comm -12 <(cd configs/baseline && find . -type f | sort) <(cd configs/releng && find . -type f | sort)
|
||||
|
||||
+22
-27
@@ -3,8 +3,8 @@
|
||||
# FWS — Build OFFICIEL versionné de l'ISO (archiso)
|
||||
#
|
||||
# IDENTIQUE à build.sh (même bascule conteneur/WSL, --network=host, fusion
|
||||
# baseline, MÊME injection local-repo → donc même paquet anaconda avec le champ
|
||||
# Hostname), avec EN PLUS uniquement le RENOMMAGE :
|
||||
# baseline, MÊMES paquets FWS tirés du dépôt distant [fws] → donc même paquet
|
||||
# anaconda avec le champ Hostname), avec EN PLUS uniquement le RENOMMAGE :
|
||||
# - demande la version (major.minor.build) + le nom de variante, le fichier
|
||||
# VERSION servant de défaut,
|
||||
# - nomme l'ISO fws-<version>-<nom>.iso (ex. fws-1.5.0-cli.iso),
|
||||
@@ -202,7 +202,7 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then
|
||||
# On les rend au propriétaire du dépôt pour confort côté hôte.
|
||||
OWNER="$(stat -c '%u:%g' "$REPO_DIR" 2>/dev/null || true)"
|
||||
if [ -n "$OWNER" ]; then
|
||||
for d in out local-repo; do
|
||||
for d in out; do
|
||||
[ -e "$REPO_DIR/$d" ] && "${SUDO[@]}" chown -R "$OWNER" "$REPO_DIR/$d" 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
@@ -240,6 +240,16 @@ fi
|
||||
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo "==> Dossier de travail : $WORK_DIR"
|
||||
|
||||
# A broken translations file only shows once the ISO boots: check it now,
|
||||
# before anything long. A bare Arch container may lack python3: skip then.
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
echo "==> Vérification des traductions de l'installateur..."
|
||||
python3 -I "$WORK_DIR/scripts/check-installer-translations.py" \
|
||||
|| { echo -e "\e[31m[ERR] Traductions de l'installateur invalides (détail ci-dessus).\e[0m" >&2; exit 1; }
|
||||
else
|
||||
echo "==> python3 absent : vérification des traductions sautée."
|
||||
fi
|
||||
|
||||
# ============================================================
|
||||
# Version (major.minor.build) + nom de la variante.
|
||||
# Déjà demandés sur l'hôte (FWS_ISO_VERSION/FWS_ISO_TAG passés via -e) ; sinon
|
||||
@@ -341,26 +351,6 @@ echo "==> Vérification des services systemd..."
|
||||
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/ 2>/dev/null || echo " (aucun service)"
|
||||
ls /tmp/fws-build/releng/airootfs/etc/systemd/system/multi-user.target.wants/ 2>/dev/null || echo " (aucun symlink)"
|
||||
|
||||
# Copie le repo local (fws-pacmanage + fws-dnd + deps Anaconda packagées)
|
||||
if ls "$WORK_DIR/local-repo/"*.pkg.tar.zst &>/dev/null 2>&1; then
|
||||
echo "==> Copie du repo local fws-local..."
|
||||
mkdir -p /tmp/fws-build/local-repo
|
||||
cp -a "$WORK_DIR/local-repo/"* /tmp/fws-build/local-repo/
|
||||
|
||||
echo "==> Injection [fws-local] dans pacman.conf..."
|
||||
sed -i '/^\[fws-local\]/,/^$/d' /tmp/fws-build/releng/pacman.conf
|
||||
PACMAN_TMP=$(mktemp)
|
||||
printf '[fws-local]\nSigLevel = Optional TrustAll\nServer = file:///tmp/fws-build/local-repo\n\n' \
|
||||
> "$PACMAN_TMP"
|
||||
cat /tmp/fws-build/releng/pacman.conf >> "$PACMAN_TMP"
|
||||
mv "$PACMAN_TMP" /tmp/fws-build/releng/pacman.conf
|
||||
|
||||
echo "==> Vérification pacman.conf :"
|
||||
head -5 /tmp/fws-build/releng/pacman.conf
|
||||
else
|
||||
echo "==> Aucun repo local détecté."
|
||||
fi
|
||||
|
||||
echo "==> Correction des retours à la ligne Windows (dos2unix)..."
|
||||
pacman -S --needed --noconfirm dos2unix
|
||||
find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
|
||||
@@ -368,11 +358,16 @@ find /tmp/fws-build/releng -type f -exec dos2unix {} + 2>/dev/null
|
||||
# ── Pré-vol : résolution de TOUS les paquets du profil ──
|
||||
# « error: target not found » ne doit plus surgir en plein mkarchiso : on
|
||||
# résout la liste complète (packages.x86_64 fusionné) contre le pacman.conf
|
||||
# du profil (fws-local injecté inclus) dans une base temporaire. S'il manque
|
||||
# du profil (dépôt distant [fws] inclus) dans une base temporaire. S'il manque
|
||||
# un paquet, on échoue ICI avec la liste + le geste correctif.
|
||||
echo "==> Pré-vol : résolution des paquets du profil..."
|
||||
PREFLIGHT_DB="$(mktemp -d)"
|
||||
pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null
|
||||
if ! pacman -Sy --config /tmp/fws-build/releng/pacman.conf --dbpath "$PREFLIGHT_DB" >/dev/null; then
|
||||
rm -rf "$PREFLIGHT_DB"
|
||||
echo -e "\e[31mBases des dépôts du profil illisibles (miroir Arch ou dépôt [fws] injoignable ?).\e[0m" >&2
|
||||
echo "Vérifie l'accès réseau (curl -I https://repo.laxacube.ch/x86_64/fws.db), puis relance." >&2
|
||||
exit 1
|
||||
fi
|
||||
mapfile -t PROFILE_PKGS < <(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' \
|
||||
/tmp/fws-build/releng/packages.x86_64)
|
||||
# -Sp n'installe rien (affiche les URLs) ; LC_ALL=C fige le motif d'erreur.
|
||||
@@ -384,8 +379,8 @@ rm -rf "$PREFLIGHT_DB"
|
||||
if [ -n "$MISSING" ]; then
|
||||
echo -e "\e[31mPaquets introuvables dans les dépôts du profil :\e[0m" >&2
|
||||
printf ' \e[31m%s\e[0m\n' $MISSING >&2
|
||||
echo -e "\e[33mDépôt fws-local absent/incomplet ? Lance ./setup-aur.sh (construit" >&2
|
||||
echo -e "anaconda, fws-pacmanage, fws-dnd, …) puis relance ce script.\e[0m" >&2
|
||||
echo -e "\e[33mPaquet FWS pas encore publié sur le dépôt [fws] (anaconda, fws-pacmanage," >&2
|
||||
echo -e "fws-dnd, …) ? Publie-le, ou corrige son nom dans packages.x86_64, puis relance.\e[0m" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "==> Pré-vol OK : ${#PROFILE_PKGS[@]} paquets résolus."
|
||||
|
||||
@@ -199,6 +199,16 @@ fi
|
||||
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo "==> Dossier de travail : $WORK_DIR"
|
||||
|
||||
# A broken translations file only shows once the ISO boots: check it now,
|
||||
# before anything long. A bare Arch container may lack python3: skip then.
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
echo "==> Vérification des traductions de l'installateur..."
|
||||
python3 -I "$WORK_DIR/scripts/check-installer-translations.py" \
|
||||
|| { echo -e "\e[31m[ERR] Traductions de l'installateur invalides (détail ci-dessus).\e[0m" >&2; exit 1; }
|
||||
else
|
||||
echo "==> python3 absent : vérification des traductions sautée."
|
||||
fi
|
||||
|
||||
# pacman ≥ 7 sandboxe les ops FS via landlock, non supporté par le kernel
|
||||
# WSL ni (selon le noyau) par le conteneur → désactivation. Idempotent,
|
||||
# sans effet sur Arch natif.
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
HOOKS=(base udev modconf archiso block filesystems)
|
||||
# The image is built once and booted on every machine: xz over decompressed
|
||||
# modules lets the whole archive share one dictionary, ~9 MiB smaller than
|
||||
# per-module zstd. Live only: the installer removes this file from the target.
|
||||
COMPRESSION="xz"
|
||||
COMPRESSION_OPTIONS=(-9e)
|
||||
MODULES_DECOMPRESS="yes"
|
||||
@@ -11,4 +11,8 @@ LocalFileSigLevel = Optional
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[fws]
|
||||
Server = https://repo.laxacube.ch/x86_64
|
||||
SigLevel = Optional TrustAll
|
||||
@@ -40,8 +40,9 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
# laisser l'utilisateur croire à un bug.
|
||||
_MEMKB=$(awk '/^MemTotal:/{print $2}' /proc/meminfo 2>/dev/null)
|
||||
if [ -n "$_MEMKB" ] && [ "$_MEMKB" -lt 2000000 ] && command -v zenity >/dev/null 2>&1; then
|
||||
zenity --warning --width=460 --title="FWS — mémoire insuffisante ?" \
|
||||
--text="<b>Cette machine n'a que $(( _MEMKB / 1024 )) Mo de RAM.</b>\n\nL'installateur graphique peut geler en dessous de 2 Go.\nEn VM : augmente la mémoire (4 Go recommandés) puis redémarre.\n\nOK pour tenter quand même." 2>/dev/null
|
||||
# Shown before the user picks a language: English, like the splash below.
|
||||
zenity --warning --width=460 --title="FWS — not enough memory?" \
|
||||
--text="<b>This machine only has $(( _MEMKB / 1024 )) MB of RAM.</b>\n\nThe graphical installer may freeze below 2 GB.\nIn a virtual machine: raise the memory (4 GB recommended), then restart.\n\nOK to try anyway." 2>/dev/null
|
||||
fi
|
||||
|
||||
# ÉCRAN D'ATTENTE immédiat : le démarrage d'anaconda peut prendre 2 à
|
||||
@@ -77,7 +78,7 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
_el=$(( _el + 3 ))
|
||||
_last=$(ls -t /tmp/storage.log /tmp/anaconda.log /tmp/program.log /tmp/dbus.log 2>/dev/null | head -n1)
|
||||
if [ -z "$_last" ]; then
|
||||
printf '# Démarrage d'"'"'Anaconda… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0
|
||||
printf '# Starting the installer… (%d min %02d s)\n' $(( _el / 60 )) $(( _el % 60 )) || exit 0
|
||||
continue
|
||||
fi
|
||||
_stamp=$(stat -c %Y "$_last" 2>/dev/null)
|
||||
@@ -93,24 +94,24 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
| cut -c1-90)
|
||||
if [ "$_quiet" -ge 240 ] && [ ! -f /tmp/fws-stall.txt ]; then
|
||||
{
|
||||
echo "=== FWS : préparation bloquée (aucune activité log depuis ${_quiet}s) ==="
|
||||
echo "--- dernier log actif : $_last"; tail -n 25 "$_last" 2>/dev/null
|
||||
echo "--- udev (workers bloqués ?)"; udevadm settle --timeout=0 2>&1
|
||||
echo "--- journal (fin)"; journalctl -b --no-pager 2>/dev/null | tail -n 60
|
||||
echo "--- dmesg (fin)"; dmesg 2>/dev/null | tail -n 40
|
||||
echo "=== FWS: preparation stalled (no log activity for ${_quiet}s) ==="
|
||||
echo "--- last active log: $_last"; tail -n 25 "$_last" 2>/dev/null
|
||||
echo "--- udev (stuck workers?)"; udevadm settle --timeout=0 2>&1
|
||||
echo "--- journal (end)"; journalctl -b --no-pager 2>/dev/null | tail -n 60
|
||||
echo "--- dmesg (end)"; dmesg 2>/dev/null | tail -n 40
|
||||
} > /tmp/fws-stall.txt 2>&1
|
||||
zenity --text-info --title="FWS — préparation bloquée : diagnostic" \
|
||||
zenity --text-info --title="FWS — preparation stalled: diagnostics" \
|
||||
--filename=/tmp/fws-stall.txt --width=1000 --height=650 2>/dev/null &
|
||||
fi
|
||||
if [ "$_quiet" -ge 60 ]; then
|
||||
printf '# ⚠ Aucune activité depuis %d s (%s) — dernier message : %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0
|
||||
printf '# ⚠ No activity for %d s (%s) — last message: %s\n' "$_quiet" "$(basename "$_last")" "$_msg" || exit 0
|
||||
else
|
||||
printf '# Préparation (%d min %02d s) — %s : %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0
|
||||
printf '# Preparing (%d min %02d s) — %s: %s\n' $(( _el / 60 )) $(( _el % 60 )) "$(basename "$_last")" "$_msg" || exit 0
|
||||
fi
|
||||
done
|
||||
) | zenity --progress --pulsate --no-cancel \
|
||||
--title="FWS" \
|
||||
--text="<b>Préparation de l'installateur FWS…</b>\n\nAnalyse du matériel et des disques en cours.\nEncore une à deux minutes, c'est normal." \
|
||||
--text="<b>Preparing the FWS installer…</b>\n\nChecking the hardware and the disks.\nOne or two more minutes: this is normal." \
|
||||
--width=560 2>/dev/null &
|
||||
_SPLASH_PID=$!
|
||||
fi
|
||||
@@ -160,6 +161,13 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
fi
|
||||
pkill -f "fws-stall.txt" 2>/dev/null
|
||||
|
||||
# The installer has closed: the dialogs below speak the language picked on
|
||||
# its first screen (saved by fws_wizard.py), not the live's default.
|
||||
if [ -s /tmp/fws-lang ]; then
|
||||
LANG="$(cat /tmp/fws-lang)"
|
||||
export LANG
|
||||
fi
|
||||
|
||||
# ATTENTION : liveinst NE propage PAS le code de sortie d'anaconda — il
|
||||
# enchaîne son propre nettoyage et sort souvent 0 même quand anaconda a
|
||||
# planté. On ne se fie donc PAS à $rc : en phase debug on regroupe TOUS les
|
||||
@@ -191,33 +199,33 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
|
||||
DBG=/tmp/fws-debug.txt
|
||||
{
|
||||
echo "===== liveinst sorti (code $rc) — logs Anaconda ====="
|
||||
echo "===== liveinst exited (code $rc) — Anaconda logs ====="
|
||||
echo
|
||||
echo "########## sortie liveinst (stdout+stderr) ##########"
|
||||
echo "########## liveinst output (stdout+stderr) ##########"
|
||||
cat "$LIVEINST_LOG" 2>/dev/null
|
||||
echo
|
||||
echo "########## %post chrooté = grub-install / mkinitcpio ##########"
|
||||
echo "########## >>> C'EST CE BLOC QUI DIT SI LE DISQUE VA BOOTER <<< ##########"
|
||||
cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log introuvable)"
|
||||
echo "########## chroot %post = grub-install / mkinitcpio ##########"
|
||||
echo "########## >>> THIS BLOCK TELLS WHETHER THE DISK WILL BOOT <<< ##########"
|
||||
cat /tmp/fws-post-chroot.log 2>/dev/null || echo "(log not found)"
|
||||
echo
|
||||
echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########"
|
||||
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(absent)"
|
||||
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(missing)"
|
||||
echo
|
||||
echo "########## Récapitulatif (page GUI fws_recap, avant install) ##########"
|
||||
cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(absent — page récap pas atteinte)"
|
||||
echo "########## Summary (fws_recap screen, before installing) ##########"
|
||||
cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(missing — summary screen not reached)"
|
||||
# The crash dialog only shows the dasbus wrapper frames; the actual
|
||||
# remote exception is at the end of this dump, and nowhere else.
|
||||
for f in /tmp/anaconda-tb-*; do
|
||||
[ -f "$f" ] || continue
|
||||
echo
|
||||
echo "########## $f (traceback Anaconda, fin) ##########"
|
||||
echo "########## $f (Anaconda traceback, end) ##########"
|
||||
tail -n 80 "$f"
|
||||
done
|
||||
for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \
|
||||
/tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do
|
||||
echo
|
||||
echo "########## $f ##########"
|
||||
tail -n 200 "$f" 2>/dev/null || echo "(absent)"
|
||||
tail -n 200 "$f" 2>/dev/null || echo "(missing)"
|
||||
done
|
||||
} >"$DBG" 2>&1
|
||||
|
||||
@@ -231,8 +239,8 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
if grep -q 'Initcpio image generation successful' /tmp/fws-post-chroot.log 2>/dev/null \
|
||||
&& grep -q 'Installation finished. No error reported.' /tmp/fws-post-chroot.log 2>/dev/null; then
|
||||
if command -v zenity >/dev/null 2>&1; then
|
||||
zenity --info --width=480 --title="FWS — installation réussie ✅" \
|
||||
--text="<b>FWS est installé sur le disque.</b>\n\n1. Clique OK pour <b>éteindre</b> la machine.\n2. <b>Retire l'ISO</b> (lecteur CD/DVD).\n3. Rallume → FWS démarre." \
|
||||
zenity --info --width=480 --title="$(fws-i18n session.success_title)" \
|
||||
--text="$(fws-i18n session.success_text)" \
|
||||
2>/dev/null
|
||||
fi
|
||||
systemctl poweroff
|
||||
@@ -252,15 +260,22 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
# logs de la machine, ça ne part pas sans un clic.
|
||||
if command -v zenity >/dev/null 2>&1; then
|
||||
(
|
||||
# zenity prints the clicked label: compare with the very same
|
||||
# translated strings.
|
||||
_close="$(fws-i18n session.close)"
|
||||
_send="$(fws-i18n session.send_report)"
|
||||
_reboot="$(fws-i18n session.reboot)"
|
||||
while :; do
|
||||
_btn="$(zenity --text-info \
|
||||
--title="FWS — l'installation ne s'est pas terminée (sortie $rc)" \
|
||||
--title="$(fws-i18n session.failure_title code="$rc")" \
|
||||
--filename="$DBG" --width=1100 --height=720 \
|
||||
--ok-label="Fermer" \
|
||||
--extra-button="Envoyer le rapport aux développeurs" \
|
||||
--extra-button="Redémarrer" 2>/dev/null)" || true
|
||||
--ok-label="$_close" \
|
||||
--extra-button="$_send" \
|
||||
--extra-button="$_reboot" 2>/dev/null)" || true
|
||||
case "$_btn" in
|
||||
"Envoyer le rapport aux développeurs")
|
||||
# Window closed (empty answer): never mistake it for a button.
|
||||
"") break ;;
|
||||
"$_send")
|
||||
# fws-bugreport pré-charge le fichier de debug,
|
||||
# montre le payload EXACT et n'envoie que sur
|
||||
# confirmation — la télémétrie reste au choix de
|
||||
@@ -272,10 +287,10 @@ if command -v liveinst >/dev/null 2>&1; then
|
||||
fws-bugreport --file "$DBG" >/dev/null 2>&1 || true
|
||||
else
|
||||
zenity --error --width=440 \
|
||||
--text="fws-bugreport est absent de cette image :\nle rapport ne peut pas être envoyé d'ici." 2>/dev/null || true
|
||||
--text="$(fws-i18n session.bugreport_missing)" 2>/dev/null || true
|
||||
fi
|
||||
;;
|
||||
"Redémarrer")
|
||||
"$_reboot")
|
||||
systemctl reboot
|
||||
break
|
||||
;;
|
||||
|
||||
@@ -12,7 +12,18 @@ set -euo pipefail
|
||||
# Anaconda (ses modules DBus font setlocale(LC_ALL, "en_US.UTF-8") au démarrage,
|
||||
# sinon « locale.Error: unsupported locale setting » → le module Boss plante).
|
||||
# ~3 Mo générés, vs 222 Mo pour le paquet glibc-locales complet.
|
||||
#
|
||||
# The installer must also be able to switch to ANY of Anaconda's languages: a
|
||||
# locale that is not generated makes Anaconda fall back to English on every
|
||||
# screen (pyanaconda/localization.py, setup_locale). So the live gets every
|
||||
# UTF-8 locale of glibc (~190 MiB in the image, ~10 MiB once compressed), while
|
||||
# /etc/locale.gen keeps its short list: the installed system is a copy of the
|
||||
# live, and its %post runs locale-gen from that file, which rebuilds the
|
||||
# archive with the chosen language only.
|
||||
cp /etc/locale.gen /etc/locale.gen.fws
|
||||
grep -E '[[:space:]]UTF-8$' /usr/share/i18n/SUPPORTED > /etc/locale.gen
|
||||
locale-gen
|
||||
mv -f /etc/locale.gen.fws /etc/locale.gen
|
||||
|
||||
# --- Overlays pyanaconda (écran de progression FWS, journal en direct) ---------------------------
|
||||
# mkarchiso copie l'airootfs AVANT le pacstrap (cf. fws/mkarchiso :
|
||||
|
||||
+36
-12
@@ -16,21 +16,29 @@
|
||||
# « pacman -S » du bureau + d'un navigateur (Firefox), et active le display
|
||||
# manager. « cli » (défaut) = aucun bureau, rien à installer.
|
||||
|
||||
from pyanaconda.core.i18n import CN_, _
|
||||
from pyanaconda.core.i18n import CN_
|
||||
from pyanaconda.ui.categories.software import SoftwareCategory
|
||||
from pyanaconda.ui.gui.spokes import NormalSpoke
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
|
||||
__all__ = ["FWSDesktopSpoke"]
|
||||
|
||||
|
||||
# clé interne (écrite dans /tmp/fws-desktop) → libellé affiché dans le statut.
|
||||
_CHOICES = [
|
||||
("cli", _("Command line only (no desktop)")),
|
||||
("gnome", "GNOME"),
|
||||
("kde", "KDE Plasma"),
|
||||
("hyprland", "Hyprland — Wayland (non compatible VR)"),
|
||||
("i3", "i3 — X11 (compatible VR : SteamVR)"),
|
||||
("xfce", "XFCE"),
|
||||
]
|
||||
def _choices():
|
||||
# A function, not a constant: the labels must follow the language picked
|
||||
# on the first screen, which can change after this module is imported.
|
||||
# Bare product names are the same in every language.
|
||||
return [
|
||||
("cli", t("desktop.choice_cli")),
|
||||
("gnome", "GNOME"),
|
||||
("kde", "KDE Plasma"),
|
||||
("hyprland", t("desktop.choice_hyprland")),
|
||||
("i3", t("desktop.choice_i3")),
|
||||
("xfce", "XFCE"),
|
||||
]
|
||||
|
||||
|
||||
_DESKTOP_FILE = "/tmp/fws-desktop"
|
||||
|
||||
|
||||
@@ -42,6 +50,10 @@ class FWSDesktopSpoke(NormalSpoke):
|
||||
uiFile = "spokes/fws_desktop.glade"
|
||||
category = SoftwareCategory
|
||||
icon = "preferences-desktop-display-symbolic"
|
||||
# Left to Anaconda: it only labels the hub tile (hidden by fws_wizard, shown
|
||||
# only if the wizard falls back to the classic menu), sorts the tiles and
|
||||
# names the spoke in logs. The header the user sees is "window-name",
|
||||
# translated in refresh().
|
||||
title = CN_("GUI|Spoke", "_Desktop Environment")
|
||||
|
||||
@staticmethod
|
||||
@@ -63,7 +75,7 @@ class FWSDesktopSpoke(NormalSpoke):
|
||||
|
||||
def initialize(self):
|
||||
NormalSpoke.initialize(self)
|
||||
for key, _label in _CHOICES:
|
||||
for key, _label in _choices():
|
||||
self._radios[key] = self.builder.get_object("radio_" + key)
|
||||
# Reprend un éventuel choix déjà écrit (revisite du spoke).
|
||||
try:
|
||||
@@ -75,6 +87,18 @@ class FWSDesktopSpoke(NormalSpoke):
|
||||
pass
|
||||
|
||||
def refresh(self):
|
||||
# The texts are set here rather than taken from the glade: refresh()
|
||||
# runs each time the screen is shown, so they follow a language
|
||||
# changed in the meantime on the first screen.
|
||||
window_name = t("desktop.window_name")
|
||||
self.window.set_property("window-name", window_name)
|
||||
self.window.get_accessible().set_name(window_name)
|
||||
self.builder.get_object("fws_desktop_desc").set_text(t("desktop.intro"))
|
||||
for key, label in _choices():
|
||||
radio = self._radios.get(key)
|
||||
if radio is not None:
|
||||
radio.set_label(label)
|
||||
|
||||
# Coche le bouton correspondant au choix courant.
|
||||
rb = (self._radios.get(self._choice)
|
||||
or self._radios.get(self._DEFAULT_CHOICE))
|
||||
@@ -95,10 +119,10 @@ class FWSDesktopSpoke(NormalSpoke):
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
for key, label in _CHOICES:
|
||||
for key, label in _choices():
|
||||
if key == self._choice:
|
||||
return label
|
||||
return _("Command line only (no desktop)")
|
||||
return t("desktop.choice_cli")
|
||||
|
||||
@property
|
||||
def completed(self):
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
# FWS — translations of the FWS parts of the installer.
|
||||
#
|
||||
# Anaconda translates its own screens through gettext; the FWS screens are not
|
||||
# in its catalogs. Their texts live in ONE TOML file (one table per message,
|
||||
# one entry per language) and are looked up with t("key").
|
||||
#
|
||||
# t() reads $LANG on every call: Anaconda stores the language picked on the
|
||||
# first screen there (and clears LANGUAGE/LC_ALL/LC_MESSAGES). A screen that
|
||||
# sets its texts each time it is shown therefore follows a language change made
|
||||
# by going back to the first screen.
|
||||
#
|
||||
# Not a spoke: Anaconda imports every module of this folder while collecting
|
||||
# spokes, and an empty __all__ keeps this one out of the collection.
|
||||
|
||||
import os
|
||||
import tomllib
|
||||
|
||||
try:
|
||||
from pyanaconda.anaconda_loggers import get_module_logger
|
||||
log = get_module_logger(__name__)
|
||||
except ImportError:
|
||||
# Loaded by path from /usr/local/bin/fws-i18n, outside Anaconda.
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__all__ = []
|
||||
|
||||
TRANSLATIONS_FILE = "/usr/local/share/fws/installer-translations.toml"
|
||||
FALLBACK_LANGUAGE = "en"
|
||||
|
||||
_cache = {"mtime": None, "messages": {}}
|
||||
_reported = set()
|
||||
|
||||
|
||||
def _flatten(table, prefix=""):
|
||||
"""Yield (key, {language: text}) for every message of the TOML tree."""
|
||||
texts = {name: value for name, value in table.items() if isinstance(value, str)}
|
||||
if texts and prefix:
|
||||
yield prefix, texts
|
||||
for name, value in table.items():
|
||||
if isinstance(value, dict):
|
||||
yield from _flatten(value, f"{prefix}.{name}" if prefix else name)
|
||||
|
||||
|
||||
def _messages():
|
||||
try:
|
||||
mtime = os.stat(TRANSLATIONS_FILE).st_mtime
|
||||
except OSError:
|
||||
return {}
|
||||
if _cache["mtime"] != mtime:
|
||||
try:
|
||||
with open(TRANSLATIONS_FILE, "rb") as fh:
|
||||
_cache["messages"] = dict(_flatten(tomllib.load(fh)))
|
||||
except (OSError, tomllib.TOMLDecodeError) as exc:
|
||||
# A broken file must not take the installer down: keys are shown
|
||||
# instead of texts, which is visible but harmless.
|
||||
log.error("FWS: unreadable translations file %s: %s", TRANSLATIONS_FILE, exc)
|
||||
_cache["messages"] = {}
|
||||
_cache["mtime"] = mtime
|
||||
return _cache["messages"]
|
||||
|
||||
|
||||
def language_candidates(locale_name=None):
|
||||
"""Languages to try, most specific first, always ending with the fallback.
|
||||
|
||||
"sr_RS.UTF-8@latin" -> sr_RS@latin, sr@latin, sr_RS, sr, en
|
||||
"fr_CH.UTF-8" -> fr_CH, fr, en
|
||||
"""
|
||||
if locale_name is None:
|
||||
locale_name = os.environ.get("LANG", "")
|
||||
base, _, modifier = locale_name.partition("@")
|
||||
base = base.split(".", 1)[0]
|
||||
language, _, territory = base.partition("_")
|
||||
suffix = f"@{modifier}" if modifier else ""
|
||||
candidates = []
|
||||
if territory:
|
||||
candidates.append(f"{language}_{territory}{suffix}")
|
||||
candidates.append(f"{language}{suffix}")
|
||||
if suffix:
|
||||
if territory:
|
||||
candidates.append(f"{language}_{territory}")
|
||||
candidates.append(language)
|
||||
candidates.append(FALLBACK_LANGUAGE)
|
||||
return [c for c in dict.fromkeys(candidates) if c]
|
||||
|
||||
|
||||
def t(key, **fields):
|
||||
"""Text of `key` in the installer's current language.
|
||||
|
||||
Named `fields` fill the {placeholders} of the text. An unknown key is
|
||||
returned as is, so a missing translation shows up on screen instead of
|
||||
crashing the installer.
|
||||
"""
|
||||
texts = _messages().get(key)
|
||||
text = None
|
||||
if texts:
|
||||
for language in language_candidates():
|
||||
text = texts.get(language)
|
||||
if text:
|
||||
break
|
||||
if not text:
|
||||
if key not in _reported:
|
||||
_reported.add(key)
|
||||
log.warning("FWS: no translation for key %s", key)
|
||||
return key
|
||||
if not fields:
|
||||
return text
|
||||
try:
|
||||
return text.format(**fields)
|
||||
except (KeyError, IndexError, ValueError) as exc:
|
||||
# A translation with a wrong placeholder: fall back to the reference
|
||||
# text rather than showing nothing.
|
||||
log.warning("FWS: bad placeholders in %s: %s", key, exc)
|
||||
reference = texts.get(FALLBACK_LANGUAGE, key)
|
||||
try:
|
||||
return reference.format(**fields)
|
||||
except (KeyError, IndexError, ValueError):
|
||||
return reference
|
||||
+48
-40
@@ -49,6 +49,7 @@ from gi.repository import GLib, Gtk
|
||||
from pyanaconda.anaconda_loggers import get_module_logger
|
||||
from pyanaconda.ui.gui.hubs.summary import SummaryHub
|
||||
from pyanaconda.ui.gui.spokes import StandaloneSpoke
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
@@ -95,9 +96,9 @@ def _split_escaped(line):
|
||||
class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
"""Choix simple du réseau (Ethernet / Wi-Fi + mot de passe) avant le hub."""
|
||||
|
||||
builderObjects = ["fwsNetworkWindow", "netTitle", "netList", "netFeedback",
|
||||
"pwPanel", "pwTitle", "pwEntry", "pwShow", "pwConnect",
|
||||
"refreshButton"]
|
||||
builderObjects = ["fwsNetworkWindow", "netTitle", "netHint", "listTitle",
|
||||
"netList", "netFeedback", "pwPanel", "pwTitle", "pwEntry",
|
||||
"pwShow", "pwConnect", "refreshButton"]
|
||||
mainWidgetName = "fwsNetworkWindow"
|
||||
uiFile = "spokes/fws_network.glade"
|
||||
|
||||
@@ -126,8 +127,6 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
def initialize(self):
|
||||
StandaloneSpoke.initialize(self)
|
||||
self._title = self.builder.get_object("netTitle")
|
||||
self._title.set_markup(
|
||||
'<span size="x-large"><b>Connexion à Internet</b></span>')
|
||||
self._list = self.builder.get_object("netList")
|
||||
self._list.connect("row-selected", self._on_row_selected)
|
||||
self._feedback = self.builder.get_object("netFeedback")
|
||||
@@ -163,7 +162,24 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
def _on_continue_clicked(self, *_args):
|
||||
self.apply()
|
||||
|
||||
def _set_static_texts(self):
|
||||
# Set here rather than in initialize(): the screen is built once, but
|
||||
# the user can go back to the language screen and pick another one.
|
||||
self.window.set_property("window-name", t("network.window_name"))
|
||||
self._title.set_markup(
|
||||
'<span size="x-large"><b>'
|
||||
f'{GLib.markup_escape_text(t("network.title"))}</b></span>')
|
||||
self.builder.get_object("netHint").set_text(t("network.hint"))
|
||||
self.builder.get_object("listTitle").set_text(t("network.list_title"))
|
||||
self.builder.get_object("refreshButton").set_label(
|
||||
t("network.refresh_button"))
|
||||
self.builder.get_object("pwShow").set_label(t("network.show_password"))
|
||||
self.builder.get_object("pwConnect").set_label(
|
||||
t("network.connect_button"))
|
||||
self._entry.set_placeholder_text(t("network.password_placeholder"))
|
||||
|
||||
def refresh(self):
|
||||
self._set_static_texts()
|
||||
# À chaque entrée sur l'écran : liste à jour + état courant.
|
||||
self._build_list(rescan=False)
|
||||
# Cache Wi-Fi souvent vide au tout premier affichage (NM n'a pas
|
||||
@@ -261,21 +277,23 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
for iface, state in eth:
|
||||
if state == "connected":
|
||||
had_conn = True
|
||||
add_row("eth", "Ethernet (câble)", "Connecté ✓",
|
||||
add_row("eth", t("network.row_ethernet"),
|
||||
t("network.row_connected"),
|
||||
{"kind": "eth", "iface": iface, "state": state},
|
||||
inuse=True)
|
||||
elif state == "disconnected":
|
||||
add_row("eth", "Ethernet (câble)", "Cliquer pour se connecter",
|
||||
add_row("eth", t("network.row_ethernet"),
|
||||
t("network.row_click_to_connect"),
|
||||
{"kind": "eth", "iface": iface, "state": state})
|
||||
# "unavailable" = pas de câble : inutile de l'afficher.
|
||||
for n in wifi:
|
||||
if n["inuse"]:
|
||||
had_conn = True
|
||||
detail = "Connecté ✓"
|
||||
detail = t("network.row_connected")
|
||||
elif n["secured"]:
|
||||
detail = f"{n['signal']} % · sécurisé"
|
||||
detail = t("network.row_wifi_secured", signal=n["signal"])
|
||||
else:
|
||||
detail = f"{n['signal']} % · ouvert"
|
||||
detail = t("network.row_wifi_open", signal=n["signal"])
|
||||
add_row("wifi", n["ssid"], detail,
|
||||
{"kind": "wifi", "ssid": n["ssid"],
|
||||
"secured": n["secured"]}, inuse=n["inuse"])
|
||||
@@ -283,19 +301,14 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
# Message d'état global.
|
||||
active_wifi = self._active_wifi_ssid()
|
||||
if active_wifi:
|
||||
self._show_feedback(f"Connecté au Wi-Fi « {active_wifi} » ✓ — "
|
||||
"vous pouvez continuer.", _GREEN)
|
||||
self._show_feedback(
|
||||
t("network.wifi_connected", ssid=active_wifi), _GREEN)
|
||||
elif had_conn:
|
||||
self._show_feedback("Connecté à Internet (Ethernet) ✓ — "
|
||||
"vous pouvez continuer.", _GREEN)
|
||||
self._show_feedback(t("network.ethernet_online"), _GREEN)
|
||||
elif not self._networks:
|
||||
self._show_feedback(
|
||||
"Aucun réseau détecté. Vérifiez que le Wi-Fi est activé, "
|
||||
"branchez un câble Ethernet, ou cliquez « Rafraîchir ».", _RED)
|
||||
self._show_feedback(t("network.no_network"), _RED)
|
||||
else:
|
||||
self._show_feedback(
|
||||
"Cliquez sur un réseau Wi-Fi pour vous connecter "
|
||||
"(ou branchez un câble Ethernet).", _GREY)
|
||||
self._show_feedback(t("network.pick_network"), _GREY)
|
||||
self._hide_password_panel()
|
||||
|
||||
def _show_feedback(self, text, color=_GREY):
|
||||
@@ -314,21 +327,21 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
if meta["kind"] == "eth":
|
||||
if meta["state"] == "connected":
|
||||
self._show_feedback(
|
||||
"Ethernet déjà connecté — vous pouvez continuer.", _GREEN)
|
||||
t("network.ethernet_already_connected"), _GREEN)
|
||||
else:
|
||||
self._connect_eth(meta["iface"])
|
||||
return
|
||||
# Wi-Fi
|
||||
if meta["inuse"]:
|
||||
self._show_feedback(
|
||||
f"Vous êtes déjà connecté au Wi-Fi « {meta['ssid']} ».",
|
||||
t("network.wifi_already_connected", ssid=meta["ssid"]),
|
||||
_GREEN)
|
||||
return
|
||||
self._current_ssid = meta["ssid"]
|
||||
if meta["secured"]:
|
||||
self._pw_title.set_markup(
|
||||
f'Mot de passe du réseau Wi-Fi « '
|
||||
f'<b>{GLib.markup_escape_text(meta["ssid"])}</b> » :')
|
||||
self._pw_title.set_markup(t(
|
||||
"network.password_prompt",
|
||||
ssid=GLib.markup_escape_text(meta["ssid"])))
|
||||
self._entry.set_text("")
|
||||
self._entry.set_editable(True)
|
||||
self._entry.set_visibility(
|
||||
@@ -336,15 +349,14 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
self._panel.show()
|
||||
self._entry.grab_focus()
|
||||
self._show_feedback(
|
||||
f"Tapez le mot de passe de « {meta['ssid']} » puis cliquez "
|
||||
"« Se connecter ».", _GREY)
|
||||
t("network.type_password", ssid=meta["ssid"]), _GREY)
|
||||
else:
|
||||
self._connect_wifi(meta["ssid"], None)
|
||||
|
||||
def _refresh_clicked(self):
|
||||
if self._busy:
|
||||
return
|
||||
self._show_feedback("Recherche des réseaux…", _GREY)
|
||||
self._show_feedback(t("network.searching"), _GREY)
|
||||
self._set_busy(True, list_only=True)
|
||||
threading.Thread(target=self._refresh_worker, daemon=True).start()
|
||||
|
||||
@@ -364,18 +376,19 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
return
|
||||
password = self._entry.get_text()
|
||||
if not password:
|
||||
self._show_feedback("Tapez d'abord le mot de passe.", _RED)
|
||||
self._show_feedback(t("network.password_missing"), _RED)
|
||||
return
|
||||
self._connect_wifi(self._current_ssid, password)
|
||||
|
||||
def _connect_eth(self, iface):
|
||||
self._show_feedback(f"Connexion Ethernet ({iface})…", _GREY)
|
||||
self._show_feedback(
|
||||
t("network.ethernet_connecting", iface=iface), _GREY)
|
||||
self._set_busy(True)
|
||||
threading.Thread(target=self._eth_worker, args=(iface,),
|
||||
daemon=True).start()
|
||||
|
||||
def _connect_wifi(self, ssid, password):
|
||||
self._show_feedback(f"Connexion au Wi-Fi « {ssid} »…", _GREY)
|
||||
self._show_feedback(t("network.wifi_connecting", ssid=ssid), _GREY)
|
||||
self._set_busy(True)
|
||||
threading.Thread(target=self._wifi_worker, args=(ssid, password),
|
||||
daemon=True).start()
|
||||
@@ -405,8 +418,7 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
self._current_ssid = None
|
||||
self._hide_password_panel()
|
||||
self._show_feedback(
|
||||
f"Connecté au Wi-Fi « {name} » ✓ — vous pouvez "
|
||||
"continuer.", _GREEN)
|
||||
t("network.wifi_connected", ssid=name), _GREEN)
|
||||
# Marqueur pour le %post (profils NM vers la cible).
|
||||
try:
|
||||
with open(_KEEP_WIFI, "w") as fh:
|
||||
@@ -414,14 +426,12 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
self._show_feedback(
|
||||
"Ethernet connecté ✓ — vous pouvez continuer.", _GREEN)
|
||||
self._show_feedback(t("network.ethernet_connected"), _GREEN)
|
||||
self._build_list(rescan=False) # marque « Connecté ✓ » + état
|
||||
else:
|
||||
if kind == "wifi":
|
||||
self._show_feedback(
|
||||
f"Connexion à « {name} » impossible : mot de passe "
|
||||
"incorrect, ou réseau hors de portée. Réessayez.", _RED)
|
||||
t("network.wifi_failed", ssid=name), _RED)
|
||||
if password is not None:
|
||||
# On garde la main sur le champ pour corriger.
|
||||
self._current_ssid = name
|
||||
@@ -432,9 +442,7 @@ class FWSNetworkStandaloneSpoke(StandaloneSpoke):
|
||||
self._panel.show()
|
||||
self._entry.grab_focus()
|
||||
else:
|
||||
self._show_feedback(
|
||||
"Connexion Ethernet impossible (câble débranché ?).",
|
||||
_RED)
|
||||
self._show_feedback(t("network.ethernet_failed"), _RED)
|
||||
return False
|
||||
|
||||
# ------------------------------------------------------------ helpers --
|
||||
|
||||
+100
-67
@@ -50,29 +50,38 @@ from pyanaconda.modules.common.structures.user import UserData
|
||||
from pyanaconda.ui.gui import GraphicalUserInterface
|
||||
from pyanaconda.ui.gui.hubs.summary import SummaryHub
|
||||
from pyanaconda.ui.gui.spokes import StandaloneSpoke
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
__all__ = ["FWSRecapSpoke"]
|
||||
|
||||
|
||||
# Doit rester aligné sur le %post du kickstart (étape « Bureau choisi ») et
|
||||
# sur les libellés de la spoke fws_desktop.
|
||||
_DESKTOP_LABELS = {
|
||||
"cli": "ligne de commande uniquement (aucun bureau)",
|
||||
"gnome": "GNOME (+ Firefox, GDM)",
|
||||
"kde": "KDE Plasma (+ Firefox, SDDM)",
|
||||
"hyprland": "Hyprland — Wayland, non compatible VR (+ Firefox, SDDM)",
|
||||
"i3": "i3 — X11, compatible VR/SteamVR (+ Firefox, SDDM)",
|
||||
"xfce": "XFCE (+ Firefox, SDDM)",
|
||||
}
|
||||
def _desktop_label(desk):
|
||||
# Built on each call rather than kept as a module constant, so the labels
|
||||
# follow a language changed on the first screen.
|
||||
labels = {
|
||||
"cli": t("recap.desktop_cli"),
|
||||
"gnome": t("recap.desktop_gnome"),
|
||||
"kde": t("recap.desktop_kde"),
|
||||
"hyprland": t("recap.desktop_hyprland"),
|
||||
"i3": t("recap.desktop_i3"),
|
||||
"xfce": t("recap.desktop_xfce"),
|
||||
}
|
||||
return labels.get(desk, desk)
|
||||
|
||||
_PARTITIONING_LABELS = {
|
||||
"AUTOMATIC": "automatique (recommandé)",
|
||||
"INTERACTIVE": "personnalisé (assistant)",
|
||||
"CUSTOM": "personnalisé",
|
||||
"BLIVET": "avancé (blivet-gui)",
|
||||
"MANUAL": "points de montage manuels",
|
||||
}
|
||||
|
||||
def _partitioning_label(method):
|
||||
labels = {
|
||||
"AUTOMATIC": t("recap.partitioning_automatic"),
|
||||
"INTERACTIVE": t("recap.partitioning_interactive"),
|
||||
"CUSTOM": t("recap.partitioning_custom"),
|
||||
"BLIVET": t("recap.partitioning_blivet"),
|
||||
"MANUAL": t("recap.partitioning_manual"),
|
||||
}
|
||||
return labels.get(method, method)
|
||||
|
||||
|
||||
def _safe(getter, default):
|
||||
@@ -108,67 +117,82 @@ def _config_lines():
|
||||
|
||||
lang = _safe(lambda: LOCALIZATION.get_proxy().Language, "")
|
||||
if lang:
|
||||
lines.append(f" • Langue : {lang}")
|
||||
lines.append((t("recap.row_language"), lang))
|
||||
|
||||
layouts = _safe(lambda: list(LOCALIZATION.get_proxy().XLayouts), [])
|
||||
if layouts:
|
||||
lines.append(f" • Clavier (X11) : {', '.join(layouts)}")
|
||||
lines.append((t("recap.row_keyboard"), ", ".join(layouts)))
|
||||
|
||||
tz = _safe(lambda: TIMEZONE.get_proxy().Timezone, "")
|
||||
if tz:
|
||||
ntp = _safe(lambda: TIMEZONE.get_proxy().NTPEnabled, None)
|
||||
suffix = {True: " — synchronisation NTP activée",
|
||||
False: " — synchronisation NTP désactivée"}.get(ntp, "")
|
||||
lines.append(f" • Fuseau horaire : {tz}{suffix}")
|
||||
tz_txt = {True: t("recap.timezone_ntp_on", timezone=tz),
|
||||
False: t("recap.timezone_ntp_off", timezone=tz)}.get(ntp, tz)
|
||||
lines.append((t("recap.row_timezone"), tz_txt))
|
||||
|
||||
users = _safe(
|
||||
lambda: UserData.from_structure_list(USERS.get_proxy().Users), [])
|
||||
if users:
|
||||
names = ", ".join(u.name for u in users if u.name)
|
||||
lines.append(f" • Utilisateur(s) : {names} (sudo via wheel)")
|
||||
lines.append((t("recap.row_users"), t("recap.users_value", users=names)))
|
||||
else:
|
||||
lines.append(" • Utilisateur(s) : AUCUN — pensez-y avant de lancer !")
|
||||
lines.append((t("recap.row_users"), t("recap.users_none")))
|
||||
|
||||
root_locked = _safe(lambda: USERS.get_proxy().IsRootAccountLocked, None)
|
||||
root_pw = _safe(lambda: USERS.get_proxy().IsRootPasswordSet, None)
|
||||
if root_locked:
|
||||
root_txt = "verrouillé (recommandé)"
|
||||
root_txt = t("recap.root_locked")
|
||||
elif root_pw:
|
||||
root_txt = "actif, mot de passe défini"
|
||||
root_txt = t("recap.root_password_set")
|
||||
elif root_pw is not None:
|
||||
# Même règle que l'étape « Sécurité » du %post : un root resté sans
|
||||
# mot de passe sera verrouillé en fin d'installation.
|
||||
root_txt = "sans mot de passe → sera VERROUILLÉ en fin d'install"
|
||||
root_txt = t("recap.root_no_password")
|
||||
else:
|
||||
root_txt = ""
|
||||
if root_txt:
|
||||
lines.append(f" • Compte root : {root_txt}")
|
||||
lines.append((t("recap.row_root"), root_txt))
|
||||
|
||||
# Hostname : écrit par le spoke Utilisateur (patch user.py du paquet
|
||||
# anaconda). Même nettoyage / même défaut que le %post --nochroot.
|
||||
hn = "".join(c for c in _read_flag("/tmp/fws-hostname")
|
||||
if c.isalnum() or c in "._-") or "fws"
|
||||
lines.append(f" • Nom de machine : {hn}")
|
||||
lines.append((t("recap.row_hostname"), hn))
|
||||
|
||||
# Bureau : écrit par fws_desktop.apply() (sortie de la spoke). Absent =
|
||||
# spoke jamais visitée = « cli », exactement le défaut du %post.
|
||||
desk = _read_flag("/tmp/fws-desktop") or "cli"
|
||||
lines.append(f" • Bureau : {_DESKTOP_LABELS.get(desk, desk)}")
|
||||
lines.append((t("recap.row_desktop"), _desktop_label(desk)))
|
||||
|
||||
method = _safe(
|
||||
lambda: STORAGE.get_proxy(
|
||||
STORAGE.get_proxy().AppliedPartitioning).PartitioningMethod, "")
|
||||
if method:
|
||||
lines.append(" • Partitionnement : "
|
||||
f"{_PARTITIONING_LABELS.get(method, method)}")
|
||||
lines.append((t("recap.row_partitioning"), _partitioning_label(method)))
|
||||
|
||||
return lines, desk, method
|
||||
|
||||
|
||||
def _format_rows(rows, width):
|
||||
"""Lay out (label, value) pairs as " • label : value" lines."""
|
||||
# Labels are padded to the longest one of the current language so the
|
||||
# values line up in the monospace view; the line breaks a translation
|
||||
# puts in a value continue under the value column.
|
||||
lines = []
|
||||
for label, value in rows:
|
||||
prefix = f" • {label:<{width}} : "
|
||||
lines.append(prefix + value.replace("\n", "\n" + " " * len(prefix)))
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def _indent(text):
|
||||
# Translations keep their own line breaks; the indentation is layout and
|
||||
# stays here.
|
||||
return "\n".join(" " + line for line in text.splitlines())
|
||||
|
||||
|
||||
def _build_summary():
|
||||
config_lines, desk, method = _config_lines()
|
||||
config_text = "\n".join(config_lines) \
|
||||
or " (configuration non disponible)"
|
||||
|
||||
# Disques ciblés par l'installation (spoke « Destination »).
|
||||
selected = set(_safe(
|
||||
@@ -177,70 +201,71 @@ def _build_summary():
|
||||
for line in _capture("lsblk", "-dno", "NAME,SIZE,MODEL,TYPE").splitlines():
|
||||
fields = line.split()
|
||||
if fields and fields[-1] == "disk":
|
||||
mark = " ← CIBLE de l'installation" if fields[0] in selected else ""
|
||||
disks.append(" • " + " ".join(fields[:-1]) + mark)
|
||||
disk_text = "\n".join(disks) or " (aucun disque détecté)"
|
||||
disk = " ".join(fields[:-1])
|
||||
if fields[0] in selected:
|
||||
disk = t("recap.disk_target", disk=disk)
|
||||
disks.append(" • " + disk)
|
||||
disk_text = "\n".join(disks) or _indent(t("recap.no_disk"))
|
||||
|
||||
if method == "AUTOMATIC":
|
||||
disk_warn = (
|
||||
" ⚠ Rien n'a encore été écrit. Le partitionnement automatique\n"
|
||||
" EFFACERA ENTIÈREMENT le(s) disque(s) cible(s) au lancement.")
|
||||
disk_warn = _indent(t("recap.disk_warning_automatic"))
|
||||
else:
|
||||
disk_warn = (
|
||||
" ⚠ Rien n'a encore été écrit. Au lancement, ce sont vos choix\n"
|
||||
" de partitionnement faits dans l'installateur qui s'appliqueront.")
|
||||
disk_warn = _indent(t("recap.disk_warning_manual"))
|
||||
|
||||
virt = (_capture("systemd-detect-virt").strip().splitlines() or ["none"])[0]
|
||||
if virt in ("", "none"):
|
||||
virt = "aucune (machine physique)"
|
||||
virt = t("recap.virtualization_none")
|
||||
|
||||
gpus = []
|
||||
for line in _capture("lspci").splitlines():
|
||||
low = line.lower()
|
||||
if ("vga" in low or "3d" in low or "display" in low) and ":" in line:
|
||||
gpus.append(" • " + line.split(":", 2)[-1].strip())
|
||||
gpu_text = "\n".join(gpus) or " (aucune carte graphique détectée)"
|
||||
gpu_text = "\n".join(gpus) or _indent(t("recap.no_gpu"))
|
||||
|
||||
try:
|
||||
net_ok = util.execWithRedirect("ip", ["route", "get", "1.1.1.1"]) == 0
|
||||
except (OSError, RuntimeError):
|
||||
net_ok = False
|
||||
if net_ok:
|
||||
net = "disponible ✔"
|
||||
net = t("recap.network_ok")
|
||||
else:
|
||||
net = ("INDISPONIBLE ✖ — bureau, drivers et stack FWS ne\n"
|
||||
" s'installeront PAS (rattrapable au 1er boot)")
|
||||
net = t("recap.network_down")
|
||||
|
||||
extras = ("Steam, Wine, VR (Monado/OpenXR), PacManager"
|
||||
if desk != "cli" else "rien de plus (choix CLI)")
|
||||
extras = (t("recap.extras_desktop")
|
||||
if desk != "cli" else t("recap.extras_cli"))
|
||||
|
||||
hardware_lines = [(t("recap.row_virtualization"), virt),
|
||||
(t("recap.row_network"), net)]
|
||||
width = max(len(label) for label, _ in config_lines + hardware_lines)
|
||||
config_text = _format_rows(config_lines, width) \
|
||||
or _indent(t("recap.config_unavailable"))
|
||||
|
||||
return f"""\
|
||||
══════════════════════════════════════════════════════════
|
||||
FWS — RÉCAPITULATIF AVANT INSTALLATION
|
||||
{t("recap.summary_title")}
|
||||
══════════════════════════════════════════════════════════
|
||||
|
||||
CONFIGURATION CHOISIE
|
||||
{t("recap.section_config")}
|
||||
{config_text}
|
||||
|
||||
DISQUES
|
||||
{t("recap.section_disks")}
|
||||
{disk_warn}
|
||||
{disk_text}
|
||||
|
||||
MATÉRIEL DÉTECTÉ
|
||||
• Virtualisation : {virt}
|
||||
• Réseau : {net}
|
||||
Cartes graphiques (drivers installés automatiquement en fin d'install) :
|
||||
{t("recap.section_hardware")}
|
||||
{_format_rows(hardware_lines, width)}
|
||||
{t("recap.gpus_heading")}
|
||||
{gpu_text}
|
||||
|
||||
DÉROULEMENT DE L'INSTALLATION
|
||||
1. Partitionnement, puis copie du système live FWS (payload LiveOS)
|
||||
2. Noyau + initramfs régénérés (mkinitcpio), GRUB installé
|
||||
3. Bureau choisi + navigateur installés (réseau requis)
|
||||
4. Matériel : drivers GPU, outils VM, son, Bluetooth, Podman
|
||||
+ si bureau choisi : {extras}
|
||||
{t("recap.section_steps")}
|
||||
1. {t("recap.step_partitioning")}
|
||||
2. {t("recap.step_kernel")}
|
||||
3. {t("recap.step_desktop")}
|
||||
4. {t("recap.step_hardware")}
|
||||
{t("recap.step_hardware_extras", extras=extras)}
|
||||
|
||||
« Précédent » pour revenir modifier vos choix —
|
||||
« Lancer l'installation » pour démarrer réellement l'installation.
|
||||
{t("recap.footer")}
|
||||
"""
|
||||
|
||||
|
||||
@@ -270,9 +295,6 @@ class FWSRecapSpoke(StandaloneSpoke):
|
||||
|
||||
def initialize(self):
|
||||
StandaloneSpoke.initialize(self)
|
||||
# Le bouton « continuer » de CETTE page est le vrai déclencheur :
|
||||
# l'écran suivant (ProgressSpoke) démarre la file d'installation.
|
||||
self.window.get_continue_button().set_label("_Lancer l'installation")
|
||||
|
||||
# Capture pour « Précédent » : initialize() est appelé DEPUIS
|
||||
# GraphicalUserInterface._on_continue_clicked (clic « Commencer
|
||||
@@ -302,7 +324,8 @@ class FWSRecapSpoke(StandaloneSpoke):
|
||||
# (à côté de « Quitter » — leur parent est la GtkButtonBox du bas).
|
||||
quit_button = self.window.get_quit_button()
|
||||
button_box = quit_button.get_parent()
|
||||
self._back_button = Gtk.Button.new_with_mnemonic("_Précédent")
|
||||
# Label set by _set_static_texts() on each display.
|
||||
self._back_button = Gtk.Button(use_underline=True)
|
||||
self._back_button.connect("clicked", self._on_back_clicked)
|
||||
button_box.add(self._back_button)
|
||||
# [Quitter, Lancer l'installation, Précédent] -> Précédent au MILIEU,
|
||||
@@ -338,8 +361,18 @@ class FWSRecapSpoke(StandaloneSpoke):
|
||||
hub.entered.emit(hub)
|
||||
ui._currentAction = hub
|
||||
|
||||
def _set_static_texts(self):
|
||||
# Set here rather than in initialize(): the user can go back to the
|
||||
# language screen and pick another language before coming back.
|
||||
self.window.set_property("window-name", t("recap.window_name"))
|
||||
# Le bouton « continuer » de CETTE page est le vrai déclencheur :
|
||||
# l'écran suivant (ProgressSpoke) démarre la file d'installation.
|
||||
self.window.get_continue_button().set_label(t("recap.start_button"))
|
||||
self._back_button.set_label(t("wizard.back"))
|
||||
|
||||
def refresh(self):
|
||||
StandaloneSpoke.refresh(self)
|
||||
self._set_static_texts()
|
||||
text = _build_summary()
|
||||
self.builder.get_object("recapView").get_buffer().set_text(text)
|
||||
# Copie pour le harnais de debug du .xinitrc (fws-debug.txt).
|
||||
|
||||
+61
-50
@@ -45,6 +45,7 @@ from gi.repository import GLib, Gtk
|
||||
from pyanaconda.anaconda_loggers import get_module_logger
|
||||
from pyanaconda.ui.gui.hubs.summary import SummaryHub
|
||||
from pyanaconda.ui.gui.spokes import StandaloneSpoke
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
@@ -64,18 +65,6 @@ _GREEN = "#1e7145"
|
||||
_RED = "#b3261e"
|
||||
_GREY = "#555555"
|
||||
|
||||
# Le vrai recours de dernier ressort, et ses conséquences. Dit en clair : une
|
||||
# utilisatrice débutante a qualifié de « flippant » le fait de ne pas savoir ce
|
||||
# qui se passait — l'inverse de rassurer, c'est cacher, pas expliquer.
|
||||
_BIOS_FALLBACK = (
|
||||
"Il reste une solution, dans le BIOS de la machine : cherche le réglage de "
|
||||
"stockage (souvent « SATA Mode », « Intel RST » ou « Optane ») et choisis "
|
||||
"« AHCI », puis redémarre sur la clé FWS.\n\n"
|
||||
"À savoir si Windows est installé sur cette machine : après ce changement, "
|
||||
"Windows ne démarrera plus tant que le réglage n'est pas remis comme avant. "
|
||||
"Si tu veux garder Windows, mieux vaut demander de l'aide avant d'y toucher."
|
||||
)
|
||||
|
||||
|
||||
def _run_engine(args, timeout=180):
|
||||
"""Lance le moteur. Renvoie (code, sortie). Jamais d'exception vers l'UI."""
|
||||
@@ -117,6 +106,10 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
self._status, self._details = self._detect()
|
||||
self._busy = False
|
||||
self._resolved = False
|
||||
self._failed = False
|
||||
# The step of the status line is kept rather than its text, so that
|
||||
# refresh() can show it again in a language picked since.
|
||||
self._step = None
|
||||
|
||||
# -------------------------------------------------------------- moteur --
|
||||
@staticmethod
|
||||
@@ -152,13 +145,10 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
self._spinner = self.builder.get_object("rstSpinner")
|
||||
self._status_label = self.builder.get_object("rstStatus")
|
||||
self._fallback = self.builder.get_object("rstFallback")
|
||||
self._expander = self.builder.get_object("rstExpander")
|
||||
self._log = self.builder.get_object("rstLog")
|
||||
self._button.connect("clicked", self._on_fix_clicked)
|
||||
|
||||
self._title.set_markup(
|
||||
'<span size="x-large"><b>%s</b></span>'
|
||||
% GLib.markup_escape_text(self._headline()))
|
||||
self._intro.set_text(self._explanation())
|
||||
self._append(self._details)
|
||||
|
||||
# « Précédent » vers l'écran réseau, comme depuis la première étape de
|
||||
@@ -171,6 +161,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
|
||||
def refresh(self):
|
||||
StandaloneSpoke.refresh(self)
|
||||
self._set_texts()
|
||||
# Continuer reste TOUJOURS possible : si la prise en charge échoue,
|
||||
# l'utilisateur doit pouvoir avancer (l'écran « Destination » dira
|
||||
# qu'aucun disque n'a été trouvé) ou revenir en arrière. Un écran dont
|
||||
@@ -181,33 +172,62 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
def apply(self):
|
||||
pass
|
||||
|
||||
def _set_texts(self):
|
||||
"""Set every text of the screen in the installer's current language.
|
||||
|
||||
Called on each display, not once from initialize(): the user may go
|
||||
back to the first screen and pick another language.
|
||||
"""
|
||||
self.window.set_property("window-name", t("rst.window_name"))
|
||||
self._title.set_markup(
|
||||
'<span size="x-large"><b>%s</b></span>'
|
||||
% GLib.markup_escape_text(self._headline()))
|
||||
self._intro.set_text(self._explanation())
|
||||
self._button.set_label(t("rst.retry_button") if self._failed
|
||||
else t("rst.fix_button"))
|
||||
self._expander.set_label(t("rst.details_expander"))
|
||||
# Le vrai recours de dernier ressort, et ses conséquences. Dit en
|
||||
# clair : une utilisatrice débutante a qualifié de « flippant » le fait
|
||||
# de ne pas savoir ce qui se passait — l'inverse de rassurer, c'est
|
||||
# cacher, pas expliquer.
|
||||
# Set even while hidden: _finish() only has to show it.
|
||||
self._fallback.set_text(t("rst.bios_fallback"))
|
||||
self._set_status(self._step)
|
||||
|
||||
def _headline(self):
|
||||
if self._status == "raid":
|
||||
return "Tes disques sont regroupés en RAID Intel"
|
||||
return "Ton disque n'est pas encore visible"
|
||||
return t("rst.title_raid")
|
||||
return t("rst.title_hidden")
|
||||
|
||||
def _explanation(self):
|
||||
if self._resolved:
|
||||
return t("rst.intro_resolved")
|
||||
if self._status == "raid":
|
||||
return (
|
||||
"Sur cette machine, plusieurs disques sont regroupés en un seul "
|
||||
"volume par la carte mère (« RAID Intel »). FWS sait s'en servir, "
|
||||
"mais il doit d'abord préparer ce qu'il faut pour que la machine "
|
||||
"redémarre dessus après l'installation.\n\n"
|
||||
"Clique sur le bouton : rien n'est effacé à cette étape, et tu "
|
||||
"n'as rien à changer dans le BIOS.")
|
||||
return (
|
||||
"Cette machine range son disque derrière une technologie Intel "
|
||||
"appelée RST (elle s'appelle parfois « Optane » ou « RAID » dans le "
|
||||
"BIOS). C'est pour ça qu'aucun disque n'apparaît pour l'instant.\n\n"
|
||||
"FWS sait s'en occuper : clique sur le bouton. Rien n'est effacé à "
|
||||
"cette étape, et tu n'as rien à changer dans le BIOS.")
|
||||
return t("rst.intro_raid")
|
||||
return t("rst.intro_hidden")
|
||||
|
||||
# ----------------------------------------------------------- affichage --
|
||||
def _set_status(self, text, color=_GREY):
|
||||
def _set_status(self, step):
|
||||
self._step = step
|
||||
if step is None:
|
||||
return
|
||||
text, color = self._status_message(step)
|
||||
self._status_label.set_markup(
|
||||
'<span foreground="%s">%s</span>'
|
||||
% (color, GLib.markup_escape_text(text)))
|
||||
|
||||
@staticmethod
|
||||
def _status_message(step):
|
||||
if step == "working":
|
||||
return t("rst.status_working"), _GREY
|
||||
if step == "rescanning":
|
||||
return t("rst.status_rescanning"), _GREY
|
||||
if step == "visible":
|
||||
return t("rst.status_visible"), _GREEN
|
||||
if step == "visible_rescan_hint":
|
||||
return t("rst.status_visible_rescan_hint"), _GREEN
|
||||
return t("rst.status_failed"), _RED
|
||||
|
||||
def _append(self, text):
|
||||
if not text:
|
||||
return
|
||||
@@ -223,8 +243,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
self._fallback.hide()
|
||||
self._spinner.show()
|
||||
self._spinner.start()
|
||||
self._set_status("Préparation du disque… quelques secondes, il n'y a "
|
||||
"rien à faire.")
|
||||
self._set_status("working")
|
||||
threading.Thread(target=self._work, daemon=True).start()
|
||||
|
||||
def _work(self):
|
||||
@@ -242,9 +261,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
# Le moteur a rendu la main sur un état exploitable : Anaconda doit
|
||||
# REFAIRE son inventaire, sinon l'écran « Destination » resterait
|
||||
# sur la liste vide construite au démarrage de l'installateur.
|
||||
GLib.idle_add(self._set_status,
|
||||
"Le disque répond. Mise à jour de la liste des "
|
||||
"disques…", _GREY)
|
||||
GLib.idle_add(self._set_status, "rescanning")
|
||||
rescanned = self._rescan_storage()
|
||||
GLib.idle_add(self._finish, True, rescanned)
|
||||
else:
|
||||
@@ -263,7 +280,7 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
# ré-analyse, et le disque est de toute façon visible du noyau.
|
||||
log.warning("FWS: nouveau scan des disques impossible : %s", exc)
|
||||
GLib.idle_add(self._append,
|
||||
"[FWS] nouveau scan automatique impossible : %s" % exc)
|
||||
t("rst.rescan_failed_details", error=exc))
|
||||
return False
|
||||
|
||||
def _finish(self, success, rescanned):
|
||||
@@ -273,22 +290,16 @@ class FWSIntelRSTStandaloneSpoke(StandaloneSpoke):
|
||||
|
||||
if success:
|
||||
self._resolved = True
|
||||
message = "C'est bon, ton disque est visible."
|
||||
if not rescanned:
|
||||
# Honnête plutôt que faussement rassurant : on dit quoi faire.
|
||||
message += (" Si l'écran suivant ne le montre pas, utilise "
|
||||
"« Ré-analyser les disques » à cette étape.")
|
||||
self._set_status("visible_rescan_hint")
|
||||
else:
|
||||
message += " Tu peux continuer."
|
||||
self._set_status(message, _GREEN)
|
||||
self._intro.set_text(
|
||||
"FWS se souviendra de ce réglage pour le système installé : la "
|
||||
"machine redémarrera bien sur son disque après l'installation.")
|
||||
self._set_status("visible")
|
||||
self._intro.set_text(self._explanation())
|
||||
self._button.hide()
|
||||
else:
|
||||
self._set_status(
|
||||
"FWS n'a pas réussi à rendre le disque visible.", _RED)
|
||||
self._fallback.set_text(_BIOS_FALLBACK)
|
||||
self._failed = True
|
||||
self._set_status("failed")
|
||||
self._fallback.show()
|
||||
self._button.set_sensitive(True)
|
||||
self._button.set_label("Réessayer")
|
||||
self._button.set_label(t("rst.retry_button"))
|
||||
+69
-10
@@ -50,12 +50,15 @@
|
||||
# en cas d'échec, on retombe sur le hub classique, l'installation reste possible.
|
||||
# ⚠ Chemin couplé à la version de Python d'Arch (3.14), comme les autres spokes.
|
||||
|
||||
import os
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk
|
||||
|
||||
from pyanaconda.anaconda_loggers import get_module_logger
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
|
||||
log = get_module_logger(__name__)
|
||||
|
||||
@@ -67,18 +70,16 @@ __all__ = []
|
||||
_WIZARD_ORDER = (
|
||||
"DatetimeSpoke", # Date et heure
|
||||
"StorageSpoke", # Destination de l'installation (disque)
|
||||
"FWSDesktopSpoke", # Bureau FWS
|
||||
"UserSpoke", # Compte utilisateur + nom de machine
|
||||
"PasswordSpoke", # Mot de passe administrateur (root)
|
||||
"FWSDesktopSpoke", # Bureau FWS
|
||||
)
|
||||
|
||||
# Le bouton du coin haut-gauche des écrans d'Anaconda s'appelle « Terminé » :
|
||||
# dans un assistant, c'est le bouton « suivant ».
|
||||
_NEXT_LABEL = "_Suivant"
|
||||
_BACK_LABEL = "_Précédent"
|
||||
_DONE_BUTTON_NAME = "anaconda-spoke-window-done"
|
||||
|
||||
_WAIT_MSG = "Analyse du matériel en cours, l'écran suivant s'ouvre tout seul…"
|
||||
# Read by /root/.xinitrc once the installer has closed.
|
||||
_LANGUAGE_FILE = "/tmp/fws-lang"
|
||||
|
||||
# Écrans standalone situés JUSTE AVANT le bloc du hub : c'est là que
|
||||
# « Précédent » doit mener depuis la première étape de l'assistant. De là, leur
|
||||
@@ -176,12 +177,49 @@ def _hook_welcome_spoke():
|
||||
_apply_live_keyboard()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
log.exception("FWS: application du clavier au live impossible.")
|
||||
# The live session's dialogs shown after the installer has closed
|
||||
# (/root/.xinitrc) speak this language too, and by then the
|
||||
# installer's environment is gone: leave it in a file.
|
||||
try:
|
||||
with open(_LANGUAGE_FILE, "w", encoding="utf-8") as fh:
|
||||
fh.write(os.environ.get("LANG", ""))
|
||||
except OSError:
|
||||
log.warning("FWS: impossible d'écrire %s.", _LANGUAGE_FILE)
|
||||
|
||||
spoke_class.apply = apply
|
||||
spoke_class._fws_keyboard_hooked = True
|
||||
log.info("FWS: clavier du live branché sur l'écran de langue.")
|
||||
|
||||
|
||||
def _hook_user_spoke():
|
||||
"""Translates the host name field that the FWS anaconda package adds.
|
||||
|
||||
That field comes from a patch of user.glade in the anaconda package, so its
|
||||
texts are in none of Anaconda's catalogs: they come from ours, set on each
|
||||
display like the FWS screens.
|
||||
"""
|
||||
from pyanaconda.ui.gui.spokes import user as user_module
|
||||
|
||||
spoke_class = user_module.UserSpoke
|
||||
if getattr(spoke_class, "_fws_i18n_hooked", False):
|
||||
return
|
||||
|
||||
original_refresh = spoke_class.refresh
|
||||
|
||||
def refresh(self, *args, **kwargs):
|
||||
result = original_refresh(self, *args, **kwargs)
|
||||
label = self.builder.get_object("hostname_label")
|
||||
if label is not None:
|
||||
label.set_text_with_mnemonic(t("user.hostname_label"))
|
||||
entry = self.builder.get_object("hostname_entry")
|
||||
if entry is not None:
|
||||
entry.get_accessible().set_name(t("user.hostname_accessible"))
|
||||
return result
|
||||
|
||||
spoke_class.refresh = refresh
|
||||
spoke_class._fws_i18n_hooked = True
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Assistant : le hub Résumé enchaîne ses écrans au lieu de les proposer
|
||||
# --------------------------------------------------------------------------
|
||||
@@ -203,6 +241,21 @@ def _really_show(widget):
|
||||
widget.show()
|
||||
|
||||
|
||||
def _follow_language(button, text):
|
||||
# These buttons are created once per screen, but the user can change the
|
||||
# language (back to the first screen) before the screen is shown again.
|
||||
# "map" is emitted each time the screen becomes visible, whatever path led
|
||||
# there, so the label is re-read from text() at that moment.
|
||||
def relabel(widget):
|
||||
label = text()
|
||||
if widget.get_label() != label:
|
||||
widget.set_label(label)
|
||||
|
||||
button.set_use_underline(True)
|
||||
relabel(button)
|
||||
button.connect("map", relabel)
|
||||
|
||||
|
||||
def _build_nav_bar(spoke, on_back):
|
||||
"""Barre de navigation « Précédent / Suivant » en BAS À DROITE.
|
||||
|
||||
@@ -236,7 +289,8 @@ def _build_nav_bar(spoke, on_back):
|
||||
box.set_margin_end(6)
|
||||
box.set_margin_bottom(6)
|
||||
|
||||
back = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
|
||||
back = Gtk.Button()
|
||||
_follow_language(back, lambda: t("wizard.back"))
|
||||
back.connect("clicked", lambda _button: on_back(spoke))
|
||||
box.add(back)
|
||||
|
||||
@@ -244,8 +298,7 @@ def _build_nav_bar(spoke, on_back):
|
||||
# La variable Python garde une référence forte : le retrait du GtkGrid
|
||||
# ne peut donc pas détruire le bouton avant qu'on le rattache.
|
||||
window.get_nav_area().remove(done)
|
||||
done.set_use_underline(True)
|
||||
done.set_label(_NEXT_LABEL)
|
||||
_follow_language(done, lambda: t("wizard.next"))
|
||||
box.add(done)
|
||||
|
||||
window.get_main_box().pack_start(box, False, True, 0)
|
||||
@@ -349,7 +402,8 @@ def add_back_button(spoke, target_class_name):
|
||||
log.warning("FWS: barre de boutons introuvable, « Précédent » non ajouté.")
|
||||
return None
|
||||
|
||||
button = Gtk.Button.new_with_mnemonic(_BACK_LABEL)
|
||||
button = Gtk.Button()
|
||||
_follow_language(button, lambda: t("wizard.back"))
|
||||
button.connect("clicked",
|
||||
lambda _b: go_back_to_standalone(spoke, target_class_name))
|
||||
button_box.add(button)
|
||||
@@ -512,7 +566,7 @@ def _install_wizard():
|
||||
# set_info, elle clignoterait 10 fois par seconde.
|
||||
if getattr(self, "_fws_pending", None) is not spoke:
|
||||
self._fws_pending = spoke
|
||||
self.set_info(_WAIT_MSG)
|
||||
self.set_info(t("wizard.wait_hardware_scan"))
|
||||
return
|
||||
|
||||
self._fws_pending = None
|
||||
@@ -647,6 +701,11 @@ try:
|
||||
except Exception: # pylint: disable=broad-except
|
||||
log.exception("FWS: clavier immédiat non branché (écran de langue inchangé).")
|
||||
|
||||
try:
|
||||
_hook_user_spoke()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
log.exception("FWS: champ « nom de machine » laissé non traduit.")
|
||||
|
||||
try:
|
||||
_patch_main_window()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Print an FWS installer text in the language of $LANG.
|
||||
|
||||
Usage: fws-i18n <key> [name=value ...]
|
||||
|
||||
Shell side of the installer translations: the live session (/root/.xinitrc)
|
||||
shows dialogs after the installer has closed, in the language picked on its
|
||||
first screen. Same file and same lookup as the installer screens, so a key is
|
||||
translated once for both.
|
||||
"""
|
||||
|
||||
import glob
|
||||
import importlib.util
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print(__doc__.strip().splitlines()[2], file=sys.stderr)
|
||||
return 2
|
||||
key = sys.argv[1]
|
||||
fields = dict(arg.split("=", 1) for arg in sys.argv[2:] if "=" in arg)
|
||||
text = key
|
||||
# The module sits in Anaconda's folder, whose path follows Python's version.
|
||||
for path in glob.glob("/usr/lib/python3*/site-packages/pyanaconda/ui/gui/spokes/fws_i18n.py"):
|
||||
try:
|
||||
spec = importlib.util.spec_from_file_location("fws_i18n", path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
text = module.t(key, **fields)
|
||||
except Exception: # pylint: disable=broad-except
|
||||
# A dialog with the key in it beats no dialog at all.
|
||||
pass
|
||||
break
|
||||
print(text)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
+23
-5
@@ -23,6 +23,7 @@
|
||||
# that into one step per installation phase and a message that says which
|
||||
# script is running and what it is doing.
|
||||
#
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import threading
|
||||
@@ -47,6 +48,18 @@ FWS_PROGRESS_POLL = 0.5
|
||||
FWS_TITLE_PATTERN = re.compile(r"^#\s*FWS-TITLE:\s*(.+?)\s*$", re.MULTILINE)
|
||||
|
||||
|
||||
def _fws_message(key, **fields):
|
||||
"""Progress message carrying a translation key and its named fields.
|
||||
|
||||
Nothing is composed or translated in this module process: the texts are
|
||||
FWS's, not Anaconda's gettext ones, and the progress spoke translates them
|
||||
at display time in the language picked on the first screen. The message
|
||||
reads "<key> <JSON fields>"; a field may itself be such a message or a key
|
||||
published by a script, the spoke renders those first.
|
||||
"""
|
||||
return "%s %s" % (key, json.dumps(fields, ensure_ascii=False))
|
||||
|
||||
|
||||
class _ProgressWatcher(threading.Thread):
|
||||
"""Follow the progress published by the running kickstart script.
|
||||
|
||||
@@ -149,11 +162,15 @@ class RunScriptsTask(Task):
|
||||
:param label: what is being done, in the installer language
|
||||
"""
|
||||
index, total, title = self._current_script
|
||||
message = "%s — %s %%" % (label, percent)
|
||||
if total > 1:
|
||||
message = "Script %d/%d · %s" % (index, total, message)
|
||||
message = _fws_message("fws:progress.script_phase", index=index,
|
||||
total=total, label=label, percent=percent)
|
||||
elif title:
|
||||
message = "%s · %s" % (title, message)
|
||||
message = _fws_message("fws:progress.titled_phase", title=title,
|
||||
label=label, percent=percent)
|
||||
else:
|
||||
message = _fws_message("fws:progress.phase", label=label,
|
||||
percent=percent)
|
||||
|
||||
step = min(self.steps, int(percent * self.steps / 100))
|
||||
log.debug("FWS install progress: %s (step %s/%s)", message, step, self.steps)
|
||||
@@ -166,7 +183,7 @@ class RunScriptsTask(Task):
|
||||
match = FWS_TITLE_PATTERN.search(getattr(script, "script", "") or "")
|
||||
if match:
|
||||
return match.group(1)
|
||||
return "Script %d" % index
|
||||
return _fws_message("fws:progress.untitled_script", index=index)
|
||||
|
||||
def run(self):
|
||||
"""Execute the task."""
|
||||
@@ -179,7 +196,8 @@ class RunScriptsTask(Task):
|
||||
# percentages published by the script itself, so it never runs
|
||||
# ahead of what has actually been done.
|
||||
self.report_progress(
|
||||
"Script %d/%d · %s" % (index, total, self._current_script[2])
|
||||
_fws_message("fws:progress.script_start", index=index,
|
||||
total=total, title=self._current_script[2])
|
||||
)
|
||||
|
||||
watcher = _ProgressWatcher(self)
|
||||
|
||||
+53
-8
@@ -23,6 +23,7 @@
|
||||
# switching to a console, and the failures that matter (no EFI partition,
|
||||
# no initramfs) are written as CRITIQUE in exactly those files.
|
||||
#
|
||||
import json
|
||||
import os
|
||||
|
||||
import gi
|
||||
@@ -43,6 +44,7 @@ from pyanaconda.modules.common.constants.services import RUNTIME
|
||||
from pyanaconda.modules.common.structures.reboot import RebootData
|
||||
from pyanaconda.ui.gui.hubs.summary import SummaryHub
|
||||
from pyanaconda.ui.gui.spokes import StandaloneSpoke
|
||||
from pyanaconda.ui.gui.spokes.fws_i18n import t
|
||||
from pyanaconda.ui.gui.utils import gtk_call_once
|
||||
from pyanaconda.ui.lib.installation_progress_error import InstallationProgressErrorMixin
|
||||
|
||||
@@ -53,15 +55,45 @@ __all__ = ["ProgressSpoke"]
|
||||
# Logs shown by the journal toggle, in the order the installation writes them.
|
||||
# The target path is completed with conf.target.system_root at runtime.
|
||||
FWS_LOGS = (
|
||||
("pré-installation (live)", "/tmp/fws-pre.log"),
|
||||
("préparation du disque (live)", "/tmp/fws-post-nochroot.log"),
|
||||
("système installé", "var/log/fws-post.log"),
|
||||
("fws:progress.log_pre", "/tmp/fws-pre.log"),
|
||||
("fws:progress.log_post_nochroot", "/tmp/fws-post-nochroot.log"),
|
||||
("fws:progress.log_post", "var/log/fws-post.log"),
|
||||
)
|
||||
FWS_LOG_POLL_MS = 1000
|
||||
# A log that is already large when the view opens is shown from its tail.
|
||||
FWS_LOG_BACKLOG = 256 * 1024
|
||||
FWS_LOG_MAX_CHARS = 2_000_000
|
||||
|
||||
FWS_KEY_PREFIX = "fws:"
|
||||
|
||||
|
||||
def _fws_render(message):
|
||||
"""Text to show for a progress message, in the installer's language.
|
||||
|
||||
FWS messages are a translation key with the "fws:" prefix, optionally
|
||||
followed by a space and a JSON object of named fields (see
|
||||
pyanaconda/modules/runtime/scripts/runtime.py). They are translated here,
|
||||
at display time, because t() follows the language picked on the first
|
||||
screen, which Anaconda stores in this process's $LANG. String fields are
|
||||
rendered first, so a script's own key can sit inside a composed message.
|
||||
Anything else is shown as is: Anaconda's messages are already translated
|
||||
by gettext, and a plain text from a script must keep working.
|
||||
"""
|
||||
if not message.startswith(FWS_KEY_PREFIX):
|
||||
return message
|
||||
key, _sep, payload = message[len(FWS_KEY_PREFIX):].partition(" ")
|
||||
fields = {}
|
||||
if payload:
|
||||
try:
|
||||
fields = json.loads(payload)
|
||||
except ValueError:
|
||||
return message
|
||||
if not isinstance(fields, dict):
|
||||
return message
|
||||
fields = {name: _fws_render(value) if isinstance(value, str) else value
|
||||
for name, value in fields.items()}
|
||||
return t(key, **fields)
|
||||
|
||||
|
||||
class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
"""
|
||||
@@ -168,6 +200,7 @@ class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
from pyanaconda.modules.common.constants.services import BOSS
|
||||
|
||||
super().refresh()
|
||||
self._fws_set_toggle_label()
|
||||
|
||||
# Wait for background threads to finish
|
||||
if thread_manager.running > 1:
|
||||
@@ -201,7 +234,8 @@ class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
def _fws_build_log_view(self):
|
||||
box = self.builder.get_object("progressBox")
|
||||
|
||||
self._fws_toggle = Gtk.ToggleButton(label="Afficher le journal")
|
||||
self._fws_toggle = Gtk.ToggleButton()
|
||||
self._fws_set_toggle_label()
|
||||
self._fws_toggle.set_halign(Gtk.Align.START)
|
||||
self._fws_toggle.connect("toggled", self._fws_on_toggled)
|
||||
box.pack_start(self._fws_toggle, False, False, 6)
|
||||
@@ -233,16 +267,23 @@ class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
self._fws_last_tag = None
|
||||
self._fws_timer = None
|
||||
|
||||
def _fws_set_toggle_label(self):
|
||||
# Also called from refresh(): the spoke can be built before the user
|
||||
# picks the language, the label must follow the language when shown.
|
||||
if self._fws_toggle.get_active():
|
||||
self._fws_toggle.set_label(t("progress.log_hide"))
|
||||
else:
|
||||
self._fws_toggle.set_label(t("progress.log_show"))
|
||||
|
||||
def _fws_on_toggled(self, button):
|
||||
self._fws_set_toggle_label()
|
||||
if button.get_active():
|
||||
button.set_label("Masquer le journal")
|
||||
self._fws_scroll.show()
|
||||
self._fws_poll()
|
||||
if self._fws_timer is None:
|
||||
self._fws_timer = GLib.timeout_add(FWS_LOG_POLL_MS,
|
||||
self._fws_poll)
|
||||
else:
|
||||
button.set_label("Afficher le journal")
|
||||
self._fws_scroll.hide()
|
||||
if self._fws_timer is not None:
|
||||
GLib.source_remove(self._fws_timer)
|
||||
@@ -268,7 +309,9 @@ class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
entry["offset"] += len(data)
|
||||
text = data.decode("utf-8", errors="replace")
|
||||
if self._fws_last_tag != entry["tag"]:
|
||||
text = f"\n── {entry['tag']} : {entry['path']} ──\n{text}"
|
||||
header = t("progress.log_header", name=_fws_render(entry["tag"]),
|
||||
path=entry["path"])
|
||||
text = f"\n{header}\n{text}"
|
||||
self._fws_last_tag = entry["tag"]
|
||||
self._fws_append(text)
|
||||
return True
|
||||
@@ -285,7 +328,9 @@ class ProgressSpoke(StandaloneSpoke, InstallationProgressErrorMixin):
|
||||
def _on_progress_changed(self, step, message):
|
||||
"""Handle a new progress report."""
|
||||
if message:
|
||||
gtk_call_once(self._progressLabel.set_text, message)
|
||||
# FWS: the post-install scripts send translation keys (see
|
||||
# _fws_render); other messages go through unchanged.
|
||||
gtk_call_once(self._progressLabel.set_text, _fws_render(message))
|
||||
|
||||
if self._task_proxy.Steps > 0:
|
||||
gtk_call_once(self._progressBar.set_fraction, step/self._task_proxy.Steps)
|
||||
@@ -0,0 +1,619 @@
|
||||
# FWS installer — translations of the FWS screens and messages.
|
||||
#
|
||||
# Anaconda's own screens are translated by Anaconda. This file covers what FWS
|
||||
# adds: its screens, buttons and installation progress messages. The code
|
||||
# looks texts up by key (t("network.title")) in the language picked on the
|
||||
# first screen, and screens re-read their texts each time they are shown.
|
||||
#
|
||||
# One table per message, one entry per language:
|
||||
#
|
||||
# [network.wifi_connected]
|
||||
# fr = "Connecté au Wi-Fi « {ssid} » ✓ — vous pouvez continuer."
|
||||
# en = "Connected to Wi-Fi “{ssid}” ✓ — you can continue."
|
||||
#
|
||||
# - Language codes are Anaconda's (the names of its translation folders):
|
||||
# fr, de, pt_BR, zh_CN, sr@latin… Codes containing "@" must be quoted
|
||||
# ("sr@latin" = "…"). A territory entry (fr_CH) overrides the language
|
||||
# entry (fr) for that territory only.
|
||||
# - "en" is mandatory: it is shown for every language without an entry.
|
||||
# - {name} placeholders are filled by the code: keep them unchanged in every
|
||||
# language, wherever the sentence needs them. Write a literal brace as {{ }}.
|
||||
# - "_" before a letter marks a button's keyboard shortcut (_Next).
|
||||
# - Entries commented "markup" are Pango markup: keep the tags as they are.
|
||||
# - scripts/check-installer-translations.py checks all of the above; build.sh
|
||||
# runs it before building.
|
||||
|
||||
|
||||
# ==== Wizard navigation (every step) ========================================
|
||||
|
||||
[wizard.back]
|
||||
fr = "_Précédent"
|
||||
en = "_Back"
|
||||
|
||||
[wizard.next]
|
||||
fr = "_Suivant"
|
||||
en = "_Next"
|
||||
|
||||
[wizard.wait_hardware_scan]
|
||||
fr = "Analyse du matériel en cours, l'écran suivant s'ouvre tout seul…"
|
||||
en = "Scanning your hardware… The next screen will open by itself."
|
||||
|
||||
|
||||
# ==== Internet connection screen ============================================
|
||||
|
||||
[network.window_name]
|
||||
fr = "CONNEXION INTERNET"
|
||||
en = "INTERNET CONNECTION"
|
||||
|
||||
[network.title]
|
||||
fr = "Connexion à Internet"
|
||||
en = "Internet connection"
|
||||
|
||||
[network.hint]
|
||||
fr = "Choisissez votre réseau Wi-Fi dans la liste, ou branchez un câble Ethernet. (Vous pourrez continuer sans réseau si besoin.)"
|
||||
en = "Choose your Wi-Fi network from the list, or plug in an Ethernet cable. (You can continue without a network if needed.)"
|
||||
|
||||
[network.list_title]
|
||||
fr = "Réseaux détectés :"
|
||||
en = "Networks found:"
|
||||
|
||||
[network.refresh_button]
|
||||
fr = "Rafraîchir"
|
||||
en = "Refresh"
|
||||
|
||||
[network.show_password]
|
||||
fr = "Afficher"
|
||||
en = "Show"
|
||||
|
||||
[network.connect_button]
|
||||
fr = "Se connecter"
|
||||
en = "Connect"
|
||||
|
||||
[network.password_placeholder]
|
||||
fr = "Mot de passe"
|
||||
en = "Password"
|
||||
|
||||
[network.row_ethernet]
|
||||
fr = "Ethernet (câble)"
|
||||
en = "Ethernet (cable)"
|
||||
|
||||
[network.row_connected]
|
||||
fr = "Connecté ✓"
|
||||
en = "Connected ✓"
|
||||
|
||||
[network.row_click_to_connect]
|
||||
fr = "Cliquer pour se connecter"
|
||||
en = "Click to connect"
|
||||
|
||||
[network.row_wifi_secured]
|
||||
fr = "{signal} % · sécurisé"
|
||||
en = "{signal}% · secured"
|
||||
|
||||
[network.row_wifi_open]
|
||||
fr = "{signal} % · ouvert"
|
||||
en = "{signal}% · open"
|
||||
|
||||
[network.wifi_connected]
|
||||
fr = "Connecté au Wi-Fi « {ssid} » ✓ — vous pouvez continuer."
|
||||
en = "Connected to Wi-Fi “{ssid}” ✓ — you can continue."
|
||||
|
||||
[network.ethernet_online]
|
||||
fr = "Connecté à Internet (Ethernet) ✓ — vous pouvez continuer."
|
||||
en = "Connected to the Internet (Ethernet) ✓ — you can continue."
|
||||
|
||||
[network.no_network]
|
||||
fr = "Aucun réseau détecté. Vérifiez que le Wi-Fi est activé, branchez un câble Ethernet, ou cliquez « Rafraîchir »."
|
||||
en = "No network found. Check that Wi-Fi is turned on, plug in an Ethernet cable, or click “Refresh”."
|
||||
|
||||
[network.pick_network]
|
||||
fr = "Cliquez sur un réseau Wi-Fi pour vous connecter (ou branchez un câble Ethernet)."
|
||||
en = "Click a Wi-Fi network to connect (or plug in an Ethernet cable)."
|
||||
|
||||
[network.ethernet_already_connected]
|
||||
fr = "Ethernet déjà connecté — vous pouvez continuer."
|
||||
en = "Ethernet is already connected — you can continue."
|
||||
|
||||
[network.wifi_already_connected]
|
||||
fr = "Vous êtes déjà connecté au Wi-Fi « {ssid} »."
|
||||
en = "You are already connected to Wi-Fi “{ssid}”."
|
||||
|
||||
# markup
|
||||
[network.password_prompt]
|
||||
fr = "Mot de passe du réseau Wi-Fi « <b>{ssid}</b> » :"
|
||||
en = "Password for Wi-Fi network “<b>{ssid}</b>”:"
|
||||
|
||||
[network.type_password]
|
||||
fr = "Tapez le mot de passe de « {ssid} » puis cliquez « Se connecter »."
|
||||
en = "Type the password for “{ssid}”, then click “Connect”."
|
||||
|
||||
[network.searching]
|
||||
fr = "Recherche des réseaux…"
|
||||
en = "Searching for networks…"
|
||||
|
||||
[network.password_missing]
|
||||
fr = "Tapez d'abord le mot de passe."
|
||||
en = "Type the password first."
|
||||
|
||||
[network.ethernet_connecting]
|
||||
fr = "Connexion Ethernet ({iface})…"
|
||||
en = "Connecting via Ethernet ({iface})…"
|
||||
|
||||
[network.wifi_connecting]
|
||||
fr = "Connexion au Wi-Fi « {ssid} »…"
|
||||
en = "Connecting to Wi-Fi “{ssid}”…"
|
||||
|
||||
[network.ethernet_connected]
|
||||
fr = "Ethernet connecté ✓ — vous pouvez continuer."
|
||||
en = "Ethernet connected ✓ — you can continue."
|
||||
|
||||
[network.wifi_failed]
|
||||
fr = "Connexion à « {ssid} » impossible : mot de passe incorrect, ou réseau hors de portée. Réessayez."
|
||||
en = "Could not connect to “{ssid}”: wrong password, or the network is out of range. Try again."
|
||||
|
||||
[network.ethernet_failed]
|
||||
fr = "Connexion Ethernet impossible (câble débranché ?)."
|
||||
en = "Could not connect via Ethernet (cable unplugged?)."
|
||||
|
||||
|
||||
# ==== Disk support screen (Intel VMD/RST machines only) =====================
|
||||
|
||||
[rst.window_name]
|
||||
fr = "PRISE EN CHARGE DU DISQUE"
|
||||
en = "DISK SUPPORT"
|
||||
|
||||
[rst.title_raid]
|
||||
fr = "Tes disques sont regroupés en RAID Intel"
|
||||
en = "Your disks are grouped in an Intel RAID"
|
||||
|
||||
[rst.title_hidden]
|
||||
fr = "Ton disque n'est pas encore visible"
|
||||
en = "Your disk isn't visible yet"
|
||||
|
||||
[rst.intro_raid]
|
||||
fr = "Sur cette machine, plusieurs disques sont regroupés en un seul volume par la carte mère (« RAID Intel »). FWS sait s'en servir, mais il doit d'abord préparer ce qu'il faut pour que la machine redémarre dessus après l'installation.\n\nClique sur le bouton : rien n'est effacé à cette étape, et tu n'as rien à changer dans le BIOS."
|
||||
en = "On this machine, the motherboard groups several disks into a single volume (“Intel RAID”). FWS can use it, but first it has to prepare what the machine needs to start from it after the installation.\n\nClick the button: nothing is erased at this step, and you don't need to change anything in the BIOS."
|
||||
|
||||
[rst.intro_hidden]
|
||||
fr = "Cette machine range son disque derrière une technologie Intel appelée RST (elle s'appelle parfois « Optane » ou « RAID » dans le BIOS). C'est pour ça qu'aucun disque n'apparaît pour l'instant.\n\nFWS sait s'en occuper : clique sur le bouton. Rien n'est effacé à cette étape, et tu n'as rien à changer dans le BIOS."
|
||||
en = "This machine keeps its disk behind an Intel technology called RST (sometimes named “Optane” or “RAID” in the BIOS). That's why no disk shows up for now.\n\nFWS can handle this: click the button. Nothing is erased at this step, and you don't need to change anything in the BIOS."
|
||||
|
||||
[rst.intro_resolved]
|
||||
fr = "FWS se souviendra de ce réglage pour le système installé : la machine redémarrera bien sur son disque après l'installation."
|
||||
en = "FWS will remember this setting for the installed system: the machine will start from its disk after the installation."
|
||||
|
||||
[rst.fix_button]
|
||||
fr = "Rendre mon disque visible"
|
||||
en = "Make my disk visible"
|
||||
|
||||
[rst.retry_button]
|
||||
fr = "Réessayer"
|
||||
en = "Try again"
|
||||
|
||||
[rst.details_expander]
|
||||
fr = "Afficher les détails techniques"
|
||||
en = "Show technical details"
|
||||
|
||||
[rst.status_working]
|
||||
fr = "Préparation du disque… quelques secondes, il n'y a rien à faire."
|
||||
en = "Preparing the disk… it takes a few seconds, there's nothing to do."
|
||||
|
||||
[rst.status_rescanning]
|
||||
fr = "Le disque répond. Mise à jour de la liste des disques…"
|
||||
en = "The disk is responding. Updating the list of disks…"
|
||||
|
||||
[rst.status_visible]
|
||||
fr = "C'est bon, ton disque est visible. Tu peux continuer."
|
||||
en = "Done, your disk is visible. You can continue."
|
||||
|
||||
# "Rescan Disks" is the button of Anaconda's own disk rescan dialog.
|
||||
[rst.status_visible_rescan_hint]
|
||||
fr = "C'est bon, ton disque est visible. Si l'écran suivant ne le montre pas, utilise « Actualiser… » puis « Analyser à nouveau les disques » à cette étape."
|
||||
en = "Done, your disk is visible. If the next screen doesn't show it, use “Refresh…” then “Rescan Disks” at that step."
|
||||
|
||||
[rst.status_failed]
|
||||
fr = "FWS n'a pas réussi à rendre le disque visible."
|
||||
en = "FWS couldn't make the disk visible."
|
||||
|
||||
[rst.bios_fallback]
|
||||
fr = "Il reste une solution, dans le BIOS de la machine : cherche le réglage de stockage (souvent « SATA Mode », « Intel RST » ou « Optane ») et choisis « AHCI », puis redémarre sur la clé FWS.\n\nÀ savoir si Windows est installé sur cette machine : après ce changement, Windows ne démarrera plus tant que le réglage n'est pas remis comme avant. Si tu veux garder Windows, mieux vaut demander de l'aide avant d'y toucher."
|
||||
en = "One solution is left, in the machine's BIOS: look for the storage setting (often “SATA Mode”, “Intel RST” or “Optane”), choose “AHCI”, then restart from the FWS USB stick.\n\nImportant if Windows is installed on this machine: after this change, Windows will no longer start until the setting is put back as it was. If you want to keep Windows, ask for help before changing it."
|
||||
|
||||
# Line added to the technical details pane, next to the engine's output.
|
||||
[rst.rescan_failed_details]
|
||||
fr = "[FWS] nouveau scan automatique impossible : {error}"
|
||||
en = "[FWS] automatic disk rescan failed: {error}"
|
||||
|
||||
|
||||
# ==== Anaconda user screen: field added by the FWS anaconda package =========
|
||||
|
||||
[user.hostname_label]
|
||||
fr = "Nom de _machine"
|
||||
en = "_Host name"
|
||||
|
||||
[user.hostname_accessible]
|
||||
fr = "Nom de machine"
|
||||
en = "Host name"
|
||||
|
||||
|
||||
# ==== Desktop environment screen ============================================
|
||||
|
||||
[desktop.window_name]
|
||||
fr = "ENVIRONNEMENT DE BUREAU"
|
||||
en = "DESKTOP ENVIRONMENT"
|
||||
|
||||
[desktop.intro]
|
||||
fr = "Choisissez l'environnement de bureau à installer. Un navigateur web (Firefox) est installé automatiquement avec chaque bureau."
|
||||
en = "Choose the desktop environment to install. A web browser (Firefox) is installed automatically with any desktop."
|
||||
|
||||
[desktop.choice_cli]
|
||||
fr = "Ligne de commande uniquement (aucun bureau)"
|
||||
en = "Command line only (no desktop)"
|
||||
|
||||
[desktop.choice_hyprland]
|
||||
fr = "Hyprland — Wayland (non compatible VR)"
|
||||
en = "Hyprland — Wayland (NOT VR compatible)"
|
||||
|
||||
[desktop.choice_i3]
|
||||
fr = "i3 — X11 (compatible VR : SteamVR, HTC Vive, Valve Index…)"
|
||||
en = "i3 — X11 (VR compatible: SteamVR, HTC Vive, Valve Index…)"
|
||||
|
||||
|
||||
# ==== Summary before installing =============================================
|
||||
|
||||
[recap.window_name]
|
||||
fr = "RÉCAPITULATIF AVANT INSTALLATION"
|
||||
en = "REVIEW BEFORE INSTALLATION"
|
||||
|
||||
[recap.start_button]
|
||||
fr = "_Lancer l'installation"
|
||||
en = "_Start Installation"
|
||||
|
||||
[recap.summary_title]
|
||||
fr = "FWS — RÉCAPITULATIF AVANT INSTALLATION"
|
||||
en = "FWS — REVIEW BEFORE INSTALLATION"
|
||||
|
||||
[recap.section_config]
|
||||
fr = "CONFIGURATION CHOISIE"
|
||||
en = "CHOSEN CONFIGURATION"
|
||||
|
||||
[recap.row_language]
|
||||
fr = "Langue"
|
||||
en = "Language"
|
||||
|
||||
[recap.row_keyboard]
|
||||
fr = "Clavier (X11)"
|
||||
en = "Keyboard (X11)"
|
||||
|
||||
[recap.row_timezone]
|
||||
fr = "Fuseau horaire"
|
||||
en = "Time zone"
|
||||
|
||||
[recap.timezone_ntp_on]
|
||||
fr = "{timezone} — synchronisation NTP activée"
|
||||
en = "{timezone} — NTP synchronization enabled"
|
||||
|
||||
[recap.timezone_ntp_off]
|
||||
fr = "{timezone} — synchronisation NTP désactivée"
|
||||
en = "{timezone} — NTP synchronization disabled"
|
||||
|
||||
[recap.row_users]
|
||||
fr = "Utilisateur(s)"
|
||||
en = "User(s)"
|
||||
|
||||
[recap.users_value]
|
||||
fr = "{users} (sudo via wheel)"
|
||||
en = "{users} (sudo via wheel)"
|
||||
|
||||
[recap.users_none]
|
||||
fr = "AUCUN — pensez-y avant de lancer !"
|
||||
en = "NONE — create one before starting!"
|
||||
|
||||
[recap.row_root]
|
||||
fr = "Compte root"
|
||||
en = "Root account"
|
||||
|
||||
[recap.root_locked]
|
||||
fr = "verrouillé (recommandé)"
|
||||
en = "locked (recommended)"
|
||||
|
||||
[recap.root_password_set]
|
||||
fr = "actif, mot de passe défini"
|
||||
en = "enabled, password set"
|
||||
|
||||
[recap.root_no_password]
|
||||
fr = "sans mot de passe → sera VERROUILLÉ en fin d'install"
|
||||
en = "no password → will be LOCKED at the end of the install"
|
||||
|
||||
[recap.row_hostname]
|
||||
fr = "Nom de machine"
|
||||
en = "Hostname"
|
||||
|
||||
[recap.row_desktop]
|
||||
fr = "Bureau"
|
||||
en = "Desktop"
|
||||
|
||||
[recap.desktop_cli]
|
||||
fr = "ligne de commande uniquement (aucun bureau)"
|
||||
en = "command line only (no desktop)"
|
||||
|
||||
[recap.desktop_gnome]
|
||||
fr = "GNOME (+ Firefox, GDM)"
|
||||
en = "GNOME (+ Firefox, GDM)"
|
||||
|
||||
[recap.desktop_kde]
|
||||
fr = "KDE Plasma (+ Firefox, SDDM)"
|
||||
en = "KDE Plasma (+ Firefox, SDDM)"
|
||||
|
||||
[recap.desktop_hyprland]
|
||||
fr = "Hyprland — Wayland, non compatible VR (+ Firefox, SDDM)"
|
||||
en = "Hyprland — Wayland, not VR compatible (+ Firefox, SDDM)"
|
||||
|
||||
[recap.desktop_i3]
|
||||
fr = "i3 — X11, compatible VR/SteamVR (+ Firefox, SDDM)"
|
||||
en = "i3 — X11, VR/SteamVR compatible (+ Firefox, SDDM)"
|
||||
|
||||
[recap.desktop_xfce]
|
||||
fr = "XFCE (+ Firefox, SDDM)"
|
||||
en = "XFCE (+ Firefox, SDDM)"
|
||||
|
||||
[recap.row_partitioning]
|
||||
fr = "Partitionnement"
|
||||
en = "Partitioning"
|
||||
|
||||
[recap.partitioning_automatic]
|
||||
fr = "automatique (recommandé)"
|
||||
en = "automatic (recommended)"
|
||||
|
||||
[recap.partitioning_interactive]
|
||||
fr = "personnalisé (assistant)"
|
||||
en = "custom (guided)"
|
||||
|
||||
[recap.partitioning_custom]
|
||||
fr = "personnalisé"
|
||||
en = "custom"
|
||||
|
||||
[recap.partitioning_blivet]
|
||||
fr = "avancé (blivet-gui)"
|
||||
en = "advanced (blivet-gui)"
|
||||
|
||||
[recap.partitioning_manual]
|
||||
fr = "points de montage manuels"
|
||||
en = "manual mount points"
|
||||
|
||||
[recap.config_unavailable]
|
||||
fr = "(configuration non disponible)"
|
||||
en = "(configuration not available)"
|
||||
|
||||
[recap.section_disks]
|
||||
fr = "DISQUES"
|
||||
en = "DISKS"
|
||||
|
||||
# Two lines: keep a line break, the code indents each line.
|
||||
[recap.disk_warning_automatic]
|
||||
fr = "⚠ Rien n'a encore été écrit. Le partitionnement automatique\nEFFACERA ENTIÈREMENT le(s) disque(s) cible(s) au lancement."
|
||||
en = "⚠ Nothing has been written yet. Automatic partitioning will\nCOMPLETELY ERASE the target disk(s) when the installation starts."
|
||||
|
||||
# Two lines: keep a line break, the code indents each line.
|
||||
[recap.disk_warning_manual]
|
||||
fr = "⚠ Rien n'a encore été écrit. Au lancement, ce sont vos choix\nde partitionnement faits dans l'installateur qui s'appliqueront."
|
||||
en = "⚠ Nothing has been written yet. When the installation starts,\nthe partitioning choices made in the installer will be applied."
|
||||
|
||||
[recap.disk_target]
|
||||
fr = "{disk} ← CIBLE de l'installation"
|
||||
en = "{disk} ← installation TARGET"
|
||||
|
||||
[recap.no_disk]
|
||||
fr = "(aucun disque détecté)"
|
||||
en = "(no disk detected)"
|
||||
|
||||
[recap.section_hardware]
|
||||
fr = "MATÉRIEL DÉTECTÉ"
|
||||
en = "DETECTED HARDWARE"
|
||||
|
||||
[recap.row_virtualization]
|
||||
fr = "Virtualisation"
|
||||
en = "Virtualization"
|
||||
|
||||
[recap.virtualization_none]
|
||||
fr = "aucune (machine physique)"
|
||||
en = "none (physical machine)"
|
||||
|
||||
[recap.row_network]
|
||||
fr = "Réseau"
|
||||
en = "Network"
|
||||
|
||||
[recap.network_ok]
|
||||
fr = "disponible ✔"
|
||||
en = "available ✔"
|
||||
|
||||
# Two lines: keep a line break, the code aligns the second line under the first.
|
||||
[recap.network_down]
|
||||
fr = "INDISPONIBLE ✖ — bureau, drivers et stack FWS ne\ns'installeront PAS (rattrapable au 1er boot)"
|
||||
en = "UNAVAILABLE ✖ — the desktop, drivers and FWS stack will\nNOT be installed (can be done at first boot)"
|
||||
|
||||
[recap.gpus_heading]
|
||||
fr = "Cartes graphiques (drivers installés automatiquement en fin d'install) :"
|
||||
en = "Graphics cards (drivers installed automatically at the end of the install):"
|
||||
|
||||
[recap.no_gpu]
|
||||
fr = "(aucune carte graphique détectée)"
|
||||
en = "(no graphics card detected)"
|
||||
|
||||
[recap.section_steps]
|
||||
fr = "DÉROULEMENT DE L'INSTALLATION"
|
||||
en = "INSTALLATION STEPS"
|
||||
|
||||
[recap.step_partitioning]
|
||||
fr = "Partitionnement, puis copie du système live FWS (payload LiveOS)"
|
||||
en = "Partitioning, then copy of the FWS live system (LiveOS payload)"
|
||||
|
||||
[recap.step_kernel]
|
||||
fr = "Noyau + initramfs régénérés (mkinitcpio), GRUB installé"
|
||||
en = "Kernel + initramfs regenerated (mkinitcpio), GRUB installed"
|
||||
|
||||
[recap.step_desktop]
|
||||
fr = "Bureau choisi + navigateur installés (réseau requis)"
|
||||
en = "Chosen desktop + browser installed (network required)"
|
||||
|
||||
[recap.step_hardware]
|
||||
fr = "Matériel : drivers GPU, outils VM, son, Bluetooth, Podman"
|
||||
en = "Hardware: GPU drivers, VM tools, sound, Bluetooth, Podman"
|
||||
|
||||
[recap.step_hardware_extras]
|
||||
fr = "+ si bureau choisi : {extras}"
|
||||
en = "+ if a desktop is chosen: {extras}"
|
||||
|
||||
[recap.extras_desktop]
|
||||
fr = "Steam, Wine, VR (Monado/OpenXR), PacManager"
|
||||
en = "Steam, Wine, VR (Monado/OpenXR), PacManager"
|
||||
|
||||
[recap.extras_cli]
|
||||
fr = "rien de plus (choix CLI)"
|
||||
en = "nothing more (CLI chosen)"
|
||||
|
||||
# Two lines: keep the line break.
|
||||
[recap.footer]
|
||||
fr = "« Précédent » pour revenir modifier vos choix —\n« Lancer l'installation » pour démarrer réellement l'installation."
|
||||
en = "“Back” to go back and change your choices —\n“Start Installation” to actually start the installation."
|
||||
|
||||
|
||||
# ==== Installation progress (keys sent by the kickstart %post) ==============
|
||||
|
||||
[progress.base_ready]
|
||||
fr = "Système de base préparé — configuration"
|
||||
en = "Base system ready — configuring"
|
||||
|
||||
[progress.live_cleanup]
|
||||
fr = "Nettoyage des résidus du live"
|
||||
en = "Cleaning up live session leftovers"
|
||||
|
||||
[progress.initramfs]
|
||||
fr = "Construction de l'initramfs"
|
||||
en = "Building the initramfs"
|
||||
|
||||
[progress.grub]
|
||||
fr = "Installation de GRUB"
|
||||
en = "Installing GRUB"
|
||||
|
||||
[progress.keyboard_language]
|
||||
fr = "Clavier et langue du système"
|
||||
en = "System keyboard and language"
|
||||
|
||||
[progress.desktop_install]
|
||||
fr = "Installation du bureau (pacman)"
|
||||
en = "Installing the desktop (pacman)"
|
||||
|
||||
[progress.desktop_installed]
|
||||
fr = "Bureau installé — pilotes et pile matérielle"
|
||||
en = "Desktop installed — drivers and hardware stack"
|
||||
|
||||
[progress.desktop_config]
|
||||
fr = "Configuration du bureau (raccourcis, barres, thème)"
|
||||
en = "Configuring the desktop (shortcuts, panels, theme)"
|
||||
|
||||
[progress.admin_identity]
|
||||
fr = "Droits administrateur et identité FWS"
|
||||
en = "Administrator rights and FWS identity"
|
||||
|
||||
[progress.security_network]
|
||||
fr = "Sécurité et réseau du système installé"
|
||||
en = "Security and networking of the installed system"
|
||||
|
||||
[progress.finalizing]
|
||||
fr = "Finalisation"
|
||||
en = "Finishing up"
|
||||
|
||||
[progress.done]
|
||||
fr = "Installation terminée"
|
||||
en = "Installation complete"
|
||||
|
||||
[progress.script_start]
|
||||
fr = "Script {index}/{total} · {title}"
|
||||
en = "Script {index}/{total} · {title}"
|
||||
|
||||
[progress.script_phase]
|
||||
fr = "Script {index}/{total} · {label} — {percent} %"
|
||||
en = "Script {index}/{total} · {label} — {percent}%"
|
||||
|
||||
[progress.titled_phase]
|
||||
fr = "{title} · {label} — {percent} %"
|
||||
en = "{title} · {label} — {percent}%"
|
||||
|
||||
[progress.phase]
|
||||
fr = "{label} — {percent} %"
|
||||
en = "{label} — {percent}%"
|
||||
|
||||
# Title of a script that declares no "# FWS-TITLE:" line.
|
||||
[progress.untitled_script]
|
||||
fr = "Script {index}"
|
||||
en = "Script {index}"
|
||||
|
||||
[progress.log_show]
|
||||
fr = "Afficher le journal"
|
||||
en = "Show log"
|
||||
|
||||
[progress.log_hide]
|
||||
fr = "Masquer le journal"
|
||||
en = "Hide log"
|
||||
|
||||
# Header printed before the lines of each log: {name} is one of the log names
|
||||
# below, {path} the log file.
|
||||
[progress.log_header]
|
||||
fr = "── {name} : {path} ──"
|
||||
en = "── {name}: {path} ──"
|
||||
|
||||
[progress.log_pre]
|
||||
fr = "pré-installation (live)"
|
||||
en = "pre-installation (live)"
|
||||
|
||||
[progress.log_post_nochroot]
|
||||
fr = "préparation du disque (live)"
|
||||
en = "disk preparation (live)"
|
||||
|
||||
[progress.log_post]
|
||||
fr = "système installé"
|
||||
en = "installed system"
|
||||
|
||||
[progress.title_prepare]
|
||||
fr = "Préparation de l'installation (live)"
|
||||
en = "Preparing the installation (live system)"
|
||||
|
||||
[progress.title_configure]
|
||||
fr = "Configuration du système installé"
|
||||
en = "Configuring the installed system"
|
||||
|
||||
[progress.title_finish]
|
||||
fr = "Finalisation et copie des journaux"
|
||||
en = "Finishing and copying the logs"
|
||||
|
||||
|
||||
# ==== Live session dialogs after the installer has closed (/root/.xinitrc) ====
|
||||
|
||||
[session.success_title]
|
||||
fr = "FWS — installation réussie ✅"
|
||||
en = "FWS — installation complete ✅"
|
||||
|
||||
# markup
|
||||
[session.success_text]
|
||||
fr = "<b>FWS est installé sur le disque.</b>\n\n1. Clique OK pour <b>éteindre</b> la machine.\n2. <b>Retire l'ISO</b> (lecteur CD/DVD).\n3. Rallume → FWS démarre."
|
||||
en = "<b>FWS is installed on the disk.</b>\n\n1. Click OK to <b>shut down</b> the machine.\n2. <b>Remove the ISO</b> (CD/DVD drive).\n3. Power on again → FWS starts."
|
||||
|
||||
[session.failure_title]
|
||||
fr = "FWS — l'installation ne s'est pas terminée (sortie {code})"
|
||||
en = "FWS — the installation did not finish (exit {code})"
|
||||
|
||||
[session.close]
|
||||
fr = "Fermer"
|
||||
en = "Close"
|
||||
|
||||
[session.send_report]
|
||||
fr = "Envoyer le rapport aux développeurs"
|
||||
en = "Send the report to the developers"
|
||||
|
||||
[session.reboot]
|
||||
fr = "Redémarrer"
|
||||
en = "Restart"
|
||||
|
||||
[session.bugreport_missing]
|
||||
fr = "fws-bugreport est absent de cette image :\nle rapport ne peut pas être envoyé d'ici."
|
||||
en = "fws-bugreport is missing from this image:\nthe report cannot be sent from here."
|
||||
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- FWS — onglet « Desktop Environment » (choix du bureau à installer). -->
|
||||
<!-- The texts below are only a preview for Glade: FWSDesktopSpoke.refresh()
|
||||
replaces them with those of installer-translations.toml (desktop.*), as
|
||||
Anaconda's catalogs do not contain them. -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.6"/>
|
||||
<requires lib="AnacondaWidgets" version="1.0"/>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
title FWS install medium (%ARCH%, UEFI)
|
||||
sort-key 01
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
|
||||
@@ -1,2 +0,0 @@
|
||||
timeout 3
|
||||
default 01-archiso-linux.conf
|
||||
@@ -1,3 +1,8 @@
|
||||
# UEFI boot menu of the ISO (bootmode uefi.grub). GRUB reads the kernel and
|
||||
# initramfs straight from the ISO 9660 file system, so the EFI system
|
||||
# partition only carries GRUB itself instead of a second copy of both.
|
||||
# Entries mirror the BIOS menu (syslinux/archiso_sys-linux.cfg).
|
||||
|
||||
# Load partition table and file system modules
|
||||
insmod part_gpt
|
||||
insmod part_msdos
|
||||
@@ -36,52 +41,60 @@ else
|
||||
archiso_platform="${grub_cpu}-${grub_platform}"
|
||||
fi
|
||||
|
||||
# Get the lowercase UEFI machine type short-name to use for architecture-specific tools
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
uefi_machine_type_lower='x64'
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
uefi_machine_type_lower='ia32'
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=fwslinux
|
||||
timeout=20
|
||||
default=fws
|
||||
timeout=3
|
||||
timeout_style=menu
|
||||
|
||||
|
||||
# Menu entries
|
||||
|
||||
menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID%
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
# Safe graphics: no KMS, X falls back to the firmware framebuffer.
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% nomodeset udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
# Boots the live without the installer and starts fws-recovery (fws.recovery=1).
|
||||
menuentry "FWS - Reparer une installation (recovery)" --class fws --class gnu-linux --class gnu --class os --id 'fws-recovery' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45 fws.recovery=1
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform}) with speech" --hotkey s --class fws --class gnu-linux --class gnu --class os --id 'fws-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a -f "/boot/memtest86+/memtest86${uefi_machine_type_lower}.efi" ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
|
||||
}
|
||||
fi
|
||||
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'i386' -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellaa64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellriscv64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellloongarch64.efi
|
||||
chainloader /shell${uefi_machine_type_lower}.efi
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -99,3 +112,7 @@ menuentry 'System restart' --class reboot --class restart {
|
||||
echo 'System rebooting...'
|
||||
reboot
|
||||
}
|
||||
|
||||
|
||||
# Audible cue that the menu is up, for users of the speech entry.
|
||||
play 600 988 1 1319 4
|
||||
@@ -13,52 +13,63 @@ else
|
||||
archiso_platform="${grub_cpu}-${grub_platform}"
|
||||
fi
|
||||
|
||||
# Get the lowercase UEFI machine type short-name to use for architecture-specific tools
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' ]; then
|
||||
uefi_machine_type_lower='x64'
|
||||
elif [ "${grub_cpu}" == 'i386' ]; then
|
||||
uefi_machine_type_lower='ia32'
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=fwslinux
|
||||
timeout=15
|
||||
default=fws
|
||||
timeout=3
|
||||
timeout_style=menu
|
||||
|
||||
|
||||
# Menu entries
|
||||
# Menu entries (same as grub.cfg, booted through GRUB's loopback support)
|
||||
|
||||
menuentry "FWS Linux (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'fwslinux' {
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform})" --class fws --class gnu-linux --class gnu --class os --id 'fws' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform}, safe graphics)" --class fws --class gnu-linux --class gnu --class os --id 'fws-nomodeset' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" nomodeset udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
menuentry "FWS - Reparer une installation (recovery)" --class fws --class gnu-linux --class gnu --class os --id 'fws-recovery' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" fws.recovery=1 udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
menuentry "FWS install medium (%ARCH%, ${archiso_platform}) with speech" --hotkey s --class fws --class gnu-linux --class gnu --class os --id 'fws-accessibility' {
|
||||
set gfxpayload=keep
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" accessibility=on udev.event_timeout=45
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
}
|
||||
|
||||
if [ "${grub_platform}" == 'efi' -a -f "/boot/memtest86+/memtest86${uefi_machine_type_lower}.efi" ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest.efi
|
||||
linux /boot/memtest86+/memtest86${uefi_machine_type_lower}.efi
|
||||
}
|
||||
fi
|
||||
if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
|
||||
elif [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
|
||||
menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool {
|
||||
set gfxpayload=800x600,1024x768
|
||||
linux /boot/memtest86+/memtest
|
||||
}
|
||||
fi
|
||||
|
||||
if [ "${grub_platform}" == 'efi' ]; then
|
||||
if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
|
||||
if [ -f "/shell${uefi_machine_type_lower}.efi" ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellx64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'i386' -a -f '/shellia32.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellia32.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'arm64' -a -f '/shellaa64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellaa64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'riscv64' -a -f '/shellriscv64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellriscv64.efi
|
||||
}
|
||||
elif [ "${grub_cpu}" == 'loongarch64' -a -f '/shellloongarch64.efi' ]; then
|
||||
menuentry 'UEFI Shell' --class efi {
|
||||
chainloader /shellloongarch64.efi
|
||||
chainloader /shell${uefi_machine_type_lower}.efi
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
@@ -124,12 +124,6 @@ qemu-guest-agent
|
||||
virtualbox-guest-utils-nox
|
||||
open-vm-tools
|
||||
|
||||
# Conteneurs : moteur sans démon pour les applications isolées, utilisé par
|
||||
# la stack matérielle. fws-setup-hardware l'installait APRÈS coup, donc
|
||||
# seulement si le réseau tenait pendant l'installation — dans l'image,
|
||||
# il est là quoi qu'il arrive.
|
||||
podman
|
||||
|
||||
# --- FWS (fws-local) ---
|
||||
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
|
||||
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
|
||||
|
||||
@@ -26,7 +26,12 @@ Architecture = auto
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
# Build-time only: this file is never copied into the image. Nothing reads the
|
||||
# documentation at runtime (man and info pages stay: man-db and texinfo are
|
||||
# installed). The /boot microcode images are never loaded by the live (no
|
||||
# initrd entry, no microcode hook) and archiso empties /boot in the image; the
|
||||
# installed system gets its microcode from /usr/lib/firmware via mkinitcpio.
|
||||
NoExtract = usr/share/doc/* usr/share/gtk-doc/* boot/intel-ucode.img boot/amd-ucode.img
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
|
||||
@@ -8,7 +8,9 @@ iso_application="Linux made simple, without giving up its power"
|
||||
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
||||
install_dir="fws"
|
||||
buildmodes=('iso')
|
||||
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')
|
||||
# uefi.grub: the EFI partition only holds GRUB, which loads the kernel and
|
||||
# initramfs from ISO 9660 (systemd-boot needed its own copy of both).
|
||||
bootmodes=('bios.syslinux' 'uefi.grub')
|
||||
arch="x86_64"
|
||||
pacman_conf="pacman.conf"
|
||||
airootfs_image_type="squashfs"
|
||||
@@ -47,5 +49,6 @@ file_permissions=(
|
||||
["/usr/local/bin/fws-bugreport"]="0:0:755"
|
||||
["/usr/local/bin/fws-wallpaper"]="0:0:755"
|
||||
["/usr/local/bin/fws-install-step"]="0:0:755"
|
||||
["/usr/local/bin/fws-i18n"]="0:0:755"
|
||||
["/etc/grub.d/42_fws-recovery"]="0:0:755"
|
||||
)
|
||||
@@ -137,7 +137,7 @@ bootloader --disabled
|
||||
# pacman, choix de bureau écrit par l'addon de sélection).
|
||||
# ============================================================================
|
||||
%post --nochroot --log=/tmp/fws-post-nochroot.log
|
||||
# FWS-TITLE: Préparation de l'installation (live)
|
||||
# FWS-TITLE: fws:progress.title_prepare
|
||||
# Écran de progression : chaque phase publie son avancement (fws-install-step),
|
||||
# l'installeur affiche le script en cours, ce qu'il fait et un pourcentage.
|
||||
set -x
|
||||
@@ -247,7 +247,7 @@ if [ -f /tmp/fws-keep-wifi ]; then
|
||||
"$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
fws-install-step 6 "Système de base préparé — configuration"
|
||||
fws-install-step 6 fws:progress.base_ready
|
||||
%end
|
||||
|
||||
|
||||
@@ -257,9 +257,9 @@ fws-install-step 6 "Système de base préparé — configuration"
|
||||
# Log persistant : /var/log/fws-post.log sur le système installé.
|
||||
# ============================================================================
|
||||
%post --log=/var/log/fws-post.log
|
||||
# FWS-TITLE: Configuration du système installé
|
||||
# FWS-TITLE: fws:progress.title_configure
|
||||
set -x
|
||||
fws-install-step 8 "Nettoyage des résidus du live"
|
||||
fws-install-step 8 fws:progress.live_cleanup
|
||||
|
||||
# --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ----
|
||||
# Le live fournit /etc/mkinitcpio.d/linux.preset = preset « archiso » (pointe
|
||||
@@ -346,7 +346,7 @@ rm -f /etc/systemd/system/dbus-org.freedesktop.network1.service \
|
||||
/etc/systemd/system/sockets.target.wants/pcscd.socket \
|
||||
/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true
|
||||
|
||||
fws-install-step 14 "Construction de l'initramfs"
|
||||
fws-install-step 14 fws:progress.initramfs
|
||||
|
||||
# --- 2) mkinitcpio : noyau (rattrapage) + génération finale -----------------
|
||||
# mkinitcpio exige un noyau lisible : s'il manque (rattrapage de copie raté
|
||||
@@ -372,7 +372,7 @@ else
|
||||
echo "[FWS] CRITIQUE : toujours aucun noyau — initramfs NON généré, le disque NE BOOTERA PAS."
|
||||
fi
|
||||
|
||||
fws-install-step 22 "Installation de GRUB"
|
||||
fws-install-step 22 fws:progress.grub
|
||||
|
||||
# --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------
|
||||
install_grub() {
|
||||
@@ -502,7 +502,7 @@ fi
|
||||
# d'activation n'est créé qu'ici, dans le système installé).
|
||||
systemctl enable fws-grub-finalize.service || true
|
||||
|
||||
fws-install-step 28 "Clavier et langue du système"
|
||||
fws-install-step 28 fws:progress.keyboard_language
|
||||
|
||||
# --- 3bis) Clavier (X11) + LOCALE --------------------------------------------
|
||||
# CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X
|
||||
@@ -539,10 +539,13 @@ if [ -n "$FWSLANG" ]; then
|
||||
_cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8"
|
||||
grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \
|
||||
|| printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen
|
||||
locale-gen || echo "[FWS] locale-gen a échoué pour $FWSLANG"
|
||||
fi
|
||||
# Always, even without a language: the live ships every UTF-8 locale (so the
|
||||
# installer speaks all of Anaconda's languages) and locale-gen rebuilds the
|
||||
# archive from /etc/locale.gen only, instead of keeping ~190 MiB of locales.
|
||||
locale-gen || echo "[FWS] locale-gen a échoué pour ${FWSLANG:-?}"
|
||||
|
||||
fws-install-step 32 "Installation du bureau (pacman)"
|
||||
fws-install-step 32 fws:progress.desktop_install
|
||||
|
||||
# --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) -------
|
||||
DESK="cli"
|
||||
@@ -808,7 +811,7 @@ MOTD
|
||||
fi
|
||||
fi
|
||||
|
||||
fws-install-step 62 "Bureau installé — pilotes et pile matérielle"
|
||||
fws-install-step 62 fws:progress.desktop_installed
|
||||
|
||||
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------
|
||||
# Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci
|
||||
@@ -824,7 +827,7 @@ if [ -x /usr/local/bin/fws-setup-hardware ]; then
|
||||
/usr/local/bin/fws-setup-hardware --unattended "$DESK" || true
|
||||
fi
|
||||
|
||||
fws-install-step 76 "Configuration du bureau (raccourcis, barres, thème)"
|
||||
fws-install-step 76 fws:progress.desktop_config
|
||||
|
||||
# --- Config Hyprland (si choisi) : clavier + apps + waybar -------------------
|
||||
# Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa
|
||||
@@ -882,7 +885,7 @@ if [ "$DESK" = "i3" ] && [ -f /usr/local/share/fws/i3-config ]; then
|
||||
done < /etc/passwd
|
||||
fi
|
||||
|
||||
fws-install-step 84 "Droits administrateur et identité FWS"
|
||||
fws-install-step 84 fws:progress.admin_identity
|
||||
|
||||
# --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer -----------------
|
||||
# Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut
|
||||
@@ -956,7 +959,7 @@ systemctl enable systemd-timesyncd.service 2>/dev/null || true
|
||||
# normal), la target le tire par Requires. Dans le bureau, le lanceur
|
||||
# « Récupération FWS » (fws-recovery.desktop, polkit) fait le même travail.
|
||||
|
||||
fws-install-step 92 "Sécurité et réseau du système installé"
|
||||
fws-install-step 92 fws:progress.security_network
|
||||
|
||||
# --- 5) Sécurité : verrouiller root s'il est resté SANS mot de passe ----------
|
||||
# L'airootfs live a souvent un root sans mot de passe ; si l'utilisateur n'en a
|
||||
@@ -981,7 +984,7 @@ systemctl enable systemd-resolved.service 2>/dev/null || true
|
||||
install -d /etc/NetworkManager/conf.d
|
||||
printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf
|
||||
|
||||
fws-install-step 99 "Finalisation"
|
||||
fws-install-step 99 fws:progress.finalizing
|
||||
%end
|
||||
|
||||
|
||||
@@ -994,9 +997,9 @@ fws-install-step 99 "Finalisation"
|
||||
# le disque va booter.
|
||||
# ============================================================================
|
||||
%post --nochroot
|
||||
# FWS-TITLE: Finalisation et copie des journaux
|
||||
# FWS-TITLE: fws:progress.title_finish
|
||||
SYSROOT=/mnt/sysroot
|
||||
[ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage
|
||||
cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true
|
||||
fws-install-step 100 "Installation terminée"
|
||||
fws-install-step 100 fws:progress.done
|
||||
%end
|
||||
@@ -1,5 +0,0 @@
|
||||
title FWS install medium (%ARCH%, UEFI)
|
||||
sort-key 01
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45
|
||||
@@ -1,8 +0,0 @@
|
||||
# Mode graphique de secours : SANS KMS (nomodeset). Filet de sécurité
|
||||
# standard pour les GPU/hyperviseurs dont le pilote KMS pose problème :
|
||||
# X démarre alors sur le framebuffer VESA/EFI (plus lent mais fiable).
|
||||
title FWS install medium (%ARCH%, UEFI, safe graphics)
|
||||
sort-key 01b
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% nomodeset udev.event_timeout=45
|
||||
@@ -1,9 +0,0 @@
|
||||
# « Réparer FWS » : boote le live SANS installateur et lance l'assistant de
|
||||
# réparation en console (fws-recovery, via le hook fws.recovery=1 du
|
||||
# .zprofile) : réinstaller GRUB, régénérer l'initramfs, réparer pacman,
|
||||
# shell chroot — le point de restauration FWS.
|
||||
title FWS - Reparer une installation (recovery)
|
||||
sort-key 01d
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% udev.event_timeout=45 fws.recovery=1
|
||||
@@ -1,5 +0,0 @@
|
||||
title FWS install medium (%ARCH%, UEFI) with speech
|
||||
sort-key 02
|
||||
linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux
|
||||
initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img
|
||||
options archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% accessibility=on udev.event_timeout=45
|
||||
@@ -1,4 +0,0 @@
|
||||
title Memtest86+
|
||||
sort-key 03
|
||||
efi /boot/memtest86+/memtest.efi
|
||||
architecture x64
|
||||
@@ -1,3 +0,0 @@
|
||||
timeout 15
|
||||
default 01-archiso-linux.conf
|
||||
beep on
|
||||
@@ -125,12 +125,6 @@ qemu-guest-agent
|
||||
virtualbox-guest-utils-nox
|
||||
open-vm-tools
|
||||
|
||||
# Conteneurs : moteur sans démon pour les applications isolées, utilisé par
|
||||
# la stack matérielle. fws-setup-hardware l'installait APRÈS coup, donc
|
||||
# seulement si le réseau tenait pendant l'installation — dans l'image,
|
||||
# il est là quoi qu'il arrive.
|
||||
podman
|
||||
|
||||
# --- FWS (fws-local) ---
|
||||
# Gestionnaire de paquets graphique PacManager (Qt6). Installé dans un
|
||||
# répertoire dédié /opt/fws-pacmanage : son self-update réécrit CE dossier
|
||||
|
||||
@@ -3,6 +3,8 @@ HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
ParallelDownloads = 5
|
||||
CheckSpace
|
||||
# Same exclusions as configs/baseline/pacman.conf (which overrides this file).
|
||||
NoExtract = usr/share/doc/* usr/share/gtk-doc/* boot/intel-ucode.img boot/amd-ucode.img
|
||||
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -0,0 +1,122 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check the FWS installer translations file.
|
||||
|
||||
Errors (exit status 1):
|
||||
- the file is not valid TOML;
|
||||
- a message has no "en" text (the fallback of every language);
|
||||
- a language code does not look like an Anaconda one (fr, pt_BR, sr@latin);
|
||||
- a translation does not use exactly the same {placeholders} as "en";
|
||||
- the code asks for a key that the file does not define.
|
||||
Warnings: keys defined but never used.
|
||||
The summary lists how many messages each language translates.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
REPO = pathlib.Path(__file__).resolve().parent.parent
|
||||
DEFAULT_FILE = REPO / "configs/baseline/airootfs/usr/local/share/fws/installer-translations.toml"
|
||||
CODE_ROOTS = [REPO / "configs/baseline/airootfs", REPO / "configs/releng/airootfs"]
|
||||
|
||||
LANGUAGE_CODE = re.compile(r"^[a-z]{2,3}(_[A-Z]{2})?(@[a-z]+)?$")
|
||||
# t("key") in Python; in shell, the "fws:key" form that hands a key over to the
|
||||
# installer's progress screen, and calls to the fws-i18n command.
|
||||
PY_USAGE = re.compile(r"""\bt\(\s*["']([a-z0-9_]+(?:\.[a-z0-9_]+)+)["']""")
|
||||
SHELL_USAGE = re.compile(r"""(?:\bfws:|\bfws-i18n\s+)([a-z0-9_]+(?:\.[a-z0-9_]+)+)\b""")
|
||||
|
||||
|
||||
def flatten(table, prefix=""):
|
||||
texts = {name: value for name, value in table.items() if not isinstance(value, dict)}
|
||||
if texts and prefix:
|
||||
yield prefix, texts
|
||||
for name, value in table.items():
|
||||
if isinstance(value, dict):
|
||||
yield from flatten(value, f"{prefix}.{name}" if prefix else name)
|
||||
|
||||
|
||||
def placeholders(text):
|
||||
return {field for _, field, _, _ in string.Formatter().parse(text) if field is not None}
|
||||
|
||||
|
||||
def used_keys():
|
||||
keys = {}
|
||||
for root in CODE_ROOTS:
|
||||
for path in root.rglob("*"):
|
||||
if not path.is_file() or "__pycache__" in path.parts:
|
||||
continue
|
||||
if path.suffix not in (".py", ".sh", ".ks", "") and path.name != ".xinitrc":
|
||||
continue
|
||||
try:
|
||||
text = path.read_text(encoding="utf-8")
|
||||
except (UnicodeDecodeError, OSError):
|
||||
continue
|
||||
for pattern in (PY_USAGE, SHELL_USAGE):
|
||||
for match in pattern.finditer(text):
|
||||
keys.setdefault(match.group(1), path.relative_to(REPO))
|
||||
return keys
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
parser.add_argument("--file", type=pathlib.Path, default=DEFAULT_FILE)
|
||||
parser.add_argument("--skip-usage", action="store_true",
|
||||
help="do not compare the keys with the code (checking a fragment)")
|
||||
args = parser.parse_args()
|
||||
|
||||
errors, warnings = [], []
|
||||
try:
|
||||
data = tomllib.loads(args.file.read_text(encoding="utf-8"))
|
||||
except (OSError, tomllib.TOMLDecodeError) as exc:
|
||||
print(f"ERROR: {args.file}: {exc}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
messages = dict(flatten(data))
|
||||
coverage = {}
|
||||
for key, texts in messages.items():
|
||||
reference = texts.get("en")
|
||||
if not isinstance(reference, str) or not reference:
|
||||
errors.append(f"{key}: no \"en\" text")
|
||||
continue
|
||||
expected = placeholders(reference)
|
||||
for language, text in texts.items():
|
||||
if not LANGUAGE_CODE.match(language):
|
||||
errors.append(f"{key}: unexpected language code {language!r}")
|
||||
continue
|
||||
if not isinstance(text, str) or not text:
|
||||
errors.append(f"{key}.{language}: empty or not a string")
|
||||
continue
|
||||
try:
|
||||
found = placeholders(text)
|
||||
except ValueError as exc:
|
||||
errors.append(f"{key}.{language}: {exc}")
|
||||
continue
|
||||
if found != expected:
|
||||
errors.append(f"{key}.{language}: placeholders {sorted(found)} "
|
||||
f"instead of {sorted(expected)}")
|
||||
coverage[language] = coverage.get(language, 0) + 1
|
||||
|
||||
if not args.skip_usage:
|
||||
used = used_keys()
|
||||
for key, where in sorted(used.items()):
|
||||
if key not in messages:
|
||||
errors.append(f"{key}: used in {where} but not defined")
|
||||
for key in sorted(set(messages) - set(used)):
|
||||
warnings.append(f"{key}: defined but never used")
|
||||
|
||||
for line in warnings:
|
||||
print(f"warning: {line}", file=sys.stderr)
|
||||
for line in errors:
|
||||
print(f"ERROR: {line}", file=sys.stderr)
|
||||
total = len(messages)
|
||||
summary = ", ".join(f"{lang} {count}/{total}" for lang, count in
|
||||
sorted(coverage.items(), key=lambda item: (-item[1], item[0])))
|
||||
print(f"{total} messages — {summary or 'no translation'}")
|
||||
return 1 if errors else 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user