feat(i18n): translate fws-update

This commit is contained in:
nocode committed 2026-11-26 18:18:28 +01:00
1 parent e7bca58dae
commit 6cbe4e6606
1 file changed
+11 -9
@@ -8,26 +8,28 @@ if [ "$(id -u)" -ne 0 ]; then
exec sudo "$0" "$@"
fi
say "Mise à jour du système (pacman -Syu)…"
pacman -Syu || { echo "Échec de la mise à jour (réseau ?)"; read -rp "Entrée pour fermer. " _; exit 1; }
. /usr/local/lib/fws/i18n.sh update common
say "$(t update.updating_system)"
pacman -Syu || { echo "$(t update.failed)"; read -rp "$(t common.press_enter_to_close) " _; exit 1; }
if command -v paccache >/dev/null 2>&1; then
say "Nettoyage du cache des paquets (2 dernières versions gardées)…"
say "$(t update.cleaning_cache)"
paccache -rk2
fi
ORPHANS="$(pacman -Qtdq 2>/dev/null)"
if [ -n "$ORPHANS" ]; then
say "Paquets orphelins (plus requis par rien) :"
say "$(t update.orphans)"
echo "$ORPHANS"
read -rp "Les supprimer ? [o/N] " _rm
case "$_rm" in o|O|oui) echo "$ORPHANS" | pacman -Rns --noconfirm - ;; esac
read -rp "$(t update.remove_orphans) $(t common.yes_no) " _rm
t_is_yes "$_rm" && echo "$ORPHANS" | pacman -Rns --noconfirm -
fi
if command -v flatpak >/dev/null 2>&1; then
say "Mise à jour des Flatpaks…"
say "$(t update.updating_flatpaks)"
flatpak update -y || true
fi
say "Système à jour ✔"
read -rp "Entrée pour fermer. " _
say "$(t update.done)"
read -rp "$(t common.press_enter_to_close) " _