slitaz-base-files diff rootfs/var/www/cgi-bin/cgi-env.sh @ rev 219

libtaz.sh: add (and use) short gettext aliases: _ and _n
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Aug 09 15:38:43 2013 +0300 (2013-08-09)
parents bffd6c0e7c5b
children 91fcb259b3bf
line diff
     1.1 --- a/rootfs/var/www/cgi-bin/cgi-env.sh	Mon May 21 10:44:59 2012 +0300
     1.2 +++ b/rootfs/var/www/cgi-bin/cgi-env.sh	Fri Aug 09 15:38:43 2013 +0300
     1.3 @@ -1,7 +1,7 @@
     1.4  #!/bin/sh
     1.5 +. /lib/libtaz.sh
     1.6  
     1.7  # Internationalization.
     1.8 -. /usr/bin/gettext.sh
     1.9  TEXTDOMAIN='slitaz-base'
    1.10  . /etc/locale.conf
    1.11  export TEXTDOMAIN LANG
    1.12 @@ -9,45 +9,42 @@
    1.13  . /usr/lib/slitaz/httphelper.sh
    1.14  header
    1.15  
    1.16 +title=$(_ "CGI SHell Environment")
    1.17  cat << EOT
    1.18  <!DOCTYPE html>
    1.19  <html xmlns="http://www.w3.org/1999/xhtml">
    1.20  <head>
    1.21  	<meta charset="utf-8" />
    1.22 -	<title>$(gettext "CGI SHell Environment")</title>
    1.23 +	<title>$title</title>
    1.24  	<link rel="stylesheet" type="text/css" href="../style.css" />
    1.25  </head>
    1.26  <body>
    1.27  
    1.28  <!-- Header -->
    1.29  <div id="header">
    1.30 -	<h1>$(gettext "CGI SHell Environment")</h1>
    1.31 +	<h1>$title</h1>
    1.32  </div>
    1.33  
    1.34  <!-- Content -->
    1.35  <div id="content">
    1.36  
    1.37 -<p>$(gettext "Welcome to the SliTaz web server CGI Shell environment. Let the \
    1.38 +<p>$(_ "Welcome to the SliTaz web server CGI Shell environment. Let the \
    1.39  power of SHell script meet the web! Here you can check HTTP info and try some \
    1.40  requests.")</p>
    1.41  
    1.42 -<p>$(gettext "Including /usr/lib/slitaz/httphelper.sh in your scripts lets you \
    1.43 +<p>$(_ "Including /usr/lib/slitaz/httphelper.sh in your scripts lets you \
    1.44  use PHP-like syntax such as: \$(GET var)")</p>
    1.45  
    1.46 -<p>$(gettext "QUERY_STRING test:")
    1.47 +<p>$(_ "QUERY_STRING test:")
    1.48  	<a href="$SCRIPT_NAME?var=value">$SCRIPT_NAME?var=value</a>
    1.49  </p>
    1.50  
    1.51  
    1.52 -<h2>$(gettext "HTTP Info")</h2>
    1.53 +<h2>$(_ "HTTP Info")</h2>
    1.54  
    1.55  <pre>$(httpinfo)</pre>
    1.56  
    1.57  
    1.58 -<h2>$(gettext "HTTP Helper")</h2>
    1.59 -
    1.60 -<pre>$(httphelper)</pre>
    1.61 -
    1.62  <!-- End content -->
    1.63  </div>
    1.64