diff options
author | Jan Darmochwal | 2010-10-06 01:35:05 +0200 |
---|---|---|
committer | Jan Darmochwal | 2010-10-06 01:35:05 +0200 |
commit | bf7453843683494b81dd70232a2093577db34289 (patch) | |
tree | fed26399810a9fa58b974c3d71a72e0c19cab74d /build.sh | |
parent | highlight previous session (diff) | |
download | vmchooser-bf7453843683494b81dd70232a2093577db34289.tar.gz vmchooser-bf7453843683494b81dd70232a2093577db34289.tar.xz vmchooser-bf7453843683494b81dd70232a2093577db34289.zip |
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
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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" |