From 07c5d428c1be238f986d91de4b621c3e9f8b7cef Mon Sep 17 00:00:00 2001 From: Lainow Date: Tue, 20 Aug 2024 10:07:06 +0200 Subject: [PATCH 1/6] 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 From 6d72948205752bcc0a7791cc5fdf0ed6eab2ed3d Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:21:09 +0200 Subject: [PATCH 2/6] Apply suggestions from code review Co-authored-by: Stanislas --- .tx/config | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.tx/config b/.tx/config index e52b1e22..c3754c94 100644 --- a/.tx/config +++ b/.tx/config @@ -5,7 +5,4 @@ lang_map = es_ES: es-rES, ar_SA: ar-rSA, it_IT: it-rIT, eu_ES: eu-rES, fr_FR: fr [o:teclib:p:glpi-project-plugin-escalade:r:escalade-pot] file_filter = locales/.po source_file = locales/escalade.pot -source_lang = en -type = PO -replace_edited_strings = false -keep_translations = false +source_lang = en_GB From 44aeaed2710e3b9c936ce3ab682865bc98a7c931 Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:40:18 +0200 Subject: [PATCH 3/6] Update .github/workflows/deploy-alpha.yml Co-authored-by: Stanislas --- .github/workflows/deploy-alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-alpha.yml b/.github/workflows/deploy-alpha.yml index 852e3745..a3c3d4fb 100644 --- a/.github/workflows/deploy-alpha.yml +++ b/.github/workflows/deploy-alpha.yml @@ -1,4 +1,4 @@ -name: Escalade Deploy Alpha +name: "Transifex" env: module_app: app From b18d5123a6c06e6d4d3103280b4cea34311a02d6 Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:40:23 +0200 Subject: [PATCH 4/6] Update .github/workflows/deploy-alpha.yml Co-authored-by: Stanislas --- .github/workflows/deploy-alpha.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy-alpha.yml b/.github/workflows/deploy-alpha.yml index a3c3d4fb..e68b34e1 100644 --- a/.github/workflows/deploy-alpha.yml +++ b/.github/workflows/deploy-alpha.yml @@ -1,8 +1,5 @@ name: "Transifex" -env: - module_app: app - on: push: branches: From 96edcee6e8476ede288a961bb6b1ef17ca9f9993 Mon Sep 17 00:00:00 2001 From: Lainow Date: Wed, 21 Aug 2024 16:44:35 +0200 Subject: [PATCH 5/6] Add suggestions --- .tx/config | 1 - 1 file changed, 1 deletion(-) diff --git a/.tx/config b/.tx/config index c3754c94..539d5b0d 100644 --- a/.tx/config +++ b/.tx/config @@ -1,6 +1,5 @@ [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 From 474bfa9cfd9a8e0030f6cb1034f51dac0b5f21ae Mon Sep 17 00:00:00 2001 From: Lainow Date: Mon, 26 Aug 2024 13:43:41 +0200 Subject: [PATCH 6/6] Change deploy-alpha to translate --- .github/workflows/deploy-alpha.yml | 47 ------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 .github/workflows/deploy-alpha.yml diff --git a/.github/workflows/deploy-alpha.yml b/.github/workflows/deploy-alpha.yml deleted file mode 100644 index e68b34e1..00000000 --- a/.github/workflows/deploy-alpha.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Transifex" - -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