From bf7453843683494b81dd70232a2093577db34289 Mon Sep 17 00:00:00 2001 From: Jan Darmochwal Date: Wed, 6 Oct 2010 01:35:05 +0200 Subject: i18n support and German translation Translation can be done with .ts-files in src/i18n/de.ts. The resulting .qm-files are stored as resources in the program binary. build.sh has a new option --update-translations that causes the .ts files to be updated --- build.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 69041c0..7a515e4 100755 --- a/build.sh +++ b/build.sh @@ -8,6 +8,20 @@ BUILDDIR="build" DIR=$(pwd) +for OPTION in "$@" +do + if [[ "$OPTION" == "--clean" ]] + then + rm -r "$BUILDDIR" + elif [[ "$OPTION" == "--update-translations" ]] + then + CMAKE_ARGS="$CMAKE_ARGS -DUPDATE_TRANSLATIONS:BOOL=ON" + else + echo "usage: $SCRIPTNAME [--clean] [--update-translations]" >&2 + exit 1 + fi +done + if [[ ! -f "$DIR"/"$SRCDIR"/CMakeLists.txt ]] then echo "$SRCDIR/CMakeLists.txt not found" >&2 @@ -26,6 +40,6 @@ fi mkdir -p "$BUILDDIR" cd "$BUILDDIR" -cmake "$DIR"/"$SRCDIR"/ && make clean && make -j $NCORES +cmake $CMAKE_ARGS "$DIR"/"$SRCDIR"/ && make -j $NCORES cd "$DIR" -- cgit v1.2.3-55-g7522