tazpanel diff index.cgi @ rev 292
translatable header, footer & titles; make pot
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Apr 11 20:12:41 2012 +0300 (2012-04-11) |
parents | ed7b79682eff |
children | fdfc6b494539 |
line diff
1.1 --- a/index.cgi Fri Mar 09 01:26:17 2012 +0000 1.2 +++ b/index.cgi Wed Apr 11 20:12:41 2012 +0300 1.3 @@ -4,7 +4,7 @@ 1.4 # command so we are faster and do not load unneeded functions. If necessary 1.5 # you can use the lib/ dir to handle external resources. 1.6 # 1.7 -# Copyright (C) 2011 SliTaz GNU/Linux - BSD License 1.8 +# Copyright (C) 2011-2012 SliTaz GNU/Linux - BSD License 1.9 # 1.10 1.11 # Common functions from libtazpanel 1.12 @@ -12,11 +12,13 @@ 1.13 get_config 1.14 header 1.15 1.16 +TITLE="TazPanel" 1.17 + 1.18 # Check whether a configuration file has been modified after installation 1.19 file_is_modified() 1.20 { 1.21 grep -l " $1$" $INSTALLED/*/md5sum | while read file; do 1.22 - 1.23 + 1.24 # Found, but can we do diff ? 1.25 [ "$(grep -h " $1$" $file)" != "$(md5sum $1)" ] || break 1.26 org=$(dirname $file)/volatile.cpio.gz 1.27 @@ -61,7 +63,7 @@ 1.28 *.html) 1.29 cat $file && exit 0 ;; 1.30 *) 1.31 - TITLE="- File" 1.32 + TITLE=$(gettext 'TazPanel - File') 1.33 xhtml_header 1.34 echo "<h2>$file</h2>" ;; 1.35 esac 1.36 @@ -84,7 +86,7 @@ 1.37 file_is_modified $file diff | syntax_highlighter diff 1.38 echo '</pre>' 1.39 else 1.40 - [ -n "$(POST content)" ] && 1.41 + [ -n "$(POST content)" ] && 1.42 sed "s/`echo -en '\r'` /\n/g" > $file <<EOT 1.43 $(POST content) 1.44 EOT 1.45 @@ -110,7 +112,7 @@ 1.46 # Cmdline terminal. 1.47 commands='cat du help ls ping pwd who wget' 1.48 cmd=$(GET cmd) 1.49 - TITLE="- $(gettext "Terminal")" 1.50 + TITLE=$(gettext 'TazPanel - Terminal') 1.51 xhtml_header 1.52 cat << EOT 1.53 <form method="get" action="$SCRIPT_NAME"> 1.54 @@ -146,7 +148,7 @@ 1.55 esac 1.56 echo '</pre>' ;; 1.57 *\ top\ *) 1.58 - TITLE="- $(gettext "Process activity")" 1.59 + TITLE=$(gettext 'TazPanel - Process activity') 1.60 xhtml_header 1.61 echo `gettext "Refresh: "` $(GET refresh) 1.62 echo '<br/> 1.63 @@ -157,7 +159,7 @@ 1.64 <input type="submit" name="refresh" value="10s"/> 1.65 <input type="submit" value="none"/> 1.66 </form> ' 1.67 - [ -n $(GET refresh) ] && 1.68 + [ -n $(GET refresh) ] && 1.69 echo '<meta http-equiv="refresh" content="' $(GET refresh) '">' | sed "s/s //" 1.70 1.71 echo '<pre>' 1.72 @@ -166,14 +168,14 @@ 1.73 -e s"#PID.*\([^']\)#<span class='top'>\0</span>#"g 1.74 echo '</pre>' ;; 1.75 *\ debug\ *) 1.76 - TITLE="- Debug" 1.77 + TITLE=$(gettext 'TazPanel - Debug') 1.78 xhtml_header 1.79 echo '<h2>HTTP Environment</h2>' 1.80 echo '<pre>' 1.81 httpinfo 1.82 echo '</pre>' ;; 1.83 *\ report\ *) 1.84 - TITLE="- $(gettext "System report")" 1.85 + TITLE=$(gettext 'TazPanel - System report') 1.86 [ -d /var/cache/slitaz ] || mkdir -p /var/cache/slitaz 1.87 output=/var/cache/slitaz/sys-report.html 1.88 xhtml_header