aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-03-10 22:17:22 +0000
committerFilip Komar <filip@mageia.org>2014-03-10 22:17:22 +0000
commit9ef7e0528a30575551f74a4d3d35961b8b2c0222 (patch)
treed009b533c3c124b23ec5ea253c7ef4aae612d644 /tools
parent0825f96fb0275ca9573aa819967c1136ce7cbce9 (diff)
downloadwww-9ef7e0528a30575551f74a4d3d35961b8b2c0222.tar
www-9ef7e0528a30575551f74a4d3d35961b8b2c0222.tar.gz
www-9ef7e0528a30575551f74a4d3d35961b8b2c0222.tar.bz2
www-9ef7e0528a30575551f74a4d3d35961b8b2c0222.tar.xz
www-9ef7e0528a30575551f74a4d3d35961b8b2c0222.zip
404 2nd page migrated to gettext system + small bugfix of toolchain needed
Diffstat (limited to 'tools')
-rwxr-xr-xtools/rebuild_gettext_catalogs.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/rebuild_gettext_catalogs.sh b/tools/rebuild_gettext_catalogs.sh
index 27c5115d3..93e78c8df 100755
--- a/tools/rebuild_gettext_catalogs.sh
+++ b/tools/rebuild_gettext_catalogs.sh
@@ -23,7 +23,7 @@ do
error_in_source=$php_source
errors[$php_source]=$php_sourc$php_error_level
if [ -f ./langs/en/$resource.pot ]; then # cut too long lines
- msgmerge --quiet ./langs/en/$resource.pot ./langs/en/$resource.pot > ./langs/en/$resource.tmp
+ msgmerge --quiet --no-wrap ./langs/en/$resource.pot ./langs/en/$resource.pot > ./langs/en/$resource.tmp
mv ./langs/en/$resource.tmp ./langs/en/$resource.pot
for directory in ./langs/*
@@ -32,6 +32,7 @@ do
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
+# 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
if [ $python_error_level -gt 0 ]; then
@@ -41,8 +42,9 @@ do
fi
if [ -f $directory/$resource.po ]; 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/)
- msgmerge --update --quiet $directory/$resource.po ./langs/en/$resource.pot
+ msgmerge --quiet --no-wrap $directory/$resource.po ./langs/en/$resource.pot > $directory/$resource.tmp
msgmerge_error_level=$? # catch msgmerge error level
+ mv $directory/$resource.tmp $directory/$resource.po
# msgfmt --statistics --verbose -c $directory/$resource.po -o /dev/null # usefull for debuging (msgctxt "/web/en/ or msgctxt "en/)
if [ $msgmerge_error_level -gt 0 ]; then
error=60