changeset b318bc615755 in tryton-tools:default
details: https://hg.tryton.org/tryton-tools?cmd=changeset;node=b318bc615755
description:
        Add script to add new language to weblate repository
diffstat:

 weblate_add_language |  16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r c17cb927fc6b -r b318bc615755 weblate_add_language
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/weblate_add_language      Mon Jul 08 16:49:04 2019 +0200
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+language=$1
+for template in templates/*.pot; do
+    template=`basename ${template%.*}`
+    if [ $template == 'sao' ]; then
+        cp templates/$template.pot sao/locale/$language.po
+    elif [ $template == 'tryton' ]; then
+        mkdir -p tryton/tryton/data/locale/$language/LC_MESSAGES/
+        cp templates/$template.pot 
tryton/tryton/data/locale/$language/LC_MESSAGES/tryton.po
+    elif [ $template == 'ir' -o $template == 'res' ]; then
+        cp templates/$template.pot 
trytond/trytond/$template/locale/$language.po
+    else
+        cp templates/$template.pot modules/$template/locale/$language.po
+    fi
+done

Reply via email to