tazinst rev 50
installer.cgi: enhance install wizard appearance to comply with current TazPanel style, so decode some pseudo-code into the plain html.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Apr 07 03:30:19 2015 +0300 (2015-04-07) |
parents | 6a623c8ee24c |
children | a6cb7280e39a |
files | installer.cgi po/installer/el.po po/installer/es.po po/installer/fr.po po/installer/installer.pot po/installer/pt_BR.po po/installer/ru.po po/installer/sv.po po/installer/zh_CN.po |
line diff
1.1 --- a/installer.cgi Mon Mar 30 23:32:45 2015 +0300 1.2 +++ b/installer.cgi Tue Apr 07 03:30:19 2015 +0300 1.3 @@ -30,9 +30,11 @@ 1.4 # tazinst setup file 1.5 INSTFILE=/root/tazinst.conf 1.6 1.7 + 1.8 #------ 1.9 # menu 1.10 #------ 1.11 + 1.12 case "$1" in 1.13 menu) 1.14 [ "$REMOTE_USER" == "root" ] && cat << EOT 1.15 @@ -51,110 +53,147 @@ 1.16 exit 1.17 esac 1.18 1.19 + 1.20 #----------- 1.21 # home page 1.22 #----------- 1.23 1.24 -select_action() 1.25 -{ 1.26 - comment "Welcome message" 1.27 - open_div 'id="wrapper"' 1.28 - h4 "$(gettext "Welcome to the Slitaz Installer!")" 1.29 - p "$(gettext "The SliTaz Installer installs or upgrades SliTaz to a \ 1.30 +select_action() { 1.31 + cat <<EOT 1.32 +<!-- Welcome message --> 1.33 + 1.34 +<h2>$(gettext "Welcome to the Slitaz Installer!")</h2> 1.35 + 1.36 +<p>$(gettext "The SliTaz Installer installs or upgrades SliTaz to a \ 1.37 hard disk drive from a device like a Live-CD or LiveUSB key, from a SliTaz \ 1.38 -ISO file, or from the web by downloading an ISO file.")" 1.39 - h5 "$(gettext "Which type of installation do you want to start?")" 1.40 - close_div 1.41 +ISO file, or from the web by downloading an ISO file.")</p> 1.42 + 1.43 +<p>$(gettext "Which type of installation do you want to start?")</p> 1.44 +EOT 1.45 } 1.46 1.47 -select_install() 1.48 -{ 1.49 - comment "Install message" 1.50 - open_div 'class="box"' 1.51 - h4 "$(gettext 'Install')" 1.52 - p "$(gettext "Install SliTaz on a partition of your hard disk drive. If \ 1.53 + 1.54 +select_install() { 1.55 + cat <<EOT 1.56 +<!-- Install message --> 1.57 + 1.58 +<section> 1.59 + <header>$(gettext 'Install')</header> 1.60 + 1.61 + <div> 1.62 + <p>$(gettext "Install SliTaz on a partition of your hard disk drive. If \ 1.63 you decide to format your partition, all data will be lost. If you do not \ 1.64 format, all data except for any existing /home directory will be removed \ 1.65 -(the home directory will be kept as is).")" 1.66 - p "$(gettext "Before installation, you may need to create or resize \ 1.67 +(the home directory will be kept as is).")</p> 1.68 + <p>$(gettext "Before installation, you may need to create or resize \ 1.69 partitions on your hard disk drive in order to make space for SliTaz \ 1.70 -GNU/Linux. You can graphically manage your partitions with Gparted")" 1.71 - close_div 1.72 - button "install" \ 1.73 - "$(gettext 'Install SliTaz')" \ 1.74 - "$(gettext 'Proceed to a new SliTaz installation')" 1.75 +GNU/Linux. You can graphically manage your partitions with Gparted")</p> 1.76 + </div> 1.77 + 1.78 + <footer> 1.79 + <form> 1.80 + <button name="page" value="install" data-icon="slitaz" 1.81 + title="$(gettext 'Proceed to a new SliTaz installation')" 1.82 + >$(gettext 'Install SliTaz')</button> 1.83 + </form> 1.84 + </footer> 1.85 +</section> 1.86 +EOT 1.87 } 1.88 1.89 -select_upgrade() 1.90 -{ 1.91 - comment "Upgrade message" 1.92 - open_div 'class="box"' 1.93 - h4 "$(gettext 'Upgrade')" 1.94 - p "$(gettext "Upgrade an already installed SliTaz system on your hard disk \ 1.95 + 1.96 +select_upgrade() { 1.97 + cat <<EOT 1.98 +<!-- Upgrade message --> 1.99 + 1.100 +<section> 1.101 + <header>$(gettext 'Upgrade')</header> 1.102 + 1.103 + <div> 1.104 + <p>$(gettext "Upgrade an already installed SliTaz system on your hard disk \ 1.105 drive. Your /home /etc /var/www directories will be kept, all other \ 1.106 directories will be removed. Any additional packages added to your old \ 1.107 -Slitaz system will be updated as long you have an active internet connection.")" 1.108 - close_div 1.109 - button "upgrade" \ 1.110 - "$(gettext 'Upgrade SliTaz')" \ 1.111 - "$(gettext 'Upgrade an existing SliTaz system')" 1.112 +Slitaz system will be updated as long you have an active internet connection.")</p> 1.113 + </div> 1.114 + 1.115 + <footer> 1.116 + <form> 1.117 + <button name="page" value="upgrade" data-icon="upgrade" 1.118 + title="$(gettext 'Upgrade an existing SliTaz system')" 1.119 + >$(gettext 'Upgrade SliTaz')</button> 1.120 + </form> 1.121 + </footer> 1.122 +</section> 1.123 +EOT 1.124 } 1.125 1.126 + 1.127 #-------------------- 1.128 # partitioning page 1.129 #-------------------- 1.130 1.131 -exec_gparted() 1.132 -{ 1.133 +exec_gparted() { 1.134 /bin/su - -c \ 1.135 "exec env DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' /usr/sbin/gparted" 1.136 } 1.137 1.138 -select_gparted() 1.139 -{ 1.140 - comment "GParted message" 1.141 - h5 "$(gettext "Partitioning")" 1.142 - open_div 'class="box"' 1.143 - p "$(gettext "On most used systems, the hard drive is already dedicated to \ 1.144 -partitions for Windows<sup>™</sup>, or Linux, or another operating \ 1.145 + 1.146 +select_gparted() { 1.147 + cat <<EOT 1.148 +<!-- GParted message --> 1.149 + 1.150 +<section> 1.151 + <header>$(gettext "Partitioning")</header> 1.152 + 1.153 + <div> 1.154 + <p>$(gettext "On most used systems, the hard drive is already dedicated to \ 1.155 +partitions for Windows™, or Linux, or another operating \ 1.156 system. You'll need to resize these partitions in order to make space for \ 1.157 SliTaz GNU/Linux. SliTaz will co-exist with other operating systems already \ 1.158 -installed on your hard drive.")" 1.159 - p "$(gettext "The amount of space needed depends on how much software you \ 1.160 +installed on your hard drive.")</p> 1.161 + <p>$(gettext "The amount of space needed depends on how much software you \ 1.162 plan to install and how much space you require for users. It's conceivable \ 1.163 that you could run a minimal SliTaz system in 300 megs or less, but 2 gigs \ 1.164 -is indeed more comfy.")" 1.165 - p "$(gettext "A separate home partition and a partition that will be used \ 1.166 +is indeed more comfy.")</p> 1.167 + <p>$(gettext "A separate home partition and a partition that will be used \ 1.168 as Linux swap space may be created if needed. Slitaz detects and uses swap \ 1.169 -partitions automatically.")" 1.170 - close_div 1.171 - open_div 'class="box"' 1.172 - p "$(gettext "You can graphically manage your partitions with GParted. \ 1.173 +partitions automatically.")</p> 1.174 + <hr/> 1.175 + <p>$(gettext "You can graphically manage your partitions with GParted. \ 1.176 GParted is a partition editor for graphically managing your disk partitions. \ 1.177 GParted allows you to create, destroy, resize and copy partitions without \ 1.178 -data loss.")" 1.179 - p "$(gettext "GParted supports ext2, ext3, ext4, linux swap, ntfs and \ 1.180 +data loss.")</p> 1.181 + <p>$(gettext "GParted supports ext2, ext3, ext4, linux swap, ntfs and \ 1.182 fat32 filesystems right out of the box. Support for xjs, jfs, hfs and other \ 1.183 filesystems is available as well but you first need to add drivers for these \ 1.184 filesystems by installing the related packages xfsprogs, jfsutils, linux-hfs \ 1.185 -and so on.")" 1.186 - close_div 1.187 - comment "Launch GParted" 1.188 - button "gparted" \ 1.189 - "$(gettext 'Execute GParted')" \ 1.190 - "$(gettext 'Launch GParted, the partition editor tool')" 1.191 - h5 "$(gettext "Continue installation")" 1.192 - p "$(gettext "Once you've made room for SliTaz on your drive, you should \ 1.193 -be able to continue installation.")" 1.194 +and so on.")</p> 1.195 + </div> 1.196 + 1.197 + <footer> 1.198 + <!-- Launch GParted --> 1.199 + <form> 1.200 + <button name="page" value="gparted" data-icon="hdd" 1.201 + title="$(gettext 'Launch GParted, the partition editor tool')" 1.202 + >$(gettext 'Execute GParted')</button> 1.203 + </form> 1.204 + </footer> 1.205 +</section> 1.206 + 1.207 + 1.208 +<h5>$(gettext "Continue installation")</h5> 1.209 + 1.210 +<p>$(gettext "Once you've made room for SliTaz on your drive, you should \ 1.211 +be able to continue installation.")</p> 1.212 +EOT 1.213 } 1.214 1.215 + 1.216 #------------ 1.217 # input page 1.218 #------------ 1.219 1.220 - 1.221 -select_source() 1.222 -{ 1.223 +select_source() { 1.224 local media="$(/usr/sbin/tazinst get media "$INSTFILE")" 1.225 local source="$(/usr/sbin/tazinst get source "$INSTFILE")" 1.226 local list_media="$(/usr/sbin/tazinst list media)" 1.227 @@ -283,16 +322,16 @@ 1.228 "ROOT_FORMAT" 1.229 } 1.230 1.231 -select_options() 1.232 -{ 1.233 - printf '<h4 id="options">%s</h4>' "$(gettext 'Options')" 1.234 -} 1.235 +select_home_uuid() { 1.236 + local home_uuid="$(/usr/sbin/tazinst get home_uuid "$INSTFILE")" 1.237 1.238 -select_home_uuid() 1.239 -{ 1.240 - local home_uuid="$(/usr/sbin/tazinst get home_uuid "$INSTFILE")" 1.241 - comment "home_uuid selection" 1.242 - h5 "$(gettext "home partition")" 1.243 + cat <<EOT 1.244 +<!-- home_uuid selection --> 1.245 + 1.246 +<fieldset> 1.247 + <legend>$(gettext "home partition")</legend> 1.248 + 1.249 + $( 1.250 label "home_uuid" \ 1.251 "$(gettext 'Separate partition for /home:')" \ 1.252 "$(gettext 'Specify the partition containing /home')" 1.253 @@ -300,23 +339,34 @@ 1.254 "$home_uuid" \ 1.255 "HOME_UUID" \ 1.256 0 1.257 - br 1.258 + ) 1.259 + <br/> 1.260 +EOT 1.261 } 1.262 1.263 select_home_format() 1.264 { 1.265 local home_format="$(/usr/sbin/tazinst get home_format "$INSTFILE")" 1.266 + 1.267 comment "home_format selection" 1.268 format "$(/usr/sbin/tazinst list format "$INSTFILE")" \ 1.269 "$home_format" \ 1.270 "HOME_FORMAT" 1.271 + cat <<EOT 1.272 +</fieldset> 1.273 +EOT 1.274 } 1.275 1.276 -select_hostname() 1.277 -{ 1.278 + 1.279 +select_hostname() { 1.280 local hostname="$(/usr/sbin/tazinst get hostname "$INSTFILE")" error 1.281 - comment "hostname selection" 1.282 - h5 "$(gettext "Hostname")" 1.283 + 1.284 + cat <<EOT 1.285 +<!-- hostname selection --> 1.286 + 1.287 +<fieldset> 1.288 + <legend>$(gettext "Hostname")</legend> 1.289 + $( 1.290 label "hostname" \ 1.291 "$(gettext 'Set Hostname to:')" \ 1.292 "$(gettext 'Hostname configuration allows you to specify the machine name')" 1.293 @@ -329,13 +379,21 @@ 1.294 error_msg "$error" \ 1.295 "hostname" \ 1.296 2 1.297 + ) 1.298 +</fieldset> 1.299 +EOT 1.300 } 1.301 1.302 -select_root_pwd() 1.303 -{ 1.304 + 1.305 +select_root_pwd() { 1.306 local root_pwd="$(/usr/sbin/tazinst get root_pwd "$INSTFILE")" error 1.307 - comment "root_pwd selection" 1.308 - h5 "$(gettext "Root superuser")" 1.309 + 1.310 + cat <<EOT 1.311 +<!-- root_pwd selection --> 1.312 + 1.313 +<fieldset> 1.314 + <legend>$(gettext "Root superuser")</legend> 1.315 + $( 1.316 label "root_pwd" \ 1.317 "$(gettext 'Root passwd:')" \ 1.318 "$(gettext 'Enter the password for root')" 1.319 @@ -347,13 +405,21 @@ 1.320 "$(gettext 'Password of root')" 1.321 error_msg "$error" \ 1.322 "root_pwd" 1.323 + ) 1.324 +</fieldset> 1.325 +EOT 1.326 } 1.327 1.328 -select_user_login() 1.329 -{ 1.330 + 1.331 +select_user_login() { 1.332 local user_login="$(/usr/sbin/tazinst get user_login "$INSTFILE")" error 1.333 - comment "user_login selection" 1.334 - h5 "$(gettext "User")" 1.335 + 1.336 + cat <<EOT 1.337 +<!-- user_login selection --> 1.338 + 1.339 +<fieldset> 1.340 + <legend>$(gettext "User")</legend> 1.341 + $( 1.342 label "user_login" \ 1.343 "$(gettext 'User login:')" \ 1.344 "$(gettext 'Enter the name of the first user')" 1.345 @@ -366,12 +432,16 @@ 1.346 error_msg "$error" \ 1.347 "user_login" \ 1.348 2 1.349 - br 1.350 + ) 1.351 + <br/> 1.352 +EOT 1.353 } 1.354 1.355 + 1.356 select_user_pwd() 1.357 { 1.358 local user_pwd="$(/usr/sbin/tazinst get user_pwd "$INSTFILE")" error 1.359 + 1.360 label "user_pwd" \ 1.361 "$(gettext 'User passwd:')" \ 1.362 "$(gettext 'The password for default user')" 1.363 @@ -383,13 +453,23 @@ 1.364 "$(gettext 'Password of the first user')" 1.365 error_msg "$error" \ 1.366 "user_pwd" 1.367 + cat <<EOT 1.368 +</fieldset> 1.369 +EOT 1.370 } 1.371 1.372 + 1.373 select_bootloader() 1.374 { 1.375 local bootloader="$(/usr/sbin/tazinst get bootloader "$INSTFILE")" error 1.376 - comment "bootloader selection" 1.377 - h5 "$(gettext "Bootloader")" 1.378 + 1.379 + cat <<EOT 1.380 +<!-- bootloader selection --> 1.381 + 1.382 +<fieldset> 1.383 + <legend>$(gettext "Bootloader")</legend> 1.384 + 1.385 + $( 1.386 input "checkbox" \ 1.387 "bootloader" \ 1.388 "auto" \ 1.389 @@ -401,12 +481,16 @@ 1.390 error="$?" 1.391 error_msg "$error" \ 1.392 "bootloader" 1.393 - br 1.394 + ) 1.395 + <br/> 1.396 +EOT 1.397 } 1.398 1.399 + 1.400 select_winboot() 1.401 { 1.402 local winboot="$(/usr/sbin/tazinst get winboot "$INSTFILE")" error 1.403 + 1.404 comment "winboot selection" 1.405 input "checkbox" \ 1.406 "winboot" \ 1.407 @@ -415,12 +499,16 @@ 1.408 label "winboot" \ 1.409 "$(gettext 'Enable Windows Dual-Boot.')" \ 1.410 "$(gettext "At start-up, you will be asked whether you want to boot \ 1.411 -into Windows™ or SliTaz GNU/Linux.")" 1.412 +into Windows™ or SliTaz GNU/Linux.")" 1.413 error="$?" 1.414 error_msg "$error" \ 1.415 "winboot" 1.416 + cat <<EOT 1.417 +</fieldset> 1.418 +EOT 1.419 } 1.420 1.421 + 1.422 errors_msg() 1.423 { 1.424 if [ "$CHECK" ]; then 1.425 @@ -430,40 +518,53 @@ 1.426 fi 1.427 } 1.428 1.429 -select_settings() 1.430 -{ 1.431 + 1.432 +select_settings() { 1.433 local settings="$(/usr/sbin/tazinst get settings "$INSTFILE")" 1.434 CHECK=$(GET CHECK) 1.435 errors_msg 1.436 - h4 "$(gettext "Select source media:")" 1.437 - open_div 'class="box"' 1.438 - open_div 'class="media"' 1.439 - select_source 1.440 - close_div 1.441 - close_div 1.442 - h4 "$(gettext "Select destination")" 1.443 - open_div 'class="box"' 1.444 - select_root_uuid 1.445 - printf '%s' "$settings" | grep -q "root_format" \ 1.446 - && select_root_format 1.447 - close_div 1.448 - select_options 1.449 - open_div 'class="options"' 1.450 + 1.451 + cat<<EOT 1.452 +<fieldset> 1.453 + <legend>$(gettext "Select source media:")</legend> 1.454 + 1.455 + <div class="media">$(select_source)</div> 1.456 +</fieldset> 1.457 + 1.458 + 1.459 +<fieldset> 1.460 + <legend>$(gettext "Select destination")</legend> 1.461 + 1.462 + <div>$( 1.463 + select_root_uuid 1.464 + printf '%s' "$settings" | grep -q "root_format" && select_root_format 1.465 + )</div> 1.466 +</fieldset> 1.467 + 1.468 + 1.469 +<fieldset id="options"> 1.470 + <legend>$(gettext 'Options')</legend> 1.471 + 1.472 + <div class="options">$( 1.473 printf '%s' "$settings" | grep -q "home_uuid" && select_home_uuid 1.474 - printf '%s' "$settings" | grep -q "home_format" \ 1.475 - && select_home_format 1.476 + printf '%s' "$settings" | grep -q "home_format" && select_home_format 1.477 printf '%s' "$settings" | grep -q "hostname" && select_hostname 1.478 printf '%s' "$settings" | grep -q "root_pwd" && select_root_pwd 1.479 printf '%s' "$settings" | grep -q "user_login" && select_user_login 1.480 printf '%s' "$settings" | grep -q "user_pwd" && select_user_pwd 1.481 - close_div 1.482 - open_div 'class="bootloader"' 1.483 + )</div> 1.484 + 1.485 + <div class="bootloader">$( 1.486 printf '%s' "$settings" | grep -q "bootloader" && select_bootloader 1.487 printf '%s' "$settings" | grep -q "winboot" && select_winboot 1.488 - close_div 1.489 - br 1.490 + )</div> 1.491 +</fieldset> 1.492 + 1.493 +<br/> 1.494 +EOT 1.495 } 1.496 1.497 + 1.498 #-------------- 1.499 # execute page 1.500 #-------------- 1.501 @@ -471,8 +572,10 @@ 1.502 save_settings() 1.503 { 1.504 h5 "$(gettext "Checking settings...")" 1.505 + 1.506 # install type 1.507 /usr/sbin/tazinst set media "$(GET MEDIA)" "$INSTFILE" 1.508 + 1.509 # source File 1.510 case "$(/usr/sbin/tazinst get media "$INSTFILE")" in 1.511 usb) 1.512 @@ -482,14 +585,18 @@ 1.513 web) 1.514 /usr/sbin/tazinst set source "$(GET SRC_WEB)" "$INSTFILE" ;; 1.515 esac 1.516 + 1.517 # set defined url 1.518 [ $(GET URL) ] && SRC_WEB=$(GET URL) 1.519 + 1.520 # root Partition 1.521 /usr/sbin/tazinst set root_uuid "$(GET ROOT_UUID)" "$INSTFILE" 1.522 + 1.523 # format root partition 1.524 [ "$(GET ROOT_FORMAT)" ] \ 1.525 && /usr/sbin/tazinst set root_format "$(GET ROOT_FORMAT)" "$INSTFILE" \ 1.526 || /usr/sbin/tazinst unset root_format "$INSTFILE" 1.527 + 1.528 # home Partition 1.529 if [ "$(GET HOME_UUID)" ] ; then 1.530 /usr/sbin/tazinst set home_uuid "$(GET HOME_UUID)" "$INSTFILE" 1.531 @@ -501,16 +608,22 @@ 1.532 /usr/sbin/tazinst unset home_uuid "$INSTFILE" 1.533 /usr/sbin/tazinst unset home_format "$INSTFILE" 1.534 fi 1.535 + 1.536 # hostname 1.537 /usr/sbin/tazinst set hostname "$(GET HOSTNAME)" "$INSTFILE" 1.538 + 1.539 # root pwd 1.540 /usr/sbin/tazinst set root_pwd "$(GET ROOT_PWD)" "$INSTFILE" 1.541 + 1.542 # user Login 1.543 /usr/sbin/tazinst set user_login "$(GET USER_LOGIN)" "$INSTFILE" 1.544 + 1.545 # user Pwd 1.546 /usr/sbin/tazinst set user_pwd "$(GET USER_PWD)" "$INSTFILE" 1.547 + 1.548 # win Dual-Boot 1.549 /usr/sbin/tazinst set winboot "$(GET WINBOOT)" "$INSTFILE" 1.550 + 1.551 # bootloader 1.552 if [ "$(GET BOOTLOADER)" == "auto" ]; then 1.553 /usr/sbin/tazinst set bootloader "auto" "$INSTFILE" 1.554 @@ -521,6 +634,7 @@ 1.555 input_hidden "CHECK" "yes" 1.556 } 1.557 1.558 + 1.559 tazinst_run() 1.560 { 1.561 local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")" error 1.562 @@ -568,6 +682,7 @@ 1.563 1.564 } 1.565 1.566 + 1.567 tazinst_log() 1.568 { 1.569 h4 "$(gettext "Tazinst log")" 1.570 @@ -579,35 +694,38 @@ 1.571 # page navigation 1.572 #----------------- 1.573 1.574 -display_mode() 1.575 -{ 1.576 +display_mode() { 1.577 local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")" 1.578 case $mode in 1.579 install) 1.580 - open_div 'id="wrapper"' 1.581 - h4 "$(gettext "Install SliTaz")" 1.582 - p "$(gettext "You're going to install SliTaz on a partition of \ 1.583 + cat <<EOT 1.584 +<h2>$(gettext "Install SliTaz")</h2> 1.585 + 1.586 +<p>$(gettext "You're going to install SliTaz on a partition of \ 1.587 your hard disk drive. If you decide to format your HDD, all data will be \ 1.588 lost. If you do not format, all data except for any existing /home \ 1.589 -directory will be removed (the home directory will be kept as is).")" 1.590 - close_div 1.591 +directory will be removed (the home directory will be kept as is).")</p> 1.592 +EOT 1.593 ;; 1.594 upgrade) 1.595 - open_div 'id="wrapper"' 1.596 - h4 "$(gettext "Upgrade SliTaz")" 1.597 - p "$(gettext "You're going to upgrade an already installed SliTaz \ 1.598 + cat <<EOT 1.599 +<h2>$(gettext "Upgrade SliTaz")</h2> 1.600 + 1.601 +<p>$(gettext "You're going to upgrade an already installed SliTaz \ 1.602 system on your hard disk drive. Your /home /etc /var/www directories \ 1.603 will be kept, all other directories will be removed. Any additional \ 1.604 packages added to your old Slitaz system will be updated as long you \ 1.605 -have an active internet connection.")" 1.606 - close_div 1.607 +have an active internet connection.")</p> 1.608 +EOT 1.609 ;; 1.610 esac 1.611 } 1.612 1.613 + 1.614 moveto_page() 1.615 { 1.616 local back_page="$1" next_page="$2" back_msg next_msg 1.617 + 1.618 case "$back_page" in 1.619 partitioning) 1.620 back_msg=$(gettext 'Back to partitioning') ;; 1.621 @@ -616,6 +734,7 @@ 1.622 *) 1.623 back_msg=$(gettext 'Back to Installer Start Page') ;; 1.624 esac 1.625 + 1.626 case "$next_page" in 1.627 execute|run) 1.628 next_msg=$(gettext 'Proceed to SliTaz installation') ;; 1.629 @@ -628,27 +747,34 @@ 1.630 *) 1.631 next_msg=$(gettext 'Back to Installer Start Page') ;; 1.632 esac 1.633 - hr 1.634 - input_hidden "page" "$next_page" 1.635 - a "$back_page" "$back_msg" 1.636 - input "submit" \ 1.637 - "" \ 1.638 - "$next_msg" 1.639 + 1.640 + cat <<EOT 1.641 +<hr/> 1.642 +<form> 1.643 + <button name="page" value="$back_page" data-icon="back" >$back_msg</button> 1.644 + <button name="page" value="$next_page" data-icon="start">$next_msg</button> 1.645 +</form> 1.646 +EOT 1.647 } 1.648 1.649 -moveto_home() 1.650 -{ 1.651 - a "home" "$(gettext 'Back to Installer Start Page')" 1.652 + 1.653 +moveto_home() { 1.654 + cat <<EOT 1.655 +<form> 1.656 + <button name="page" value="home" data-icon="back" 1.657 + >$(gettext 'Back to Installer Start Page')</button> 1.658 +</form> 1.659 +EOT 1.660 } 1.661 1.662 -page_redirection() 1.663 -{ 1.664 + 1.665 +page_redirection() { 1.666 local page="$1" 1.667 cat <<EOT 1.668 <!DOCTYPE html> 1.669 <html> 1.670 <head> 1.671 -<meta charset="utf-8"> 1.672 +<meta charset="UTF-8"> 1.673 <title>$(gettext "A web page that points a browser to a different page after \ 1.674 2 seconds")</title> 1.675 <meta http-equiv="refresh" content="0; URL=$SCRIPT_NAME?page=$1"> 1.676 @@ -663,12 +789,12 @@ 1.677 EOT 1.678 } 1.679 1.680 + 1.681 #---------- 1.682 # checking 1.683 #---------- 1.684 1.685 -check_ressources() 1.686 -{ 1.687 +check_ressources() { 1.688 local errorcode=0 1.689 comment "check_ressources" 1.690 if ! [ -x /usr/sbin/tazinst ] ; then 1.691 @@ -714,62 +840,51 @@ 1.692 # html snippets 1.693 #--------------- 1.694 1.695 -br() 1.696 -{ 1.697 +br() { 1.698 echo '<br />' 1.699 } 1.700 1.701 -hr() 1.702 -{ 1.703 +hr() { 1.704 echo '<hr />' 1.705 } 1.706 1.707 -comment() 1.708 -{ 1.709 +comment() { 1.710 printf '<!-- %s -->\n' "$@" 1.711 } 1.712 1.713 -a() 1.714 -{ 1.715 +a() { 1.716 local page="$1" text="$2" 1.717 printf '<a class="button" value="%s" href="%s?page=%s">%s</a>\n' \ 1.718 "$page" "$SCRIPT_NAME" "$page" "$text" 1.719 } 1.720 1.721 -button() 1.722 -{ 1.723 +button() { 1.724 local action="$1" msg="$2" title="$3" 1.725 printf '<a class="button" href="%s?page=%s" title="%s">%s</a>\n' \ 1.726 "$SCRIPT_NAME" "$action" "$title" "$msg" 1.727 } 1.728 1.729 -open_div() 1.730 -{ 1.731 +open_div() { 1.732 [ "$1" ] && printf '<div %s>\n' "$1" || echo '<div>' 1.733 } 1.734 1.735 -close_div() 1.736 -{ 1.737 +close_div() { 1.738 echo '</div>' 1.739 } 1.740 1.741 -p() 1.742 -{ 1.743 +p() { 1.744 printf '<p>%s</p>\n' "$@" 1.745 } 1.746 1.747 -h4() 1.748 -{ 1.749 +h4() { 1.750 printf '<h4>%s</h4>\n' "$@" 1.751 } 1.752 1.753 -h5() 1.754 -{ 1.755 +h5() { 1.756 printf '<h5>%s</h5>\n' "$@" 1.757 } 1.758 1.759 -label() 1.760 -{ 1.761 +label() { 1.762 local setting="$1" label="$2" title="$3" name="$4" error=0 1.763 [ -z "$name" ] && name="$setting" 1.764 printf '<label for="%s"' "$name" 1.765 @@ -790,8 +905,8 @@ 1.766 return "$error" 1.767 } 1.768 1.769 -label_media() 1.770 -{ 1.771 + 1.772 +label_media() { 1.773 local id="$1" label="$2" media="$3" title="$4" retcode=0 1.774 if [ "$media" == "$id" ]; then 1.775 label "source" \ 1.776 @@ -807,8 +922,8 @@ 1.777 return "$retcode" 1.778 } 1.779 1.780 -error_msg() 1.781 -{ 1.782 + 1.783 +error_msg() { 1.784 local error="$1" setting="$2" line="$3" 1.785 if [ "$CHECK" ]; then 1.786 if [ "$error" -gt "0" ]; then 1.787 @@ -825,8 +940,8 @@ 1.788 fi 1.789 } 1.790 1.791 -select() 1.792 -{ 1.793 + 1.794 +select() { 1.795 local list="$1" selected="$2" name="$3" type="$4" 1.796 printf '%s' "$list" | \ 1.797 /bin/busybox awk -v SELECTED="$selected" -v NONE="$(gettext "None")" \ 1.798 @@ -946,7 +1061,7 @@ 1.799 { 1.800 printf '<!-- add specific styles --> 1.801 <style type="text/css"> 1.802 - .box label { 1.803 + section label { 1.804 display:inline-block; 1.805 vertical-align:middle; 1.806 width: 130px; 1.807 @@ -961,7 +1076,7 @@ 1.808 vertical-align:middle; 1.809 width: 140px; 1.810 } 1.811 - .box .text { 1.812 + .text { 1.813 width: 350px; 1.814 } 1.815 input {margin-bottom:3px;}
2.1 --- a/po/installer/el.po Mon Mar 30 23:32:45 2015 +0300 2.2 +++ b/po/installer/el.po Tue Apr 07 03:30:19 2015 +0300 2.3 @@ -118,13 +118,13 @@ 2.4 #, fuzzy 2.5 msgid "" 2.6 "On most used systems, the hard drive is already dedicated to partitions for " 2.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 2.8 +"Windows™, or Linux, or another operating system. You'll " 2.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 2.10 "SliTaz will co-exist with other operating systems already installed on your " 2.11 "hard drive." 2.12 msgstr "" 2.13 "Στα περισσότερα συστήματα που χρησιμοποιούνται, ο σκληρός δίσκος είναι ήδη " 2.14 -"αφιερωμένος σε διαμερίσματα των Windows<sup>™</ sup>, ή Linux, ή " 2.15 +"αφιερωμένος σε διαμερίσματα των Windows™, ή Linux, ή " 2.16 "κάποιο άλλο λειτουργικό σύστημα. Θα πρέπει να αλλάξετε το μέγεθος αυτών των " 2.17 "διαμερισμάτων, ώστε να δημιουργηθεί χώρος για το sliTaz GNU/Linux. Το SliTaz " 2.18 "θα συνυπάρχει με άλλα λειτουργικά συστήματα που έχουν ήδη εγκατασταθεί στον " 2.19 @@ -367,7 +367,7 @@ 2.20 2.21 #: installer.cgi:413 2.22 msgid "" 2.23 -"At start-up, you will be asked whether you want to boot into Windows™ " 2.24 +"At start-up, you will be asked whether you want to boot into Windows™ " 2.25 "or SliTaz GNU/Linux." 2.26 msgstr "" 2.27
3.1 --- a/po/installer/es.po Mon Mar 30 23:32:45 2015 +0300 3.2 +++ b/po/installer/es.po Tue Apr 07 03:30:19 2015 +0300 3.3 @@ -117,7 +117,7 @@ 3.4 #, fuzzy 3.5 msgid "" 3.6 "On most used systems, the hard drive is already dedicated to partitions for " 3.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 3.8 +"Windows™, or Linux, or another operating system. You'll " 3.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 3.10 "SliTaz will co-exist with other operating systems already installed on your " 3.11 "hard drive." 3.12 @@ -364,7 +364,7 @@ 3.13 3.14 #: installer.cgi:413 3.15 msgid "" 3.16 -"At start-up, you will be asked whether you want to boot into Windows™ " 3.17 +"At start-up, you will be asked whether you want to boot into Windows™ " 3.18 "or SliTaz GNU/Linux." 3.19 msgstr "" 3.20
4.1 --- a/po/installer/fr.po Mon Mar 30 23:32:45 2015 +0300 4.2 +++ b/po/installer/fr.po Tue Apr 07 03:30:19 2015 +0300 4.3 @@ -109,7 +109,7 @@ 4.4 #, fuzzy 4.5 msgid "" 4.6 "On most used systems, the hard drive is already dedicated to partitions for " 4.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 4.8 +"Windows™, or Linux, or another operating system. You'll " 4.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 4.10 "SliTaz will co-exist with other operating systems already installed on your " 4.11 "hard drive." 4.12 @@ -360,10 +360,10 @@ 4.13 4.14 #: installer.cgi:405 4.15 msgid "" 4.16 -"At start-up, you will be asked whether you want to boot into Windows™ " 4.17 +"At start-up, you will be asked whether you want to boot into Windows™ " 4.18 "or SliTaz GNU/Linux." 4.19 msgstr "" 4.20 -"Au démarage, on vous demandera de choisir entre Windows™ " 4.21 +"Au démarage, on vous demandera de choisir entre Windows™ " 4.22 "et SliTaz GNU/Linux." 4.23 4.24 #: installer.cgi:416
5.1 --- a/po/installer/installer.pot Mon Mar 30 23:32:45 2015 +0300 5.2 +++ b/po/installer/installer.pot Tue Apr 07 03:30:19 2015 +0300 5.3 @@ -94,7 +94,7 @@ 5.4 #: installer.cgi:114 5.5 msgid "" 5.6 "On most used systems, the hard drive is already dedicated to partitions for " 5.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 5.8 +"Windows™, or Linux, or another operating system. You'll " 5.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 5.10 "SliTaz will co-exist with other operating systems already installed on your " 5.11 "hard drive." 5.12 @@ -302,7 +302,7 @@ 5.13 5.14 #: installer.cgi:413 5.15 msgid "" 5.16 -"At start-up, you will be asked whether you want to boot into Windows™ " 5.17 +"At start-up, you will be asked whether you want to boot into Windows™ " 5.18 "or SliTaz GNU/Linux." 5.19 msgstr "" 5.20
6.1 --- a/po/installer/pt_BR.po Mon Mar 30 23:32:45 2015 +0300 6.2 +++ b/po/installer/pt_BR.po Tue Apr 07 03:30:19 2015 +0300 6.3 @@ -111,13 +111,13 @@ 6.4 #: installer.cgi:114 6.5 msgid "" 6.6 "On most used systems, the hard drive is already dedicated to partitions for " 6.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 6.8 +"Windows™, or Linux, or another operating system. You'll " 6.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 6.10 "SliTaz will co-exist with other operating systems already installed on your " 6.11 "hard drive." 6.12 msgstr "" 6.13 "Na maioria dos sistemas o disco rígido possui uma partição dedicada ao " 6.14 -"Windows<sup>™</sup>, ou Linux, ou outro sistema operacional. Será " 6.15 +"Windows™, ou Linux, ou outro sistema operacional. Será " 6.16 "necessário redimensioar esta partição para liberar espaço para o SliTaz. A " 6.17 "distribuição irá funcionar em conjunto com outro sistema operacional " 6.18 "existente no dísco rígido." 6.19 @@ -341,10 +341,10 @@ 6.20 6.21 #: installer.cgi:413 6.22 msgid "" 6.23 -"At start-up, you will be asked whether you want to boot into Windows™ " 6.24 +"At start-up, you will be asked whether you want to boot into Windows™ " 6.25 "or SliTaz GNU/Linux." 6.26 msgstr "" 6.27 -"Será requisitado na inicialização se você deseja iniciar pelo Windows™ " 6.28 +"Será requisitado na inicialização se você deseja iniciar pelo Windows™ " 6.29 "ou pelo SliTAz GNU/Lïnux." 6.30 6.31 #: installer.cgi:424
7.1 --- a/po/installer/ru.po Mon Mar 30 23:32:45 2015 +0300 7.2 +++ b/po/installer/ru.po Tue Apr 07 03:30:19 2015 +0300 7.3 @@ -114,7 +114,7 @@ 7.4 #, fuzzy 7.5 msgid "" 7.6 "On most used systems, the hard drive is already dedicated to partitions for " 7.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 7.8 +"Windows™, or Linux, or another operating system. You'll " 7.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 7.10 "SliTaz will co-exist with other operating systems already installed on your " 7.11 "hard drive." 7.12 @@ -359,7 +359,7 @@ 7.13 7.14 #: installer.cgi:413 7.15 msgid "" 7.16 -"At start-up, you will be asked whether you want to boot into Windows™ " 7.17 +"At start-up, you will be asked whether you want to boot into Windows™ " 7.18 "or SliTaz GNU/Linux." 7.19 msgstr "" 7.20
8.1 --- a/po/installer/sv.po Mon Mar 30 23:32:45 2015 +0300 8.2 +++ b/po/installer/sv.po Tue Apr 07 03:30:19 2015 +0300 8.3 @@ -117,13 +117,13 @@ 8.4 #, fuzzy 8.5 msgid "" 8.6 "On most used systems, the hard drive is already dedicated to partitions for " 8.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 8.8 +"Windows™, or Linux, or another operating system. You'll " 8.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 8.10 "SliTaz will co-exist with other operating systems already installed on your " 8.11 "hard drive." 8.12 msgstr "" 8.13 "På de flesta använda system så är hårddisken redan dedikerad till " 8.14 -"partitioner för Windows<sup>™</sup>, eller Linux eller ett annat " 8.15 +"partitioner för Windows™, eller Linux eller ett annat " 8.16 "operativ system. Du kommer att måsta ändra storleken på dessa partitioner så " 8.17 "att det finns plats för SliTaz GNU/Linux. SliTaz kommer att finnas brevid de " 8.18 "operativ system du redan har på din hårddisk." 8.19 @@ -362,7 +362,7 @@ 8.20 8.21 #: installer.cgi:413 8.22 msgid "" 8.23 -"At start-up, you will be asked whether you want to boot into Windows™ " 8.24 +"At start-up, you will be asked whether you want to boot into Windows™ " 8.25 "or SliTaz GNU/Linux." 8.26 msgstr "" 8.27
9.1 --- a/po/installer/zh_CN.po Mon Mar 30 23:32:45 2015 +0300 9.2 +++ b/po/installer/zh_CN.po Tue Apr 07 03:30:19 2015 +0300 9.3 @@ -95,12 +95,12 @@ 9.4 #: installer.cgi:108 9.5 msgid "" 9.6 "On most used systems, the hard drive is already dedicated to partitions for " 9.7 -"Windows<sup>™</sup>, or Linux, or another operating system. You'll " 9.8 +"Windows™, or Linux, or another operating system. You'll " 9.9 "need to resize these partitions in order to make space for SliTaz GNU/Linux. " 9.10 "SliTaz will co-exist with other operating systems already installed on your " 9.11 "hard drive." 9.12 msgstr "" 9.13 -"大多数使用的系统,硬盘已经为 Windows<sup>™</sup>, Linux或其它系统分好" 9.14 +"大多数使用的系统,硬盘已经为 Windows™, Linux或其它系统分好" 9.15 "区了。你需要调整分区来预留空间给 SliTaz 系统。SliTaz 可以与你硬盘上的系统并存" 9.16 "的。" 9.17 9.18 @@ -313,10 +313,10 @@ 9.19 9.20 #: installer.cgi:405 9.21 msgid "" 9.22 -"At start-up, you will be asked whether you want to boot into Windows™ " 9.23 +"At start-up, you will be asked whether you want to boot into Windows™ " 9.24 "or SliTaz GNU/Linux." 9.25 msgstr "" 9.26 -"电脑开启时,你会被询问选择引导进入 Windows&trade 或 SliTaz GNU/Linux 。" 9.27 +"电脑开启时,你会被询问选择引导进入 Windows™ 或 SliTaz GNU/Linux 。" 9.28 9.29 #: installer.cgi:416 9.30 msgid "Errors found. Please check your settings."