Permalink
Browse files

Update lang/README file and improve lang2xml script.

  * checks if given files exists before trying recoding
	* allows to run lang2xml with no args to build all translations
  • Loading branch information...
1 parent 4fe1945 commit ea7aa3167bd190385d99c3fb30ad5b60c37656c6 @ioguix ioguix committed May 21, 2011
Showing with 9 additions and 5 deletions.
  1. +4 −4 lang/README
  2. +5 −1 lang/lang2xml
View
@@ -3,19 +3,19 @@ Translators
Please read the TRANSLATORS file in the top directory.
-This directory contains the HTML Unicode recodings of the source
+"recoded" directory contains the HTML Unicode recodings of the source
language files. These are the actual files used by phpPgAdmin
when displaying strings.
Instructions on recoding:
cd lang
-make <language> (eg. 'french')
+./lang2xml <language_file> (eg. 'french.php')
-Running make with no arguments will recode all language files:
+Running lang2xml with no arguments will recode all language files:
cd lang
-make
+lang2xml
To check your translation:
View
@@ -31,6 +31,7 @@ function prepare () {
function rec () {
for f in $@
do
+ [ ! -f $f ] && echo "$f is not a valid file." && continue
DIRNAME=$(dirname $f)
mkdir -p $DIRNAME
echo "Recoding $f..."
@@ -50,7 +51,10 @@ function clean () {
prepare
-case $1 in
+COMMAND=$1
+[ -z "$COMMAND" ] && COMMAND="all"
+
+case $COMMAND in
all)
# find all translation files in the source tree
TARGETS=$(ls *.php | grep -v translations.php)

0 comments on commit ea7aa31

Please sign in to comment.