From 09ea89f19acd0a046909c4661a51fdcc7ca70d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Sat, 3 Nov 2018 11:38:44 +0100 Subject: [PATCH] add a helper scripts to export translations to XLIFFs --- .gitignore | 1 + scripts/download-xliffs.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 scripts/download-xliffs.sh diff --git a/.gitignore b/.gitignore index c76923df..655feaed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +xliffs/ /.env /dist/ /flow-typed/ diff --git a/scripts/download-xliffs.sh b/scripts/download-xliffs.sh new file mode 100755 index 00000000..62418211 --- /dev/null +++ b/scripts/download-xliffs.sh @@ -0,0 +1,17 @@ +#!/bin/sh + + +if [ -z "$CROWDIN_TOKEN" ]; then + echo "CROWDIN_TOKEN env required" >&2 + exit 1 +fi + +rm -rf xliffs +mkdir xliffs +cd xliffs + +for lang in fr es-ES zh-CN ja ko ru; do + curl "https://api.crowdin.com/api/project/ledger-wallet/export-file?file=develop/static/i18n/en/app.json&language=$lang&format=xliff&key=$CROWDIN_TOKEN" > en-$lang.xliff +done + +zip -r ledger-live-langs.zip *.xliff