slitaz-pizza diff web/pizza.cgi @ rev 108
Tiny edits, improve translations...
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri May 02 17:40:45 2014 +0000 (2014-05-02) |
parents | 56c51515f0d4 |
children | badda89e08ee |
line diff
1.1 --- a/web/pizza.cgi Sat Jan 25 14:21:08 2014 +0100 1.2 +++ b/web/pizza.cgi Fri May 02 17:40:45 2014 +0000 1.3 @@ -70,9 +70,9 @@ 1.4 cat << EOT 1.5 <h2>$(gettext "First step")</h2> 1.6 <p> 1.7 - $(gettext "Choose your distribution name and the one you want to use as 1.8 - base. We need your mail to notify you when your SliTaz Flavor is built 1.9 - and if anything goes wrong.") 1.10 + $(gettext "Choose your distribution name and the one you want to use as \ 1.11 +base. We need your mail to notify you when your SliTaz Flavor is built \ 1.12 +and if anything goes wrong.") 1.13 </p> 1.14 <form method="get" action="pkgs.cgi" name="pizza" onsubmit="return checkForm();"> 1.15 <table> 1.16 @@ -111,7 +111,7 @@ 1.17 </pre> 1.18 <div class="next"> 1.19 <input type="hidden" name="id" value="$id" /> 1.20 - <input type="submit" value="$(gettext "Continue")"> 1.21 + <input type="submit" value="$(gettext 'Continue')"> 1.22 </div> 1.23 </form> 1.24 EOT 1.25 @@ -128,9 +128,9 @@ 1.26 cat << EOT 1.27 <h2>$(gettext "Generate")</h2> 1.28 <p> 1.29 -$(gettext "Last chance to stop process or start over. Next step will pack 1.30 -your flavor and add it to the build queue. Here you can also add a note to 1.31 -your receipt flavor, this will be displayed on your flavor ID page and 1.32 + $(gettext "Last chance to stop process or start over. Next step will pack \ 1.33 +your flavor and add it to the build queue. Here you can also add a note to \ 1.34 +your receipt flavor, this will be displayed on your flavor ID page and \ 1.35 can be used to give more info to other users and SliTaz developers.") 1.36 </p> 1.37 1.38 @@ -148,21 +148,21 @@ 1.39 <input type="text" name="note" style="width: 720px;" /> 1.40 </div> 1.41 <div class="next"> 1.42 - <input type="submit" name="cancel" value="$(gettext "Cancel")"> 1.43 + <input type="submit" name="cancel" value="$(gettext 'Cancel')"> 1.44 <input type="hidden" name="addfiles" value="$addfiles" /> 1.45 <input type="hidden" name="id" value="$id" /> 1.46 - <input type="submit" name="pack" value="$(gettext "Build flavor")"> 1.47 + <input type="submit" name="pack" value="$(gettext 'Build flavor')"> 1.48 </div> 1.49 </form> 1.50 EOT 1.51 ;; 1.52 *\ cancel\ *) 1.53 id="$(GET id)" 1.54 - echo "<p>$(gettext "Removing temporary files for:") $id</p>" 1.55 + echo "<p>$(eval_gettext 'Removing temporary files for: $id')</p>" 1.56 [ -d "$tmpdir/slitaz-$id" ] && rm -rf $tmpdir/slitaz-$id/ 1.57 cat << EOT 1.58 <form method="get" action="./"> 1.59 - <input type="submit" name="start" value="$(gettext "Start over")"> 1.60 + <input type="submit" name="start" value="$(gettext 'Start over')"> 1.61 </form> 1.62 EOT 1.63 ;; 1.64 @@ -178,7 +178,7 @@ 1.65 inqueue=$(ls $queue | wc -l) 1.66 . $receipt 1.67 cat << EOT 1.68 -<h2>$(gettext "Packing:") $FLAVOR</h2> 1.69 +<h2>$(gettext 'Packing: $FLAVOR')</h2> 1.70 <pre> 1.71 EOT 1.72 if ! fgrep ADDFILES $receipt; then 1.73 @@ -190,14 +190,14 @@ 1.74 fi 1.75 1.76 # The rootcd README 1.77 - echo -n "Creating SliTaz cdrom README..." 1.78 + gettext "Creating SliTaz CD-ROM README..." 1.79 date=$(date '+%Y-%m-%d %H:%M') 1.80 mkdir -p $tmpdir/slitaz-$id/rootcd 1.81 cp $DATA/README.distro $tmpdir/slitaz-$id/rootcd/README 1.82 sed -i s"/_DATE_/$date/" $tmpdir/slitaz-$id/rootcd/README 1.83 status 1.84 1.85 - echo -n "Creating flavor tarball..." 1.86 + gettext "Creating flavor tarball..." 1.87 cd $tmpdir && tar cjf $FLAVOR.tar.bz2 slitaz-$id 1.88 mkdir -p $public/slitaz-$id 1.89 mv $FLAVOR.tar.bz2 $public/slitaz-$id 1.90 @@ -205,7 +205,7 @@ 1.91 1.92 # Keep a public receipt copy and move everything from tmp to queue. 1.93 echo "Flavor packed : $(date '+%Y-%m-%d %H:%M')" | tee -a $log 1.94 - echo -n "Moving $id to Pizza build queue..." 1.95 + gettext "Moving $id to Pizza build queue..." 1.96 mv -f $tmpdir/slitaz-$id/distro.log $public/slitaz-$id 1.97 cp -f $tmpdir/slitaz-$id/receipt $public/slitaz-$id 1.98 mv $tmpdir/slitaz-$id $queue 1.99 @@ -214,7 +214,9 @@ 1.100 if [ "$inqueue" == "1" ]; then 1.101 gettext "Your ISO will be built on next Pizza Bot run" 1.102 else 1.103 - eval_gettext "There are \$inqueue flavors in queue" 1.104 + eval_ngettext \ 1.105 + 'There is $inqueue flavor in queue' \ 1.106 + 'There are $inqueue flavors in queue' $inqueue 1.107 fi 1.108 echo "" 1.109 echo "New flavor added to queue: <a href='?id=$id'>$id</a> ($FLAVOR)" | log 1.110 @@ -222,14 +224,14 @@ 1.111 </pre> 1.112 <div> 1.113 <img src="images/archive.png" alt="[ tarball ]" /> 1.114 - $(gettext "Download tarball: ") 1.115 + $(gettext "Download tarball:") 1.116 <a href="public/slitaz-$id/$FLAVOR.tar.bz2">$FLAVOR.tar.bz2</a> 1.117 - Browse <a href="public/slitaz-$id/">the flavor</a> 1.118 </div> 1.119 <div class="next"> 1.120 <form method="get" action="./"> 1.121 <input type="hidden" name="id" value="$id" /> 1.122 - <input type="submit" value="$(gettext "Status")"> 1.123 + <input type="submit" value="$(gettext 'Status')"> 1.124 </form> 1.125 </div> 1.126 EOT 1.127 @@ -243,18 +245,18 @@ 1.128 [ -f "public/slitaz-$id/receipt" ] && . public/slitaz-$id/receipt 1.129 log="$public/slitaz-$id/distro.log" 1.130 if [ ! -d "public/slitaz-$id" ]; then 1.131 - echo "Sorry, can't find flavor ID: $id" 1.132 + gettext "Sorry, can't find flavor ID: $id" 1.133 cat lib/footer.html && exit 0 1.134 fi 1.135 if [ -f "$public/slitaz-$id/$FLAVOR.iso" ]; then 1.136 dir="public/slitaz-$id" 1.137 list="$dir/packages.list" 1.138 iso="$dir/$FLAVOR.iso" 1.139 - msg="$(gettext "Download ISO:") <a href='$dir/$FLAVOR.iso'>$FLAVOR.iso</a> 1.140 - [ <a href='$dir/$FLAVOR.md5'>md5</a> ]" 1.141 + msg="$(gettext 'Download ISO:') <a href=\"$dir/$FLAVOR.iso\">$FLAVOR.iso</a> 1.142 + [ <a href=\"$dir/$FLAVOR.md5\">md5</a> ]" 1.143 else 1.144 list="$queue/slitaz-$id/packages.list" 1.145 - msg="$(gettext "Flavor is building or still in the build queue")" 1.146 + msg="$(gettext 'Flavor is building or still in the build queue')" 1.147 fi 1.148 pkgslist=$(cat $list | wc -l) 1.149 pkgsinst=$(cat $installed | wc -l) 1.150 @@ -262,7 +264,7 @@ 1.151 [ "$ISO_SIZE" ] || ISO_SIZE="N/A" 1.152 [ "$ROOTFS_SIZE" ] || ROOTFS_SIZE="N/A" 1.153 cat << EOT 1.154 -<h2>$(gettext "Status for:") $FLAVOR</h2> 1.155 +<h2>$(gettext 'Status for: $FLAVOR')</h2> 1.156 <div> 1.157 $(get_gravatar $MAINTAINER) $(gettext "Flavor description:") $SHORT_DESC 1.158 </div> 1.159 @@ -302,7 +304,7 @@ 1.160 echo '</pre>' 1.161 fi ;; 1.162 *\ help\ *) 1.163 - echo "<h2>$(gettext "Help")</h2>" 1.164 + echo "<h2>$(gettext 'Help')</h2>" 1.165 cat /usr/share/doc/pizza/help.en.html 1.166 cat /usr/share/doc/pizza/faq.en.html 1.167 echo '<h3>README</h3>' 1.168 @@ -316,7 +318,7 @@ 1.169 else 1.170 mounted="WARRNING: Public is not mounted" 1.171 fi 1.172 - echo '<h2><img src="images/monitor.png" alt="" />Pizza Info</h2>' 1.173 + echo '<h2><img src="images/monitor.png" alt="(i)" />Pizza Info</h2>' 1.174 echo '<pre>' 1.175 [ "$mounted" ] && echo "$mounted" 1.176 echo -n "Public flavors : " && ls -1 public | wc -l 1.177 @@ -345,9 +347,9 @@ 1.178 <h2>$(gettext "Welcome")</h2> 1.179 <form method="get" action="./"> 1.180 <p> 1.181 -$(gettext "SliTaz Pizza lets you create your own SliTaz ISO flavor 1.182 -online. The ISO image can be burnt on a cdrom or installed on USB media. 1.183 -Please read the SliTaz Pizza <a href="?help">Help</a> before starting 1.184 + $(gettext "SliTaz Pizza lets you create your own SliTaz ISO flavor \ 1.185 +online. The ISO image can be burnt on a cdrom or installed on USB media. \ 1.186 +Please read the SliTaz Pizza <a href=\"?help\">Help</a> before starting \ 1.187 a new flavor.") 1.188 </p> 1.189 <pre> 1.190 @@ -355,11 +357,11 @@ 1.191 </pre> 1.192 1.193 <div class="start"> 1.194 - <input type="submit" name="start" value="$(gettext "Create a new flavor")"> 1.195 + <input type="submit" name="start" value="$(gettext 'Create a new flavor')"> 1.196 </div> 1.197 1.198 EOT 1.199 - echo "<h2>$(gettext "Latest builds")</h2>" 1.200 + echo "<h2>$(gettext 'Latest builds')</h2>" 1.201 echo '<pre>' 1.202 for flavor in $(ls -1t public | head -n 5) 1.203 do 1.204 @@ -378,7 +380,7 @@ 1.205 <pre> 1.206 $(tac $activity | head -n 12 | highlighter activity) 1.207 </pre> 1.208 - <input type="submit" name="activity" value="$(gettext "More activity")"> 1.209 + <input type="submit" name="activity" value="$(gettext 'More activity')"> 1.210 </form> 1.211 EOT 1.212 ;;