aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2014-11-27 21:31:09 +0100
committerfilip <filip.komar@gmail.com>2014-11-27 21:31:09 +0100
commitb89717ac05a9c715a68ba7ce3c3267be2fcdc1a4 (patch)
tree0184168e59d61d6f7057fc47ab01d2fa5334a299 /tools
parent5563cb96780166d7705efe01efd309f9b646907b (diff)
downloadwww-b89717ac05a9c715a68ba7ce3c3267be2fcdc1a4.tar
www-b89717ac05a9c715a68ba7ce3c3267be2fcdc1a4.tar.gz
www-b89717ac05a9c715a68ba7ce3c3267be2fcdc1a4.tar.bz2
www-b89717ac05a9c715a68ba7ce3c3267be2fcdc1a4.tar.xz
www-b89717ac05a9c715a68ba7ce3c3267be2fcdc1a4.zip
script updated to fix dash expand problem in some langs
Diffstat (limited to 'tools')
-rwxr-xr-xtools/rebuild_gettext_catalogs.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/rebuild_gettext_catalogs.sh b/tools/rebuild_gettext_catalogs.sh
index 1c7b9e34e..4e84cac2d 100755
--- a/tools/rebuild_gettext_catalogs.sh
+++ b/tools/rebuild_gettext_catalogs.sh
@@ -22,14 +22,14 @@ do
else
path_and_filename=./langs/en/$resource
fi
- if [ -f $path_and_filename.pot ]; then # do a temporary copy
+ if [ -f "$path_and_filename.pot" ]; then # do a temporary copy
cp $path_and_filename.pot $path_and_filename.copy
fi
php_source=${resources[$resource]}
php tools/extract2gettext.php "$php_source" $resource true
php_error_level=$? # catch php error level
errors[$php_source]=$php_error_level
- if [ -f $path_and_filename.pot ]; then
+ if [ -f "$path_and_filename.pot" ]; then
# msgmerge check of generated pot file
msgmerge --quiet --no-wrap $path_and_filename.pot $path_and_filename.pot --output-file=$path_and_filename.tmp
msgmerge_error_level=$? # catch msgmerge error level
@@ -37,7 +37,7 @@ do
errors[$php_source]=$msgmerge_error_level
rm $path_and_filename.tmp
fi
- if [ -f $path_and_filename.copy ] && [ -f $path_and_filename.tmp ]; then
+ if [ -f "$path_and_filename.copy" ] && [ -f "$path_and_filename.tmp" ]; then
diff --ignore-matching-lines='^"POT-Creation-Date:' $path_and_filename.tmp $path_and_filename.copy
if [ $? -eq 1 ]; then # there are differences
errors[$php_source]=0
@@ -51,14 +51,14 @@ do
difference=none
fi
else # diff not possible
- if [ -f $path_and_filename.tmp ]; then
+ if [ -f "$path_and_filename.tmp" ]; then
mv $path_and_filename.tmp $path_and_filename.pot
- if [ -f $path_and_filename.copy ]; then
+ if [ -f "$path_and_filename.copy" ]; then
rm $path_and_filename.copy
fi
else
rm $path_and_filename.pot
- if [ -f $path_and_filename.copy ]; then
+ if [ -f "$path_and_filename.copy" ]; then
mv $path_and_filename.copy $path_and_filename.pot
difference=none
fi
@@ -87,7 +87,7 @@ do
if [ $msgmerge_error_level -gt 0 ]; then
errors[$directory/$resource]=60
echo "$directory"/$resource.po could not be created succesfully
- if [ -f $tr_file.tmp ]; then
+ if [ -f "$tr_file.tmp" ]; then
rm $tr_file.tmp
fi
else
@@ -100,9 +100,9 @@ do
for directory in ./langs/*
do
# in each language directory except source
- if [ -d $directory/ ] && [ $directory != ./langs/en ]; then
+ if [ -d "$directory/" ] && [ $directory != ./langs/en ]; then
# create po file if needed from lang file if available
- if [ ! -f $directory/$resource.po ] && [ -f $directory/$resource.*.lang ]; then
+ if [ ! -f "$directory/$resource.po" ] && [ -f "$directory/$resource.*.lang" ]; then
# echo $directory # usefull for debuging of non UTF-8 files or other python errors
python tools/translated_converter.py --filename $directory/$resource
python_error_level=$? # catch python error level
@@ -110,7 +110,7 @@ do
errors[$directory/$resource]=50
fi
fi
- if [ -f $directory/$resource.po ] && [ -z $difference ]; then # update po file if it exists
+ if [ -f "$directory/$resource.po" ] && [ -z $difference ]; then # update po file if it exists
# msgfmt --statistics --verbose -c $directory/$resource.po -o /dev/null # usefull for debuging (msgctxt "/web/en/ or msgctxt "en/)
echo merging $directory/$resource.po
msgmerge --quiet --no-wrap $directory/$resource.po ./langs/en/$resource.pot --output-file=$directory/$resource.tmp
@@ -118,7 +118,7 @@ do
if [ $msgmerge_error_level -gt 0 ]; then
errors[$directory/$resource]=60
echo "$directory"/$resource.po could not be created succesfully
- if [ -f $tr_file.tmp ]; then
+ if [ -f "$tr_file.tmp" ]; then
rm $directory/$resource.tmp
fi
else