[rkward-cvs] SF.net SVN: rkward:[3094] trunk/rkward/po/Messages.sh
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Sep 30 15:01:49 UTC 2010
Revision: 3094
http://rkward.svn.sourceforge.net/rkward/?rev=3094&view=rev
Author: tfry
Date: 2010-09-30 15:01:49 +0000 (Thu, 30 Sep 2010)
Log Message:
-----------
Add some failure protection to Messages.sh
Modified Paths:
--------------
trunk/rkward/po/Messages.sh
Modified: trunk/rkward/po/Messages.sh
===================================================================
--- trunk/rkward/po/Messages.sh 2010-09-29 20:46:45 UTC (rev 3093)
+++ trunk/rkward/po/Messages.sh 2010-09-30 15:01:49 UTC (rev 3094)
@@ -4,12 +4,20 @@
BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
WDIR=`pwd` # working dir
+check_error()
+{
+ if [ "$?" -ne "0" ]; then
+ echo "ERROR: ${1}"
+ exit 1
+ fi
+}
echo "Preparing rc files"
cd ${BASEDIR}
# we use simple sorting to make sure the lines don't jump around too much from system to system
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.cpp
+check_error "Failed to extract messages from rc files. Do you have extractrc installed?"
# additional string for KAboutData
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
@@ -26,7 +34,8 @@
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" \
- --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
+ --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot
+check_error "Failed to extract messages from source files. Do you have xgettext installed?"
echo "Done extracting messages"
@@ -35,6 +44,7 @@
for cat in $catalogs; do
echo $cat
msgmerge -o $cat.new $cat ${PROJECT}.pot
+ check_error "Failed to merge messages. Do you have msgmerge installed?"
mv $cat.new $cat
done
echo "Done merging translations"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list