tazpanel diff installer.cgi @ rev 303

3 weeks forging ;) Some bugs fixed, maybe all i18n improved (please, recheck 'po's!), couple of new features added... Enjoy!
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri May 04 13:00:43 2012 +0300 (2012-05-04)
parents e1b450c92890
children 42367a53cf50
line diff
     1.1 --- a/installer.cgi	Tue May 01 12:10:02 2012 +0200
     1.2 +++ b/installer.cgi	Fri May 04 13:00:43 2012 +0300
     1.3 @@ -18,8 +18,8 @@
     1.4  . /usr/bin/gettext.sh
     1.5  
     1.6  # Export package name for gettext.
     1.7 -TEXTDOMAIN='installer'
     1.8 -export TEXTDOMAIN
     1.9 +#TEXTDOMAIN='installer'
    1.10 +#export TEXTDOMAIN
    1.11  
    1.12  TITLE=$(gettext 'TazPanel - Installer')
    1.13  
    1.14 @@ -113,21 +113,22 @@
    1.15  }'
    1.16  	else
    1.17  		# no setup file found: creating
    1.18 -		gettext "Creating setup file $INSTFILE."
    1.19 +		eval_gettext 'Creating setup file $INSTFILE.'
    1.20  		tazinst new $INSTFILE
    1.21  		if [ ! -e "$INSTFILE" ]; then
    1.22  			cat <<EOT
    1.23 -<span class="msg-nok">$(gettext "Setup File Error")<br />
    1.24 -$(gettext "The setup file <strong>$INSTFILE</strong> doesn't exist.")</span><br />
    1.25 +<span class="msg-nok">$(gettext 'Setup File Error')<br />
    1.26 +$(eval_gettext "The setup file <strong>\$INSTFILE</strong> doesn't \
    1.27 +exist.")</span><br />
    1.28  EOT
    1.29  		else
    1.30  			if [ ! -r $INSTFILE ]; then
    1.31  				cat <<EOT
    1.32 -<span class="msg-nok">$(gettext "Setup File Error")<br />
    1.33 -$(gettext "The setup file <strong>$INSTFILE</strong> is not readable. 
    1.34 +<span class="msg-nok">$(gettext 'Setup File Error')<br />
    1.35 +$(eval_gettext "The setup file <strong>$INSTFILE</strong> is not readable. \
    1.36  Check permissions and ownership.")</span><br />
    1.37  EOT
    1.38 -			fi	
    1.39 +			fi
    1.40  		fi
    1.41  	fi
    1.42  	# read setup file
    1.43 @@ -138,12 +139,11 @@
    1.44  {
    1.45  	cat <<EOT
    1.46  <div id="wrapper">
    1.47 -	<h2>$(gettext "SliTaz Installer")</h2>
    1.48 -<p>
    1.49 -	$(gettext "The SliTaz Installer installs or upgrades SliTaz to a hard disk
    1.50 -	drive from a device like a Live-CD or LiveUSB key, from a SliTaz ISO file,
    1.51 -	or from the web by downloading an ISO file.")
    1.52 -<p>
    1.53 +	<h2>$(gettext 'SliTaz Installer')</h2>
    1.54 +
    1.55 +<p>$(gettext "The SliTaz Installer installs or upgrades SliTaz to a hard disk \
    1.56 +drive from a device like a Live-CD or LiveUSB key, from a SliTaz ISO file, or \
    1.57 +from the web by downloading an ISO file.")</p>
    1.58  </div>
    1.59  EOT
    1.60  }
    1.61 @@ -152,21 +152,19 @@
    1.62  {
    1.63  	cat <<EOT
    1.64  <div class="box">
    1.65 -	<h4>$(gettext "Install")</h4>
    1.66 -<p>
    1.67 -	$(gettext "Install SliTaz on a partition of your hard disk drive. If
    1.68 -	you decide to format your partition, all data will be lost. If you do not
    1.69 -	format, all data except for any existing /home directory will be removed, 
    1.70 -	the home directory will be kept as is.")
    1.71 -</p>
    1.72 -<p>
    1.73 -	$(gettext "Before installation, you may need to create or resize partitions
    1.74 -	on your hard disk drive in order to make space for SliTaz GNU/Linux.
    1.75 -	You can graphically manage your partitions with Gparted")
    1.76 -</p>
    1.77 +	<h4>$(gettext 'Install')</h4>
    1.78 +
    1.79 +<p>$(gettext "Install SliTaz on a partition of your hard disk drive. If you \
    1.80 +decide to format your partition, all data will be lost. If you do not format, \
    1.81 +all data except for any existing /home directory will be removed, the home \
    1.82 +directory will be kept as is.")</p>
    1.83 +
    1.84 +<p>$(gettext "Before installation, you may need to create or resize partitions \
    1.85 +on your hard disk drive in order to make space for SliTaz GNU/Linux. You can \
    1.86 +graphically manage your partitions with Gparted")</p>
    1.87  </div>
    1.88 -<p>
    1.89 -<a class="button" href="$SCRIPT_NAME?page=partitioning">$(gettext "Install SliTaz")</a>
    1.90 +<p><a class="button" href="$SCRIPT_NAME?page=partitioning">$(gettext "Install \
    1.91 +SliTaz")</a>
    1.92  EOT
    1.93  }
    1.94  
    1.95 @@ -174,69 +172,66 @@
    1.96  {
    1.97  	cat <<EOT
    1.98  <div class="box">
    1.99 -	<h4>$(gettext "Upgrade")</h4>
   1.100 -<p>
   1.101 -	$(gettext "Upgrade an already installed SliTaz system on your hard disk
   1.102 -	drive. Your /home /etc /var/www directories will be kept, all other directories
   1.103 -	will be removed. Any additional packages added to your old Slitaz system
   1.104 -	will be updated as long you have an active internet connection.")
   1.105 -</p>
   1.106 +	<h4>$(gettext 'Upgrade')</h4>
   1.107 +
   1.108 +<p>$(gettext "Upgrade an already installed SliTaz system on your hard disk \
   1.109 +drive. Your /home /etc /var/www directories will be kept, all other \
   1.110 +directories will be removed. Any additional packages added to your old Slitaz \
   1.111 +system will be updated as long you have an active internet connection.")</p>
   1.112  </div>
   1.113 -<p>
   1.114 -	<a class="button" href="$SCRIPT_NAME?page=upgrade">$(gettext "Upgrade SliTaz")</a>
   1.115 -</p>
   1.116 +<p><a class="button" href="$SCRIPT_NAME?page=upgrade">$(gettext "Upgrade \
   1.117 +SliTaz")</a></p>
   1.118  EOT
   1.119  }
   1.120  
   1.121  select_gparted()
   1.122  {
   1.123  	cat <<EOT
   1.124 -<h4>$(gettext "Partitioning")</h4>
   1.125 +<h4>$(gettext 'Partitioning')</h4>
   1.126  <div class="box">
   1.127 -<p>
   1.128 -	$(gettext "On most used systems, the hard drive is already dedicated to 
   1.129 -	partitions for Windows<sup>&copy;</sup>, or Linux, or another operating 
   1.130 -	system. You'll need to resize these partitions in order to make space for
   1.131 -	SliTaz GNU/Linux. SliTaz will co-exist with other operating systems already
   1.132 -	installed on your hard drive.") 
   1.133 -</p>
   1.134 -<p>
   1.135 -	$(gettext "The amount of space needed depends on how much software you 
   1.136 -	plan to install	and how much space you require for users. It's conceivable
   1.137 -	that you could run a minimal SliTaz system in 300 megs or less, but 2 gigs
   1.138 -	is indeed more comfy.")
   1.139 -<p>
   1.140 -	$(gettext "A separate home partition, and a partition that will be used 
   1.141 -	as Linux swap space may be created if needed. Slitaz detects and uses swap
   1.142 -	partitions automatically.")
   1.143 -</p>
   1.144 -</p>
   1.145 +
   1.146 +<p>$(gettext "On most used systems, the hard drive is already dedicated to \
   1.147 +partitions for Windows<sup>&trade;</sup>, or Linux, or another operating \
   1.148 +system. You'll need to resize these partitions in order to make space for \
   1.149 +SliTaz GNU/Linux. SliTaz will co-exist with other operating systems already \
   1.150 +installed on your hard drive.")</p>
   1.151 +
   1.152 +<p>$(gettext "The amount of space needed depends on how much software you plan \
   1.153 +to install and how much space you require for users. It's conceivable that you \
   1.154 +could run a minimal SliTaz system in 300 megs or less, but 2 gigs is indeed \
   1.155 +more comfy.")</p>
   1.156 +
   1.157 +<p>$(gettext "A separate home partition, and a partition that will be used as \
   1.158 +Linux swap space may be created if needed. Slitaz detects and uses swap \
   1.159 +partitions automatically.")</p>
   1.160 +
   1.161  </div>
   1.162 +
   1.163  <div class="box">
   1.164 -<p>
   1.165 -	$(gettext "You can graphically manage your partitions with Gparted. GParted
   1.166 -	is a partition editor for graphically managing your disk partitions. Gparted
   1.167 -	allows you to create, destroy, resize and copy partitions without data
   1.168 -	loss.")
   1.169 -</p>
   1.170 -<p>
   1.171 -	$(gettext "Gparted supports ext2, ext3, ext4, linux swap, ntfs and fat32
   1.172 -	filesystems right out of the box. Support for xjs, jfs, hfs and other
   1.173 -	filesystems is available as well but you first need to add drivers for 
   1.174 -	these filesystems by installing the related packages xfsprogs, jfsutils,
   1.175 -	linux-hfs and so on.")
   1.176 -</p>
   1.177 +
   1.178 +<p>$(gettext "You can graphically manage your partitions with Gparted. GParted \
   1.179 +is a partition editor for graphically managing your disk partitions. Gparted \
   1.180 +allows you to create, destroy, resize and copy partitions without data loss.")</p>
   1.181 +
   1.182 +<p>$(gettext "Gparted supports ext2, ext3, ext4, linux swap, ntfs and fat32 \
   1.183 +filesystems right out of the box. Support for xjs, jfs, hfs and other \
   1.184 +filesystems is available as well but you first need to add drivers for these \
   1.185 +filesystems by installing the related packages xfsprogs, jfsutils, linux-hfs \
   1.186 +and so on.")</p>
   1.187  </div>
   1.188 -<a class="button" href="$SCRIPT_NAME?page=gparted">$(gettext "Execute Gparted")</a>
   1.189 -<h5>$(gettext "Continue installation")</h5>
   1.190 -	$(gettext "Once you've made room for SliTaz on your drive,	you
   1.191 -	should be able to continue installation.")
   1.192 +
   1.193 +<a class="button" href="$SCRIPT_NAME?page=gparted">$(gettext 'Execute Gparted')</a>
   1.194 +
   1.195 +<h5>$(gettext 'Continue installation')</h5>
   1.196 +
   1.197 +<p>$(gettext "Once you've made room for SliTaz on your drive, you should be \
   1.198 +able to continue installation.")
   1.199  
   1.200  <hr />
   1.201  <a class="button" value="$1" href="$SCRIPT_NAME?page=home" >
   1.202 -	$(gettext "Back to Installer Start Page")</a>
   1.203 +	$(gettext 'Back to Installer Start Page')</a>
   1.204  <a class="button" value="$2" href="$SCRIPT_NAME?page=install">
   1.205 -	$(gettext "Continue Installation")</a>
   1.206 +	$(gettext 'Continue Installation')</a>
   1.207  EOT
   1.208  }
   1.209  
   1.210 @@ -246,11 +241,12 @@
   1.211  		install)
   1.212  			cat << EOT
   1.213  <div id="wrapper">
   1.214 -<h3>$(gettext "Install SliTaz")</h3>
   1.215 -<p>$(gettext "You're going to install SliTaz on a partition of your hard disk drive. If
   1.216 -	you decide to format your HDD, all data will be lost. If you do not 
   1.217 -	format, all data except for any existing /home directory will be removed, 
   1.218 -	the home directory will be kept as is.")<p>
   1.219 +<h3>$(gettext 'Install SliTaz')</h3>
   1.220 +
   1.221 +<p>$(gettext "You're going to install SliTaz on a partition of your hard disk \
   1.222 +drive. If you decide to format your HDD, all data will be lost. If you do not \
   1.223 +format, all data except for any existing /home directory will be removed, the \
   1.224 +home directory will be kept as is.")<p>
   1.225  </div>
   1.226  <input type="hidden" name="INST_ACTION" value="$1">
   1.227  EOT
   1.228 @@ -258,11 +254,12 @@
   1.229  		upgrade)
   1.230  			cat << EOT
   1.231  <div id="wrapper">
   1.232 -<h2>$(gettext "Upgrade SliTaz")</h2>
   1.233 -<p>$(gettext "You're going to upgrade an already installed SliTaz system on your hard disk
   1.234 -	drive. Your /home /etc /var/www directories will be kept, all other directories
   1.235 -	will be removed. Any additional packages added to your old Slitaz system
   1.236 -	will be updated as long you have an active internet connection.")<p>
   1.237 +<h2>$(gettext 'Upgrade SliTaz')</h2>
   1.238 +
   1.239 +<p>$(gettext "You're going to upgrade an already installed SliTaz system on \
   1.240 +your hard disk drive. Your /home /etc /var/www directories will be kept, all \
   1.241 +other directories will be removed. Any additional packages added to your old \
   1.242 +Slitaz system will be updated as long you have an active internet connection.")<p>
   1.243  </div>
   1.244  <input type="hidden" name="INST_ACTION" value="$1">
   1.245  EOT
   1.246 @@ -273,14 +270,14 @@
   1.247  select_source()
   1.248  {
   1.249  	cat <<EOT
   1.250 -<a name="source"></a>
   1.251 -<h4>$(gettext "Slitaz source media")</h4>
   1.252 +<h4 id="source">$(gettext 'Slitaz source media')</h4>
   1.253 +
   1.254  <div class="box">
   1.255  <input type="radio" name="INST_TYPE" value="cdrom" $([ "$INST_TYPE" == "cdrom" ] && echo "checked") id="cdrom" />
   1.256 -<label for="cdrom">$(gettext "LiveCD")</td></label>
   1.257 +<label for="cdrom">$(gettext 'LiveCD')</label>
   1.258  <br />
   1.259  <input type="radio" name="INST_TYPE" value="usb" $([ "$INST_TYPE" == "usb" ] && echo "checked") id="usb" />
   1.260 -<label for="usb">$(gettext "LiveUSB"):
   1.261 +<label for="usb">$(gettext 'LiveUSB:')
   1.262  <select name="SRC_USB">
   1.263  EOT
   1.264  	# List disks if plugged USB device
   1.265 @@ -291,7 +288,7 @@
   1.266  				DEV=$(basename $DEV)
   1.267  				if [ -d /sys/block/${DEV}/${DEV}1 ]; then
   1.268  					for i in $(fdisk -l /dev/$DEV | awk '/^\/dev/ {printf "%s ", $1}') ; do
   1.269 -						echo "<option value='$i' $([ "$i" == "$SRC_FILE" ] && echo "selected") >$i</option>"
   1.270 +						echo "<option value='$i' $([ "$i" == "$SRC_FILE" ] && echo 'selected') >$i</option>"
   1.271  						usb=$usb+1
   1.272  					done
   1.273  				fi
   1.274 @@ -299,22 +296,23 @@
   1.275  		done
   1.276  	fi
   1.277  	if [ $usb -lt 1 ]; then
   1.278 -		echo "<option value="">$(gettext "Not found")</option>"
   1.279 +		echo "<option value="">$(gettext 'Not found')</option>"
   1.280  	fi
   1.281  	cat << EOT
   1.282  </select>
   1.283  </label>
   1.284  <br />
   1.285  <input type="radio" name="INST_TYPE" value="iso" $([ "$INST_TYPE" == "iso" ] && echo "checked") id="iso" />
   1.286 -<label for="iso">$(gettext "ISO file"):</label>
   1.287 -<input type="url" size="50" name="SRC_ISO" $([ "$INST_TYPE" == "iso" ] && echo -e "value=\"$SRC_FILE\"") placeholder="$(gettext "Full path to the ISO image file")" />
   1.288 +<label for="iso">$(gettext 'ISO file:')</label>
   1.289 +<input type="url" size="50" name="SRC_ISO" $([ "$INST_TYPE" == "iso" ] && echo -e "value=\"$SRC_FILE\"") placeholder="$(gettext 'Full path to the ISO image file')" />
   1.290  <br />
   1.291  <input type="radio" name="INST_TYPE" value="web" $([ "$INST_TYPE" == "web" ] && echo "checked") id="web" />
   1.292 -<label for="web">$(gettext "Web"):
   1.293 -<a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl stable)'; return true;">$(gettext "Stable")</a>
   1.294 -<a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl cooking)'; return true;">$(gettext "Cooking")</a>
   1.295 -$(gettext "URL:")
   1.296 -<input id="url" type="url" size="55" name="SRC_WEB" $([ "$INST_TYPE" == "web" ] && echo -e "value=\"$SRC_FILE\"") placeholder="$(gettext "Full url to an ISO image file")" />
   1.297 +<label for="web">$(gettext 'Web:')
   1.298 +	<a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl stable)'; return true;">$(gettext 'Stable')</a>
   1.299 +	<a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl cooking)'; return true;">$(gettext 'Cooking')</a>
   1.300 +
   1.301 +	$(gettext 'URL:')
   1.302 +	<input id="url" type="url" size="55" name="SRC_WEB" $([ "$INST_TYPE" == "web" ] && echo -e "value=\"$SRC_FILE\"") placeholder="$(gettext 'Full url to an ISO image file')" />
   1.303  </label>
   1.304  </div>
   1.305  EOT
   1.306 @@ -323,8 +321,7 @@
   1.307  select_hdd()
   1.308  {
   1.309  cat <<EOT
   1.310 -	<a name="hdd"></a>
   1.311 -	<h4></span>$(gettext "Hard Disk Drive")</h4>
   1.312 +	<h4 id="hdd">$(gettext 'Hard Disk Drive')</h4>
   1.313  EOT
   1.314  }
   1.315  
   1.316 @@ -333,29 +330,29 @@
   1.317  	cat <<EOT
   1.318  <div class="box">
   1.319  <a name="partition"></a>
   1.320 -$(gettext "Install Slitaz to partition:")
   1.321 +$(gettext 'Install Slitaz to partition:')
   1.322  <select name="TGT_PARTITION">
   1.323  EOT
   1.324  	# List partitions
   1.325  	if fdisk -l | grep -q ^/dev/ ; then
   1.326 -		echo "<option value="">$(gettext "None")</option>"
   1.327 +		echo "<option value="">$(gettext 'None')</option>"
   1.328  		for i in $(fdisk -l | awk '/^\/dev/ {printf "%s " $1}'); do
   1.329 -			echo "<option value='$i' $([ "$i" == "$TGT_PARTITION" ] && echo "selected")>$i</option>"
   1.330 +			echo "<option value='$i' $([ "$i" == "$TGT_PARTITION" ] && echo 'selected')>$i</option>"
   1.331  		done
   1.332  	else
   1.333 -		echo "<option value="">$(gettext "Not found")</option>"
   1.334 +		echo "<option value="">$(gettext 'Not found')</option>"
   1.335  	fi
   1.336  	cat << EOT
   1.337  </select>
   1.338  <br />
   1.339  <input type="checkbox" name="MAIN_FMT" value="yes" $([ -n "$TGT_FS" ] && echo "checked") id="mainfs" />
   1.340 -<label for="mainfs">$(gettext "Format partition as"):</label>
   1.341 +<label for="mainfs">$(gettext 'Format partition as:')</label>
   1.342  <select name="MAIN_FS">
   1.343  EOT
   1.344  	scan_mkfs
   1.345  	for i in $FS
   1.346  	do
   1.347 -		echo  "<option value='$i' $([ "$i" == "$TGT_FS" ] && echo "selected")>$i</option>"
   1.348 +		echo "<option value='$i' $([ "$i" == "$TGT_FS" ] && echo 'selected')>$i</option>"
   1.349  	done
   1.350  	cat <<EOT
   1.351  </select>
   1.352 @@ -368,17 +365,17 @@
   1.353  	cat <<EOT
   1.354  <div class="box">
   1.355  <a name="partition"></a>
   1.356 -$(gettext "Existing SliTaz partition to upgrade:")
   1.357 +$(gettext 'Existing SliTaz partition to upgrade:')
   1.358  <select name="TGT_PARTITION">
   1.359  EOT
   1.360  	# List partitions
   1.361  	if fdisk -l | grep -q ^/dev/ ; then
   1.362 -		echo "<option value="">$(gettext "None")</option>"
   1.363 -		for i in `blkid | cut -d ":" -f 1`; do
   1.364 -			echo "<option value='$i' $([ "$i" == "$TGT_PARTITION" ] && echo "selected")>$i</option>"
   1.365 +		echo "<option value="">$(gettext 'None')</option>"
   1.366 +		for i in $(blkid | cut -d ":" -f 1); do
   1.367 +			echo "<option value='$i' $([ "$i" == "$TGT_PARTITION" ] && echo 'selected')>$i</option>"
   1.368  		done
   1.369  	else
   1.370 -		echo "<option value="">$(gettext "Not found")</option>"
   1.371 +		echo "<option value="">$(gettext 'Not found')</option>"
   1.372  	fi
   1.373  	cat <<EOT
   1.374  </select>
   1.375 @@ -389,8 +386,7 @@
   1.376  select_options()
   1.377  {
   1.378  	cat <<EOT
   1.379 -<a name="options"></a>
   1.380 -<h4></span>$(gettext "Options")</h4>
   1.381 +<h4 id="options">$(gettext 'Options')</h4>
   1.382  EOT
   1.383  }
   1.384  
   1.385 @@ -398,31 +394,31 @@
   1.386  {
   1.387  	cat <<EOT
   1.388  <div>
   1.389 -<a name="home"></a>
   1.390 -<h5>$(gettext "home partition")</h5>
   1.391 +<h5 id="home">$(gettext 'home partition')</h5>
   1.392 +
   1.393  <input type="checkbox" name="HOME_SELECT" value="yes" $([ -n "$TGT_HOME" ] && echo "checked") id="homepart" />
   1.394 -<label for="homepart">$(gettext "Use a separate partition for /home:")</label>
   1.395 +<label for="homepart">$(gettext 'Use a separate partition for /home:')</label>
   1.396  <select name="TGT_HOME">
   1.397  EOT
   1.398  	# List disk if plugged USB device
   1.399  	if fdisk -l | grep -q ^/dev/ ; then
   1.400 -		echo "<option value="">$(gettext "None")</option>"
   1.401 +		echo "<option value="">$(gettext 'None')</option>"
   1.402  		for i in $(fdisk -l | awk '/^\/dev/ {printf "%s " $1}'); do
   1.403 -			echo "<option value='$i' $([ "$i" == "$TGT_HOME" ] && echo "selected")>$i</option>"
   1.404 +			echo "<option value='$i' $([ "$i" == "$TGT_HOME" ] && echo 'selected')>$i</option>"
   1.405  		done
   1.406  	else
   1.407 -		echo "<option value="">$(gettext "Not found")</option>"
   1.408 +		echo "<option value="">$(gettext 'Not found')</option>"
   1.409  	fi
   1.410  cat <<EOT
   1.411  </select>
   1.412 -	
   1.413 +
   1.414  <input type="checkbox" name="HOME_FMT" value="yes" $([ -n "$TGT_HOME_FS" ] && echo "checked") id="homefs" />
   1.415 -<label for="homefs">$(gettext "Format partition as:")</label>
   1.416 +<label for="homefs">$(gettext 'Format partition as:')</label>
   1.417  <select name="HOME_FS">"
   1.418  EOT
   1.419  	for i in $FS
   1.420  	do
   1.421 -		echo  "<option value='$i' $([ "$i" == "$TGT_HOME_FS" ] && echo "selected")>$i</option>"
   1.422 +		echo  "<option value='$i' $([ "$i" == "$TGT_HOME_FS" ] && echo 'selected')>$i</option>"
   1.423  	done
   1.424  	cat <<EOT
   1.425  </select>
   1.426 @@ -434,11 +430,11 @@
   1.427  {
   1.428  cat << EOT
   1.429  <div>
   1.430 -<a name="hostname"></a>
   1.431 -<h5>$(gettext "Hostname")</h5>
   1.432 -$(gettext "Set Hostname to:")
   1.433 -<input type="text" id="hostname" name="TGT_HOSTNAME" value="$TGT_HOSTNAME" placeholder="$(gettext "Name of your system")" onkeyup="checkLogin('hostname','msgHostname'); return false;" />
   1.434 -<span id="msgHostname"></span>
   1.435 +	<h5 id="hostname">$(gettext 'Hostname')</h5>
   1.436 +
   1.437 +	$(gettext 'Set Hostname to:')
   1.438 +	<input type="text" id="hostname" name="TGT_HOSTNAME" value="$TGT_HOSTNAME" placeholder="$(gettext 'Name of your system')" onkeyup="checkLogin('hostname','msgHostname'); return false;" />
   1.439 +	<span id="msgHostname"></span>
   1.440  </div>
   1.441  EOT
   1.442  }
   1.443 @@ -447,13 +443,15 @@
   1.444  {
   1.445  cat << EOT
   1.446  <div class="box2">
   1.447 -<a name="root"></a>
   1.448 -<h5>$(gettext "Root")</h5>
   1.449 -$(gettext "Root passwd:")
   1.450 -<input type="password" id="rootPwd1" name="TGT_ROOT_PWD" value="$TGT_ROOT_PWD" placeholder="$(gettext "Password of root")" onkeyup="checkPwd('rootPwd1','rootPwd2','msgRootPwd'); return false;" />
   1.451 -$(gettext "Confirm password:")
   1.452 -<input type="password" id="rootPwd2" value="$TGT_ROOT_PWD" placeholder="$(gettext "Password of root")" onkeyup="checkPwd('rootPwd1','rootPwd2','msgRootPwd'); return false;" />
   1.453 -<span id="msgRootPwd"></span>
   1.454 +	<h5 id="root">$(gettext 'Root')</h5>
   1.455 +
   1.456 +	$(gettext 'Root passwd:')
   1.457 +	<input type="password" id="rootPwd1" name="TGT_ROOT_PWD" value="$TGT_ROOT_PWD" placeholder="$(gettext 'Password of root')" onkeyup="checkPwd('rootPwd1','rootPwd2','msgRootPwd'); return false;" />
   1.458 +
   1.459 +	$(gettext 'Confirm password:')
   1.460 +	<input type="password" id="rootPwd2" value="$TGT_ROOT_PWD" placeholder="$(gettext 'Password of root')" onkeyup="checkPwd('rootPwd1','rootPwd2','msgRootPwd'); return false;" />
   1.461 +
   1.462 +	<span id="msgRootPwd"></span>
   1.463  </div>
   1.464  EOT
   1.465  }
   1.466 @@ -462,17 +460,19 @@
   1.467  {
   1.468  cat << EOT
   1.469  <div class="box2">
   1.470 -<a name="user"></a>
   1.471 -<h5>$(gettext "User")</h5>
   1.472 -$(gettext "User login:")
   1.473 -<input type="text" id="user" name="TGT_USER" value="$TGT_USER" placeholder="$(gettext "Name of the first user")" onkeyup="checkLogin('user','msgUser'); return false;" />
   1.474 -<span id="msgUser"></span>
   1.475 -<br /><br />
   1.476 -$(gettext "User passwd:")
   1.477 -<input type="password" id="userPwd1" name="TGT_USER_PWD" value="$TGT_USER_PWD" placeholder="$(gettext "Password of the first user")" onkeyup="checkPwd('userPwd1','userPwd2','msgUserPwd'); return false;" />
   1.478 -$(gettext "Confirm password:")
   1.479 -<input class="confirm" type="password" id="userPwd2" value="$TGT_USER_PWD" placeholder="$(gettext "Password of the first user")" onkeyup="checkPwd('userPwd1','userPwd2','msgUserPwd'); return false;" />
   1.480 -<span id="msgUserPwd"></span>
   1.481 +	<h5 id="user">$(gettext 'User')</h5>
   1.482 +
   1.483 +	$(gettext 'User login:')
   1.484 +	<input type="text" id="user" name="TGT_USER" value="$TGT_USER" placeholder="$(gettext 'Name of the first user')" onkeyup="checkLogin('user','msgUser'); return false;" />
   1.485 +	<span id="msgUser"></span>
   1.486 +	<br /><br />
   1.487 +
   1.488 +	$(gettext 'User passwd:')
   1.489 +	<input type="password" id="userPwd1" name="TGT_USER_PWD" value="$TGT_USER_PWD" placeholder="$(gettext 'Password of the first user')" onkeyup="checkPwd('userPwd1','userPwd2','msgUserPwd'); return false;" />
   1.490 +
   1.491 +	$(gettext 'Confirm password:')
   1.492 +	<input class="confirm" type="password" id="userPwd2" value="$TGT_USER_PWD" placeholder="$(gettext 'Password of the first user')" onkeyup="checkPwd('userPwd1','userPwd2','msgUserPwd'); return false;" />
   1.493 +	<span id="msgUserPwd"></span>
   1.494  </div>
   1.495  EOT
   1.496  }
   1.497 @@ -481,12 +481,13 @@
   1.498  {
   1.499  cat << EOT
   1.500  <div>
   1.501 -<a name="grub"></a>
   1.502 -<h5>$(gettext "Grub")</h5>
   1.503 -<input type="checkbox" name="TGT_GRUB" value="yes" $([ "$TGT_GRUB" == "yes" ] && echo "checked") id="grub" />
   1.504 -<label for="grub">$(gettext "Install Grub bootloader. Usually you should answer yes, unless you want to install grub by hand yourself.")<br /></label>
   1.505 -<input type="checkbox" name="TGT_WINBOOT" value="auto" $([ -n "$TGT_WINBOOT" ] && echo "checked") id="dualboot" />
   1.506 -<label for="dualboot">$(gettext "Enable Windows Dual-Boot.")</label>
   1.507 +	<h5 id="grub">$(gettext 'Grub')</h5>
   1.508 +
   1.509 +	<input type="checkbox" name="TGT_GRUB" value="yes" $([ "$TGT_GRUB" == "yes" ] && echo "checked") id="grub" />
   1.510 +	<label for="grub">$(gettext "Install Grub bootloader. Usually you should \
   1.511 +answer yes, unless you want to install grub by hand yourself.")<br /></label>
   1.512 +	<input type="checkbox" name="TGT_WINBOOT" value="auto" $([ -n "$TGT_WINBOOT" ] && echo "checked") id="dualboot" />
   1.513 +	<label for="dualboot">$(gettext 'Enable Windows Dual-Boot.')</label>
   1.514  </div>
   1.515  EOT
   1.516  }
   1.517 @@ -495,21 +496,21 @@
   1.518  {
   1.519  	case $1 in
   1.520  		partitioning)
   1.521 -			title1=$(gettext "Back to partitioning") ;;
   1.522 +			title1=$(gettext 'Back to partitioning') ;;
   1.523  		*)
   1.524  			page=home
   1.525 -			title1=$(gettext "Back to Installer Start Page") ;;
   1.526 +			title1=$(gettext 'Back to Installer Start Page') ;;
   1.527  	esac
   1.528  	case $2 in
   1.529  		write|run)
   1.530 -			title2=$(gettext "Proceed to SliTaz installation") ;;
   1.531 +			title2=$(gettext 'Proceed to SliTaz installation') ;;
   1.532  		reboot)
   1.533 -			title2=$(gettext "Installation complete. You can now restart (reboot)") ;;
   1.534 +			title2=$(gettext 'Installation complete. You can now restart (reboot)') ;;
   1.535  		failed)
   1.536 -			title2=$(gettext "Installation failed. See log") ;;
   1.537 +			title2=$(gettext 'Installation failed. See log') ;;
   1.538  		*)
   1.539  			page=home
   1.540 -			title2=$(gettext "Back to Installer Start Page") ;;
   1.541 +			title2=$(gettext 'Back to Installer Start Page') ;;
   1.542  	esac
   1.543  	cat <<EOT
   1.544  <hr />
   1.545 @@ -522,16 +523,19 @@
   1.546  page_redirection()
   1.547  {
   1.548  	cat <<EOT
   1.549 +<!DOCTYPE html>
   1.550  <html>
   1.551  <head>
   1.552 -<title>$(gettext "A web page that points a browser to a different page after 2 seconds")</title>
   1.553 +<meta charset="utf-8">
   1.554 +<title>$(gettext "A web page that points a browser to a different page after \
   1.555 +2 seconds")</title>
   1.556  <meta http-equiv="refresh" content="0; URL=$SCRIPT_NAME?page=$1">
   1.557  <meta name="keywords" content="automatic redirection">
   1.558  </head>
   1.559  <body>
   1.560 -$(gettext "If your browser doesn't automatically redirect within a few seconds, 
   1.561 -you may want to go there manually")
   1.562 -<a href="$SCRIPT_NAME?page=$1">$1</a> 
   1.563 +<p>$(gettext "If your browser doesn't automatically redirect within a few \
   1.564 +seconds, you may want to go there manually")</p>
   1.565 +<p><a href="$SCRIPT_NAME?page=$1">$1</a></p>
   1.566  </body>
   1.567  </html>
   1.568  EOT
   1.569 @@ -539,15 +543,17 @@
   1.570  
   1.571  check_ressources()
   1.572  {
   1.573 -	local code 
   1.574 +	local code
   1.575  	code=0
   1.576  	# Check tazinst
   1.577  	if ! [ -x /usr/sbin/tazinst ] ; then
   1.578  		cat <<EOT
   1.579 -<h3>$(gettext "Tazinst Error")</h3>
   1.580 -<p><strong>tazinst</strong>, $(gettext "the lightweight SliTaz HDD installer
   1.581 +<h3>$(gettext 'Tazinst Error')</h3>
   1.582 +<p>$(gettext "<strong>tazinst</strong>, the lightweight SliTaz HDD installer \
   1.583  is missing. Any installation can not be done without tazinst.")</p>
   1.584 -<p>$(gettext "Check tazinst' permissions, or reinstall the slitaz-tools package:")</p>
   1.585 +
   1.586 +<p>$(gettext "Check tazinst' permissions, or reinstall the slitaz-tools \
   1.587 +package:")</p>
   1.588  <code># tazpkg get-install slitaz-tools --forced</code>
   1.589  EOT
   1.590  		code=1
   1.591 @@ -557,9 +563,10 @@
   1.592  		r=$TAZINST_REQUIRED_VERSION
   1.593  		if ! (echo "$v" | awk -v r=$r '{v=$v+0}{ if (v < r) exit 1}') ; then
   1.594  			cat <<EOT
   1.595 -<h3>$(gettext "Tazinst Error")</h3>
   1.596 -<p><strong>tazinst</strong> ($v) $(gettext "is not at the required version ($r),
   1.597 -use tazinst in a xterm or reinstall the slitaz-tools package:")</p>
   1.598 +<h3>$(gettext 'Tazinst Error')</h3>
   1.599 +
   1.600 +<p>$(eval_gettext "<strong>tazinst</strong> ($v) is not at the required \
   1.601 +version ($r), use tazinst in a xterm or reinstall the slitaz-tools package:")</p>
   1.602  <code># tazpkg get-install slitaz-tools --forced</code>
   1.603  EOT
   1.604  			code=1
   1.605 @@ -570,21 +577,21 @@
   1.606  
   1.607  run_tazinst()
   1.608  {
   1.609 -	echo "<h4>$(gettext "Proceeding: ()")</h4>"
   1.610 -	gettext "Please wait until processing is complete"
   1.611 +	cat << EOT
   1.612 +<h4>$(gettext 'Proceeding: ()')</h4>
   1.613 +<p>$(gettext 'Please wait until processing is complete')</p>
   1.614 +EOT
   1.615  	table_start
   1.616  	tazinst $(GET INST_ACTION) $INSTFILE | \
   1.617  		awk '{print "<tr><td><tt>" $0 "</tt></td></tr>"}'
   1.618  	table_end
   1.619 -	gettext "Completed."
   1.620 +	echo "<p>$(gettext 'Completed.')</p>"
   1.621  	return $(grep -c "cancelled on error" $INSTFILE)
   1.622  }
   1.623  
   1.624  tazinst_log()
   1.625  {
   1.626 -	echo "<pre>"
   1.627 -	tazinst log
   1.628 -	echo "</pre>"
   1.629 +	echo "<pre>$(tazinst log)</pre>"
   1.630  }
   1.631  
   1.632  scan_mkfs()
   1.633 @@ -612,22 +619,22 @@
   1.634  		if (page == "install") {
   1.635  			// hostname
   1.636  			if (false == checkLogin('hostname','msgHostname')) {
   1.637 -				alert("Hostname error");
   1.638 +				alert("$(gettext 'Hostname error')");
   1.639  				return false;
   1.640  			// root pwd
   1.641  			} else if (false == checkPwd('rootPwd1','rootPwd2','msgRootPwd')) {
   1.642 -				alert("Root password error");
   1.643 +				alert("$(gettext 'Root password error')");
   1.644  				return false;
   1.645  			// user
   1.646  			} else if (false == checkLogin('user','msgUser')) {
   1.647 -				alert("User login error");
   1.648 +				alert("$(gettext 'User login error')");
   1.649  				return false;
   1.650  			// user pwd
   1.651  			} else if (false == checkPwd('userPwd1','userPwd2','msgUserPwd')) {
   1.652 -				alert("User password error");
   1.653 +				alert("$(gettext 'User password error')");
   1.654  				return false;
   1.655  			} else {
   1.656 -				var r=confirm("$(gettext "Do you really want to continue?")");
   1.657 +				var r=confirm("$(gettext 'Do you really want to continue?')");
   1.658  				if (r==true)
   1.659  				{
   1.660  					document.ConfigForm.submit();
   1.661 @@ -638,7 +645,7 @@
   1.662  		} else if (page == "write") {
   1.663  			return true;
   1.664  		} else {
   1.665 -			var r=confirm("$(gettext "Do you really want to continue?")");
   1.666 +			var r=confirm("$(gettext 'Do you really want to continue?')");
   1.667  			if (r==true)
   1.668  			{
   1.669  				document.ConfigForm.submit();