Update translation file generator scripts.

master
Torsten Paul 2014-12-04 23:20:25 +01:00
parent 2316a42759
commit 80f1a31143
5 changed files with 19 additions and 11 deletions

View File

@ -51,14 +51,14 @@ files.
Then run the script to scan the source files, and regenerate .pot & .po files.
$ ./scripts/translation-make.sh
$ ./scripts/translation-update.sh
This will create new .po files with any new untranslated strings you
added to the source code. These .po files can be distributed to
translators for translation. After the translated .po file is obtained,
overwrite the old .po and run the same script to update the .mo files.
$ ./scripts/translation-make.sh
$ ./scripts/translation-update.sh
To add a new language:
======================

View File

@ -486,6 +486,9 @@ isEmpty(PREFIX):PREFIX = /usr/local
target.path = $$PREFIX/bin/
INSTALLS += target
# Run translation update scripts as last step after linking the target
QMAKE_POST_LINK += $$PWD/scripts/translation-make.sh
# Create install targets for the languages defined in LINGUAS
LINGUAS = $$cat(locale/LINGUAS)
LOCALE_PREFIX = $$PREFIX/share/openscad/locale

View File

@ -280,6 +280,10 @@ if [[ $? != 0 ]]; then
exit 1
fi
echo "Updating language files..."
cd $OPENSCADDIR
./scripts/translation-update.sh
echo "Building test suite..."

View File

@ -3,19 +3,13 @@
# Script for use from qmake to generate the translation
# related files.
#
# Step 1) call generate-potfiles.sh to collect input files
# Step 2) call translation-update.sh to generate *.mo files
#
SCRIPTDIR="`dirname \"$0\"`"
TOPDIR="`dirname \"$SCRIPTDIR\"`"
cd "$TOPDIR"
cd "$TOPDIR" || exit 1
echo "Generating POTFILES..."
./scripts/generate-potfiles.sh > locale/POTFILES
echo "Updating translation files..."
./scripts/translation-update.sh
echo "Compiling language files..."
./scripts/translation-update.sh updatemo
echo "Done."

View File

@ -71,9 +71,16 @@ GETTEXT_PATH=""
# GETTEXT_PATH="$OPENSCAD_LIBRARIES/bin/"
#fi
SCRIPTDIR="`dirname \"$0\"`"
TOPDIR="`dirname \"$SCRIPTDIR\"`"
cd "$TOPDIR" || exit 1
if [ "x$1" = xupdatemo ]; then
updatemo
else
echo "Generating POTFILES..."
./scripts/generate-potfiles.sh > locale/POTFILES
updatepot && updatepo && updatemo
fi