summaryrefslogtreecommitdiffstats
path: root/i18n
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-15 22:24:21 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commit27ddddc0906388b726f3abaf8b54e02ea09590db (patch)
tree7d5037369f4c82942b83effaf623c8898371af0c /i18n
parent6ea4ba79139e5175a2c6c192ebdd01dd3529e29b (diff)
downloadmageiawelcome-27ddddc0906388b726f3abaf8b54e02ea09590db.tar
mageiawelcome-27ddddc0906388b726f3abaf8b54e02ea09590db.tar.gz
mageiawelcome-27ddddc0906388b726f3abaf8b54e02ea09590db.tar.bz2
mageiawelcome-27ddddc0906388b726f3abaf8b54e02ea09590db.tar.xz
mageiawelcome-27ddddc0906388b726f3abaf8b54e02ea09590db.zip
Update translation catalog, add script
Diffstat (limited to 'i18n')
-rw-r--r--i18n/update_translations.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/i18n/update_translations.sh b/i18n/update_translations.sh
new file mode 100644
index 0000000..5bd0140
--- /dev/null
+++ b/i18n/update_translations.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+POFILE=$1
+
+pylupdate5 qml/mageiawelcome.py -ts py.ts
+lupdate mageiawelcome.pro -ts qml.ts
+
+lconvert -i py.ts qml.ts -o po/mageiawelcome.pot
+
+rm -rf py.ts qml.ts mageiawelcome.ts
+
+if [[ $POFILE == "" ]]; then
+ for i in po/*.po
+ do
+ echo -n $i": "
+ msgmerge --backup=none --update $i po/mageiawelcome.pot && \
+ msgfmt -o /dev/null --statistics --check $i
+ pofile=${i#*/}
+ locale=${pofile%.*}
+ lconvert $i -o i18n/mageiawelcome_$locale.ts
+ done
+else
+ echo -n $1".po: "
+ msgmerge --backup=none --update po/$1.po po/mageiawelcome.pot && \
+ msgfmt -o /dev/null --statistics --check po/$1.po
+ lconvert po/$1.po -o i18n/mageiawelcome_$1.ts
+fi