[rkward-cvs] SF.net SVN: rkward: [2243] branches/KDE4_port/po/Messages.sh

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Nov 18 22:23:11 UTC 2007

Revision: 2243
Author:   tfry
Date:     2007-11-18 14:23:10 -0800 (Sun, 18 Nov 2007)

Log Message:
Message extraction/merging seems to work (mostly)

Modified Paths:

Modified: branches/KDE4_port/po/Messages.sh
--- branches/KDE4_port/po/Messages.sh	2007-11-18 21:57:16 UTC (rev 2242)
+++ branches/KDE4_port/po/Messages.sh	2007-11-18 22:23:10 UTC (rev 2243)
@@ -1,19 +1,39 @@
+BASEDIR="../rkward/"	# root of translatable sources
+PROJECT="rkward"	# project name
+WDIR=`pwd`		# working dir
-echo "Extracting messages"
+echo "Preparing rc files"
 cd ${BASEDIR}
-find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${DIR}/infiles.list
-cd ${DIR}
-xgettext -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 --files-from=infiles.list -D ${BASEDIR} -o rkward.pot
-rm infiles.list
+find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
+xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/extractedrc.cpp
+cd ${WDIR}
+echo "Done preparing rc files"
+echo "Extracting messages"
+cd ${BASEDIR}
+find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
+echo "extractedrc.cpp" >> ${WDIR}/infiles.list
+cd ${WDIR}
+xgettext -C -ci18n -ki18n -kki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 --files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot
+echo "Done extracting messages"
 echo "Merging translations"
 catalogs=`find . -name '*.po'`
 for cat in $catalogs; do
-  msgmerge -o $cat.new $cat rkward.pot
+  echo $cat
+  msgmerge -o $cat.new $cat ${PROJECT}.pot
   mv $cat.new $cat
\ No newline at end of file
+echo "Done merging translations"
+echo "Cleaning up"
+cd ${WDIR}
+rm rcfiles.list
+rm infiles.list
+rm extractedrc.cpp
+echo "Done"

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