diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-04-27 03:51:28 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-04-27 03:51:28 +0400 |
commit | b3cf94fb7b0ee16ddcd13629ceeb73eef2e1b79a (patch) | |
tree | 5a63ea8c1971e3a60080b010d96ecc28975f8fbc /scripts | |
parent | e562e92e7611c35c912fb9401bd047cb77f5b7c4 (diff) |
Add translation update script with transifex issue workaround (#1195)
Script will do an lupdate run on mumble_en.ts, apply the duplication
of numerus tags workaround for the transifex missing string issue
(see #1195) and then create a commit with the updated translation
file. This file - at least for now - is meant to be run manually.
Make sure to check the created commit before pushing.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/updatetranslations.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/updatetranslations.sh b/scripts/updatetranslations.sh new file mode 100755 index 000000000..2fa7c4864 --- /dev/null +++ b/scripts/updatetranslations.sh @@ -0,0 +1,23 @@ +#! /bin/bash +# Updates mumble_en.ts from source and adds a commit. +# Expects to be executed in src/mumble/ +file="mumble_en.ts" + +if ! [ -f $file ]; +then + echo "Could not find $file . Aborted." + exit 1 +fi; + +echo "Translation update" > commitmessage.tmp +echo "" >> commitmessage.tmp +lupdate -no-ui-lines -disable-heuristic similartext -locations relative -no-obsolete mumble.pro -ts $file | tee -a commitmessage.tmp + +# Duplicate single numerusform entries in mumble_en.ts to work around #1195 +perl -pi.bak -e 's!(^\s*)(<numerusform></numerusform>)$!\1\2\2!' $file + + +git commit -F commitmessage.tmp $file +rm commitmessage.tmp + +echo "Probably done. Please _manually_ check the commit before pushing" |