[GRASS-SVN] r71124 - grass-addons/tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 23 12:29:14 PDT 2017
Author: neteler
Date: 2017-05-23 12:29:14 -0700 (Tue, 23 May 2017)
New Revision: 71124
Modified:
grass-addons/tools/transifex_merge.sh
Log:
transifex_merge.sh addon tool: fix some header entries in newly created files
Modified: grass-addons/tools/transifex_merge.sh
===================================================================
--- grass-addons/tools/transifex_merge.sh 2017-05-23 19:25:58 UTC (rev 71123)
+++ grass-addons/tools/transifex_merge.sh 2017-05-23 19:29:14 UTC (rev 71124)
@@ -39,7 +39,7 @@
for fil in `ls $NEWLIBPODIR`;
do
- # TODO: keep uppercase for pt_BR etc - rename in SVN
+ # TODO: keep uppercase for pt_BR etc - rename in SVN as needed
MYLANG=`echo $fil | sed 's+_translation++g'`
# fix undefined CHARSET in files pulled from transifex (grrr...)
sed "s+charset=CHARSET+charset=UTF-8+g" ${NEWLIBPODIR}${MYLANG}_translation > ${NEWLIBPODIR}${MYLANG}_translation_new
@@ -55,13 +55,17 @@
$MSGMERGE ${NEWLIBPODIR}${MYLANG}_translation_new.2 $POFILE -o $POFILE.2 && mv $POFILE.2 $POFILE && rm -f grasslibs_${MYLANG}.header
else
# update header for newly created files
- # TODO: missing Project-Id-Version, PO-Revision-Date, Last-Translator
+ # TODO: missing Last-Translator
POFILE=${NEWLIBPODIR}${MYLANG}_translation_new
sed -i "s+# SOME DESCRIPTIVE TITLE.+# Translation of grasslibs_${MYLANG}.po+g" $POFILE
sed -i "s+as the PACKAGE package+as the GRASS GIS package+g" $POFILE
sed -i "s+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER+# Copyright (C) 2017 GRASS Development Team+g" $POFILE
sed -i "s+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.+# transifex generated, 2017+g" $POFILE
cp $POFILE grasslibs_${MYLANG}.po
+ # fix some header entries in newly created files
+ sed -i "s+PACKAGE VERSION+grasslibs_${MYLANG}+g" grasslibs_${MYLANG}.po
+ TIMESTAMP=`date +"%Y-%m-%d %H:%M%z"`
+ sed -i "s/YEAR-MO-DA HO:MI+ZONE/$TIMESTAMP/g" grasslibs_${MYLANG}.po
fi
if [ -f grassmods_${MYLANG}.po ]; then
@@ -78,6 +82,10 @@
sed -i "s+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER+# Copyright (C) 2017 GRASS Development Team+g" $POFILE
sed -i "s+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.+# transifex generated, 2017+g" $POFILE
cp $POFILE grassmods_${MYLANG}.po
+ # fix some header entries in newly created files
+ sed -i "s+PACKAGE VERSION+grasslibs_${MYLANG}+g" grassmods_${MYLANG}.po
+ TIMESTAMP=`date +"%Y-%m-%d %H:%M%z"`
+ sed -i "s/YEAR-MO-DA HO:MI+ZONE/$TIMESTAMP/g" grassmods_${MYLANG}.po
fi
if [ -f grasswxpy_${MYLANG}.po ]; then
@@ -94,6 +102,10 @@
sed -i "s+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER+# Copyright (C) 2017 GRASS Development Team+g" $POFILE
sed -i "s+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.+# transifex generated, 2017+g" $POFILE
cp $POFILE grasswxpy_${MYLANG}.po
+ # fix some header entries in newly created files
+ sed -i "s+PACKAGE VERSION+grasslibs_${MYLANG}+g" grasswxpy_${MYLANG}.po
+ TIMESTAMP=`date +"%Y-%m-%d %H:%M%z"`
+ sed -i "s/YEAR-MO-DA HO:MI+ZONE/$TIMESTAMP/g" grasswxpy_${MYLANG}.po
fi
done
More information about the grass-commit
mailing list