diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-03-29 00:21:38 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-03-29 00:21:38 +0100 |
commit | 9af2a171f5c49a435ca19a996583f6130ec1dee8 (patch) | |
tree | 5b68399e6d8797181e8f639c22f6186fb13807d2 /scripts/Messages.sh | |
parent | Revert "Revert "pedantic"" (diff) | |
download | rekonq-9af2a171f5c49a435ca19a996583f6130ec1dee8.tar.xz |
imported Avaddon clone (just some bits)
Diffstat (limited to 'scripts/Messages.sh')
-rwxr-xr-x | scripts/Messages.sh | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/scripts/Messages.sh b/scripts/Messages.sh index 09ce1214..e9b5444d 100755 --- a/scripts/Messages.sh +++ b/scripts/Messages.sh @@ -1,5 +1,41 @@ -# FIXME #! /usr/bin/env bash -$EXTRACTRC `find . -name \*.ui -o -name \*.rc -o -name \*.kcfg` >> rc.cpp -$XGETTEXT `find . -name \*.cpp` -o $podir/rekonq.pot + +BASEDIR="../src/" +PROJECT="rekonq" +BUGADDR="http://sourceforge.net/tracker/?group_id=252277&atid=1126949" +WDIR="../po/" + +cd ${BASEDIR} +echo "Preparing rc files" +find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list +xargs --arg-file=${WDIR}/rcfiles.list extractrc > ${WDIR}/rc.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 "rc.cpp" >> ${WDIR}/infiles.list +cd ${WDIR} +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; } +echo "Done extracting messages" + +echo "Merging translations" +catalogs=`find . -name '*.po'` +for cat in $catalogs; do + echo $cat + msgmerge -o $cat.new $cat ${PROJECT}.pot + mv $cat.new $cat +done +echo "Done merging translations" + +echo "Cleaning up" +cd ${WDIR} +rm rcfiles.list +rm infiles.list +rm rc.cpp +echo "Done" |