Added Transifex automation for localizations

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
This commit is contained in:
Óscar García Amor 2018-01-24 13:13:13 +01:00
parent bff6d8d032
commit 4a8f77a65c
2 changed files with 38 additions and 0 deletions

View File

@ -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

10
.tx/config Normal file
View File

@ -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-<lang>/strings.xml
source_file = ultrasonic/src/main/res/values/strings.xml
source_lang = en
type = ANDROID