aboutsummaryrefslogtreecommitdiffstats
path: root/po/update.sh
diff options
context:
space:
mode:
authorAndreas Hydén <ahyden@src.gnome.org>2000-05-08 22:16:46 +0800
committerAndreas Hydén <ahyden@src.gnome.org>2000-05-08 22:16:46 +0800
commit402be120bd746fb04673cada5bf793bc76c24cab (patch)
treef4a0eebe1cf92cfc0445b31c97ed03664bc82065 /po/update.sh
parent7c704ed2e9a2ddb7b5724ff8d5b54434d8ed4fef (diff)
downloadgsoc2013-evolution-402be120bd746fb04673cada5bf793bc76c24cab.tar.gz
gsoc2013-evolution-402be120bd746fb04673cada5bf793bc76c24cab.tar.zst
gsoc2013-evolution-402be120bd746fb04673cada5bf793bc76c24cab.zip
New update.sh script from Kenneth
svn path=/trunk/; revision=2919
Diffstat (limited to 'po/update.sh')
-rwxr-xr-xpo/update.sh37
1 files changed, 33 insertions, 4 deletions
diff --git a/po/update.sh b/po/update.sh
index 0f8d517b0d..d99d40e792 100755
--- a/po/update.sh
+++ b/po/update.sh
@@ -1,8 +1,37 @@
#!/bin/sh
-xgettext --default-domain=evolution --directory=.. \
+PACKAGE="evolution"
+
+if [ "x$1" = "x--help" ]; then
+
+echo Usage: ./update.sh langcode
+echo --help display this help and exit
+echo
+echo Examples of use:
+echo ./update.sh ----- just creates a new pot file from the source
+echo ./update.sh da -- created new pot file and updated the da.po file
+
+elif [ "x$1" = "x" ]; then
+
+xgettext --default-domain=$PACKAGE --directory=.. \
--add-comments --keyword=_ --keyword=N_ \
--files-from=./POTFILES.in \
-&& test ! -f evolution.po \
- || ( rm -f ./evolution.pot \
- && mv evolution.po ./evolution.pot )
+&& test ! -f $PACKAGE.po \
+ || ( rm -f ./$PACKAGE.pot \
+&& mv $PACKAGE.po ./$PACKAGE.pot );
+
+else
+
+xgettext --default-domain=gfloppy --directory=.. \
+ --add-comments --keyword=_ --keyword=N_ \
+ --files-from=./POTFILES.in \
+&& test ! -f $PACKAGE.po \
+ || ( rm -f ./PACKAGE.pot \
+&& mv $PACKAGE.po ./$PACKAGE.pot );
+
+echo Now merging $1.po with $PACKAGE.pot, and creating an updated $1.po
+
+mv $1.po $1.po.old && msgmerge $1.po.old $PACKAGE.pot -o $1.po \
+&& rm $1.po.old;
+
+fi;