tazpanel diff live.cgi @ rev 313

new locale chooser
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 17 15:03:15 2012 +0300 (2012-05-17)
parents 72e9955ebdff
children 91ba0f11bea6
line diff
     1.1 --- a/live.cgi	Wed Apr 11 20:12:41 2012 +0300
     1.2 +++ b/live.cgi	Thu May 17 15:03:15 2012 +0300
     1.3 @@ -66,7 +66,7 @@
     1.4  		$TERMINAL $TERM_OPTS \
     1.5  			-T "build meta iso" \
     1.6  			-e "tazlito merge $(merge_args $tmp); \
     1.7 -				gettext \"ENTER to quit\"; read i; \
     1.8 +				gettext 'ENTER to quit'; read i; \
     1.9  				$cleanup" & ;;
    1.10  esac
    1.11  
    1.12 @@ -80,23 +80,21 @@
    1.13  		# Create a flavor file and ISO in options with all settings
    1.14  		# Step by step interface and store files in cache.
    1.15  		#
    1.16 -		gettext "TODO" ;;
    1.17 +		gettext 'TODO' ;;
    1.18  	*\ liveusb\ *)
    1.19  		xhtml_header
    1.20  		cat << EOT
    1.21  <div id="wrapper">
    1.22 -	<h2>$(gettext "SliTaz LiveUSB")</h2>
    1.23 -	<p>$(gettext "Create Live USB SliTaz systems")<p>
    1.24 +	<h2>$(gettext 'SliTaz LiveUSB')</h2>
    1.25 +	<p>$(gettext 'Create Live USB SliTaz systems')<p>
    1.26  </div>
    1.27  
    1.28 -<p>
    1.29 -	$(gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a
    1.30 -	LiveCD into the cdrom drive, select the correct device and press
    1.31 -	Generate.")
    1.32 -</p>
    1.33 +<p>$(gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a LiveCD \
    1.34 +into the cdrom drive, select the correct device and press Generate.")</p>
    1.35 +
    1.36  <form method="get" action="$SCRIPT_NAME">
    1.37  	<input type="hidden" name="liveusb" />
    1.38 -	$(gettext "USB Media to use:")
    1.39 +	$(gettext 'USB Media to use:')
    1.40  	<select name="gen">
    1.41  EOT
    1.42  		# List disk if there is a plugged USB device
    1.43 @@ -105,16 +103,18 @@
    1.44  				echo "<option value='$i'>$i</option>"
    1.45  			done
    1.46  		else
    1.47 -			echo "<option value="">"`gettext "Not found"`"</option>"
    1.48 +			echo "<option value="">$(gettext 'Not found')</option>"
    1.49  		fi
    1.50  		cat << EOT
    1.51  	</select>
    1.52 -	<input type="submit" value="`gettext "Generate"`" />
    1.53 +	<input type="submit" value="$(gettext 'Generate')" />
    1.54  </form>
    1.55  EOT
    1.56  		if [ "$(GET gen)" ]; then
    1.57 -			echo "<h3>tazusb gen-liveusb $(GET gen)</h3>"
    1.58 -			echo '<pre>'
    1.59 +			cat << EOT
    1.60 +<h3>tazusb gen-liveusb $(GET gen)</h3>
    1.61 +<pre>
    1.62 +EOT
    1.63  			# No pipe here so output is displayed in realtime
    1.64  			yes | tazusb gen-liveusb $(GET gen)
    1.65  			echo '</pre>'
    1.66 @@ -126,70 +126,78 @@
    1.67  		xhtml_header
    1.68  		cat << EOT
    1.69  <div id="wrapper">
    1.70 -	<h2>`gettext "SliTaz Live Systems"`</h2>
    1.71 -	<p>`gettext "Create and manage Live CD or USB SliTaz systems"`<p>
    1.72 +	<h2>$(gettext 'SliTaz Live Systems')</h2>
    1.73 +	<p>$(gettext 'Create and manage Live CD or USB SliTaz systems')<p>
    1.74  </div>
    1.75  
    1.76  <div id="actions">
    1.77  	<a class="button" href="$SCRIPT_NAME?liveusb">
    1.78 -		<img src="$IMAGES/harddisk.png" />$(gettext "Create LiveUSB")</a>
    1.79 +		<img src="$IMAGES/harddisk.png" />$(gettext 'Create LiveUSB')</a>
    1.80  </div>
    1.81  
    1.82 -<!--<a name="livecd"></a>
    1.83 -<h3>`gettext "Write a Live CD"`</h3>
    1.84 -<p>
    1.85 -	`gettext "The command writeiso will generate an ISO image of the
    1.86 -	current filesystem as is, including all files in the /home directory.
    1.87 -	It is an easy way to remaster a SliTaz Live system, you just have
    1.88 -	to: boot, modify, writeiso."`
    1.89 -</p>
    1.90 +
    1.91 +<!--
    1.92 +<h3 id="livecd">$(gettext 'Write a Live CD')</h3>
    1.93 +
    1.94 +<p>$(gettext "The command writeiso will generate an ISO image of the current \
    1.95 +filesystem as is, including all files in the /home directory. It is an easy \
    1.96 +way to remaster a SliTaz Live system, you just have to: boot, modify, \
    1.97 +writeiso.")</p>
    1.98 +
    1.99  <form method="get" action="$SCRIPT_NAME">
   1.100 -	`gettext "Compression type:"`
   1.101 +	$(gettext 'Compression type:')
   1.102  	<select name="write_iso">
   1.103  		<option value="gzip">gzip</option>
   1.104  		<option value="lzma">lzma</option>
   1.105 -		<option value="none">none</option>
   1.106 +		<option value="none">$(gettext 'none')</option>
   1.107  	</select>
   1.108 -	<input type="submit" value="`gettext "Write ISO"`" />
   1.109 +	<input type="submit" value="$(gettext 'Write ISO')" />
   1.110  </form> -->
   1.111  
   1.112 -<h3>`gettext "Live CD tools"`</h3>
   1.113 -<a name="loram"></a>
   1.114 -<h4>`gettext "Convert ISO to loram"`</h4>
   1.115 -<p>
   1.116 -	`gettext "This command will convert an ISO image of a SliTaz Live CD
   1.117 -	to a new ISO image requiring less RAM to run."`
   1.118 -</p>
   1.119 +
   1.120 +<h3>$(gettext 'Live CD tools')</h3>
   1.121 +
   1.122 +<h4 id="loram">$(gettext 'Convert ISO to loram')</h4>
   1.123 +
   1.124 +<p>$(gettext "This command will convert an ISO image of a SliTaz Live CD to a \
   1.125 +new ISO image requiring less RAM to run.")</p>
   1.126 +
   1.127  <form method="get" action="$SCRIPT_NAME#loram">
   1.128  	<table>
   1.129 -	<tr>
   1.130 -	<td>`gettext "ISO to convert"`
   1.131 -	<input type="text" name="input" value="/root/" /></td>
   1.132 -	</tr>
   1.133 -	<tr>
   1.134 -	<td><input type="radio" name="type" value="ram" checked />`gettext "The filesystem is always in RAM"`.</td>
   1.135 -	</tr>
   1.136 -	<tr>
   1.137 -	<td><input type="radio" name="type" value="smallcdrom" />`gettext "The filesystem may be on a small CDROM"`.</td>
   1.138 -	</tr>
   1.139 -	<tr>
   1.140 -	<td><input type="radio" name="type" value="cdrom" />`gettext "The filesystem may be on a large CDROM"`.</td>
   1.141 -	</tr>
   1.142 -	<tr>
   1.143 -	<td>`gettext "ISO to create"`
   1.144 -	<input type="text" name="loramoutput" value="/root/loram.iso" /></td>
   1.145 -	</tr>
   1.146 +		<tr>
   1.147 +			<td>$(gettext 'ISO to convert')
   1.148 +				<input type="text" accept=".iso" name="input" value="/root/" /></td>
   1.149 +		</tr>
   1.150 +		<tr>
   1.151 +			<td><input type="radio" name="type" value="ram" id="type1" checked />
   1.152 +				<label for="type1">$(gettext 'The filesystem is always in RAM')</label>
   1.153 +			</td>
   1.154 +		</tr>
   1.155 +		<tr>
   1.156 +			<td><input type="radio" name="type" value="smallcdrom" id="type2" />
   1.157 +				<label for="type2">$(gettext 'The filesystem may be on a small CDROM')</label>
   1.158 +			</td>
   1.159 +		</tr>
   1.160 +		<tr>
   1.161 +			<td><input type="radio" name="type" value="cdrom" id="type3" />
   1.162 +				<label for="type3">$(gettext 'The filesystem may be on a large CDROM')</label>
   1.163 +			</td>
   1.164 +		</tr>
   1.165 +		<tr>
   1.166 +			<td>$(gettext 'ISO to create')
   1.167 +				<input type="text" accept=".iso" name="loramoutput" value="/root/loram.iso" />
   1.168 +			</td>
   1.169 +		</tr>
   1.170  	</table>
   1.171 -	<input type="submit" value="`gettext "Convert ISO to loram"`" />
   1.172 +	<input type="submit" value="$(gettext 'Convert ISO to loram')" />
   1.173  </form>
   1.174  
   1.175 -<a name="meta"></a>
   1.176 -<h4>`gettext "Build a meta ISO"`</h4>
   1.177 -<p>
   1.178 -	`gettext "Combines several ISO flavors like nested Russian dolls.
   1.179 -	The amount of RAM available at startup will be used to select the
   1.180 -	utmost one."`
   1.181 -</p>
   1.182 +
   1.183 +<h4 id="meta">$(gettext 'Build a meta ISO')</h4>
   1.184 +
   1.185 +<p>$(gettext "Combines several ISO flavors like nested Russian dolls. The \
   1.186 +amount of RAM available at startup will be used to select the utmost one.")</p>
   1.187 +
   1.188  <form method="get" action="$SCRIPT_NAME#meta">
   1.189  	<table>
   1.190  EOT
   1.191 @@ -198,12 +206,14 @@
   1.192  			[ -n "$(GET input$i)" ] || break
   1.193  			j=$(($i + 1))
   1.194  			cat << EOT
   1.195 -	<tr>
   1.196 -	<td>`gettext "ISO number"` $j: $(GET input$i)
   1.197 -	<input type="hidden" name="input$j" value="$(GET input$i)" /></td>
   1.198 -	<td>`gettext "Minimum RAM"`: $(GET ram$i)
   1.199 -	<input type="hidden" name="ram$j" value="$(GET ram$i)" /></td>
   1.200 -	</tr>
   1.201 +		<tr>
   1.202 +			<td>$(gettext 'ISO number') $j: $(GET input$i)
   1.203 +				<input type="hidden" name="input$j" value="$(GET input$i)" />
   1.204 +			</td>
   1.205 +			<td>$(gettext 'Minimum RAM'): $(GET ram$i)
   1.206 +				<input type="hidden" name="ram$j" value="$(GET ram$i)" />
   1.207 +			</td>
   1.208 +		</tr>
   1.209  EOT
   1.210  			i=$j
   1.211  		done
   1.212 @@ -211,19 +221,22 @@
   1.213  		[ -n "$metaoutput" ] || metaoutput="/root/meta.iso"
   1.214  
   1.215  		cat << EOT
   1.216 -	<tr>
   1.217 -	<td>`gettext "ISO to add"`
   1.218 -	<input type="text" name="input" value="/root/" /></td>
   1.219 -	<td>`gettext "Minimum RAM"`
   1.220 -	<input type="text" name="ram" value="128M" />
   1.221 -	<input type="submit" name="addmeta" value="`gettext "Add to the list"`" /></td>
   1.222 -	</tr>
   1.223 -	<tr>
   1.224 -	<td>`gettext "ISO to create"`
   1.225 -	<input type="text" name="metaoutput" value="$metaoutput" /></td>
   1.226 -	</tr>
   1.227 +		<tr>
   1.228 +			<td>$(gettext 'ISO to add')
   1.229 +				<input type="text" name="input" value="/root/" />
   1.230 +			</td>
   1.231 +			<td>$(gettext 'Minimum RAM')
   1.232 +				<input type="text" name="ram" value="128M" />
   1.233 +				<input type="submit" name="addmeta" value="$(gettext 'Add to the list')" />
   1.234 +			</td>
   1.235 +		</tr>
   1.236 +		<tr>
   1.237 +			<td>$(gettext 'ISO to create')
   1.238 +				<input type="text" name="metaoutput" value="$metaoutput" />
   1.239 +			</td>
   1.240 +		</tr>
   1.241  	</table>
   1.242 -	<input type="submit" name="meta" value="`gettext "Build a meta ISO"`" />
   1.243 +	<input type="submit" name="meta" value="$(gettext 'Build a meta ISO')" />
   1.244  </form>
   1.245  
   1.246  EOT