slitaz-tools rev 205
slitaz-installer: fix variables in messages
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 22 14:10:26 2008 +0000 (2008-05-22) |
parents | df6285a99463 |
children | 7f10b236e5a3 |
files | installer/slitaz-installer |
line diff
1.1 --- a/installer/slitaz-installer Wed May 21 20:41:15 2008 +0000 1.2 +++ b/installer/slitaz-installer Thu May 22 14:10:26 2008 +0000 1.3 @@ -2,7 +2,7 @@ 1.4 # slitaz-installer - SliTaz GNU/Linux installer. 1.5 # 1.6 # So this is SliTaz installer using dialog boxes. All the comments are in 1.7 -# English but displayed messages are in French. The scrip starts with a 1.8 +# English but displayed messages are in French. The script starts with a 1.9 # few main variables, then all the functions and then a sequece of functions. 1.10 # 1.11 # (C) 2007-2008 SliTaz - GNU General Public License v3. 1.12 @@ -27,17 +27,20 @@ 1.13 LOG=/var/log/slitaz-installer.log 1.14 BACKLIST="SliTaz GNU/Linux installer" 1.15 1.16 -# Messages language setting 1.17 -if echo $LANG | grep fr; then 1.18 - . /usr/share/slitaz-tools/installer/fr.msg 1.19 -else 1.20 - . /usr/share/slitaz-tools/installer/en.msg 1.21 -fi 1.22 - 1.23 ####################### 1.24 # Installer functions # 1.25 ####################### 1.26 1.27 +# Messages language setting 1.28 +set_messages() 1.29 +{ 1.30 + if echo $LANG | grep fr; then 1.31 + . /usr/share/slitaz-tools/installer/fr.msg 1.32 + else 1.33 + . /usr/share/slitaz-tools/installer/en.msg 1.34 + fi 1.35 +} 1.36 + 1.37 # Display error message. 1.38 error_message() 1.39 { 1.40 @@ -161,6 +164,7 @@ 1.41 if [ -z $TARGET_DEV ]; then 1.42 ask_for_target_dev 1.43 fi 1.44 + set_messages 1.45 # Check if specified device exist in /proc/partitions. 1.46 DEV_NAME=${TARGET_DEV#/dev/} 1.47 if cat /proc/partitions | grep -q $DEV_NAME; then 1.48 @@ -471,6 +475,7 @@ 1.49 grub_install() 1.50 { 1.51 TARGET_DISK=`echo $TARGET_DEV | sed s/"[0-9]"/''/` 1.52 + set_messages 1.53 $DIALOG --title " GRUB install " \ 1.54 --backtitle "$BACKLIST" \ 1.55 --clear --colors --yesno "$GRUB_INSTALL_MSG" 18 70 1.56 @@ -614,6 +619,7 @@ 1.57 mount $UPGRADE_DEV $TARGET_ROOT >>$LOG 2>>$LOG 1.58 cd $TARGET_ROOT 1.59 TARGET_DEV=$UPGRADE_DEV 1.60 + set_messages 1.61 1.62 echo "XXX" && echo 10 1.63 echo -e "\nRecherch de /etc/slitaz-release" 1.64 @@ -787,6 +793,7 @@ 1.65 end_of_upgrade() 1.66 { 1.67 TARGET_DEV=$UPGRADE_DEV 1.68 + set_messages 1.69 pkgscd=`cat $TARGET_ROOT/var/lib/slitaz-installer/packages-cdrom.list | wc -l` 1.70 pkginst=`cat $TARGET_ROOT/var/lib/slitaz-installer/packages-to-install.list | wc -l` 1.71 echo "end_of_upgrade: `date`" >>$LOG 1.72 @@ -817,6 +824,7 @@ 1.73 # Installer sequence # 1.74 ###################### 1.75 1.76 +set_messages 1.77 check_root 1.78 start_installer 1.79