From 07c5d428c1be238f986d91de4b621c3e9f8b7cef Mon Sep 17 00:00:00 2001 From: Lainow Date: Tue, 20 Aug 2024 10:07:06 +0200 Subject: [PATCH] Add Transifex to the CI --- .github/workflows/deploy-alpha.yml | 50 ++++++++++++++++++++++++++++++ .gitignore | 2 +- .tx/config | 7 +++-- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy-alpha.yml diff --git a/.github/workflows/deploy-alpha.yml b/.github/workflows/deploy-alpha.yml new file mode 100644 index 00000000..852e3745 --- /dev/null +++ b/.github/workflows/deploy-alpha.yml @@ -0,0 +1,50 @@ +name: Escalade Deploy Alpha + +env: + module_app: app + +on: + push: + branches: + - "main" + tags: + - "*" + pull_request: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: main + fetch-depth: 0 #To Fetch All Tags and Branches + + - name: Install Dependencies + uses: php-actions/composer@v6 + with: + dev: no + + ########################################## + # Push / Pull translation files # + ########################################## + # Push Transifex + - name: Push source file using transifex client + uses: transifex/cli-action@v2 + with: + args: push + token: ${{ secrets.TX_TOKEN }} + + # Clean Transifex CLI + - name: Clean Transifex CLI + run: rm -fr /tmp/tx + + # Pull from Transifex + - name: Pull source file using transifex client + uses: transifex/cli-action@v2 + with: + args: pull + token: ${{ secrets.TX_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f0331232..4caec924 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ dist/ vendor/ .gh_token *.min.* - +.phpunit.result.cache diff --git a/.tx/config b/.tx/config index e3f51109..e52b1e22 100644 --- a/.tx/config +++ b/.tx/config @@ -1,8 +1,11 @@ [main] host = https://www.transifex.com +lang_map = es_ES: es-rES, ar_SA: ar-rSA, it_IT: it-rIT, eu_ES: eu-rES, fr_FR: fr-rFR, he_IL: he-rIL, pl_PL: pl-rPL, es_AR: es-rAR, th_TH: th-rTH, pt_BR: pt-rBR, fr: fr, gl_ES: gl-rES, es: es, zh_CN: zh-rCN, ja: ja, ja_JP: ja-rJP, nl_NL: nl-rNL, ko_KR: ko-rKR, cs_CZ: cs-rCZ, hi_IN: hi-rIN, es_MX: es-rMX, en_GB: en-rGB, ca_ES: ca-rES, de_DE: de-rDE, ru_RU: ru-rRU, hu_Hu: hu-rHU, ur_PK: ur-rPK, ar_EG: ar-rEG [o:teclib:p:glpi-project-plugin-escalade:r:escalade-pot] file_filter = locales/.po source_file = locales/escalade.pot -source_lang = en -type = PO +source_lang = en +type = PO +replace_edited_strings = false +keep_translations = false