From 4a8f77a65c303463b7cf3629c6039d8f7ef83052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Wed, 24 Jan 2018 13:13:13 +0100 Subject: [PATCH] Added Transifex automation for localizations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Óscar García Amor --- .circleci/config.yml | 28 ++++++++++++++++++++++++++++ .tx/config | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .tx/config diff --git a/.circleci/config.yml b/.circleci/config.yml index fc710f6c..c2daf3ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,4 +38,32 @@ jobs: destination: reports - store_artifacts: path: build/reports/jacoco/jacocoFullReport/ + push_translations: + docker: + - image: circleci/python:3.6 + working_directory: ~/ultrasonic + steps: + - checkout + - run: + name: install transifex client + command: | + python -m venv ~/venv + . ~/venv/bin/activate + pip install transifex-client + - run: + name: configure transifex client + command: echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = '"${TRANSIFEX_PASSWORD}"$'\n' > ~/.transifexrc + - run: + name: push changes in translation files + command: | + . ~/venv/bin/activate + tx push -st +workflows: + version: 2 + build_and_push_translations: + jobs: + - build + - push_translations: + requires: + - build diff --git a/.tx/config b/.tx/config new file mode 100644 index 00000000..e17226d9 --- /dev/null +++ b/.tx/config @@ -0,0 +1,10 @@ +[main] +host = https://www.transifex.com +lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,sr:sr,he:iw,id:in,lt_LT:lt,km_KH:km-rKH,th_TH:th + +[ultrasonic.app] +file_filter = ultrasonic/src/main/res/values-/strings.xml +source_file = ultrasonic/src/main/res/values/strings.xml +source_lang = en +type = ANDROID +