From 626640786a57c375801befb59c2f8467b1e156be Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Wed, 1 Jul 2026 11:50:59 +0200 Subject: [PATCH] feat(i18n): update workflows for tx pull push --- .github/workflows/i18n-pull.yml | 36 +++++++++++++++++++++++++++++-- .github/workflows/i18n-push.yml | 38 ++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 7 deletions(-) diff --git a/.github/workflows/i18n-pull.yml b/.github/workflows/i18n-pull.yml index 69aa7fb9..0e5b720d 100644 --- a/.github/workflows/i18n-pull.yml +++ b/.github/workflows/i18n-pull.yml @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2023 Graz University of Technology. +# Copyright (C) 2026 KTH Royal Institute of Technology. # # React-Searchkit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -10,5 +11,36 @@ on: workflow_dispatch # manually trigger jobs: i18n-pull: - uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-pull-base.yml@master - secrets: inherit + runs-on: ubuntu-latest + env: + NODE-VERSION: 22 + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: ${{ env.NODE-VERSION }} + + - name: Install dependencies + run: npm ci + + - name: Pull translated files using transifex client + uses: transifex/cli-action@v2 + with: + token: ${{ secrets.TRANSIFEX_TOKEN }} + args: pull -a -f + + - name: Compile translation catalogs + run: npm run compile_catalog + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: "i18n: pulled translations" + title: "i18n: pulled translations" + body: "i18n: pulled translations" + branch: 101-translations-pull + delete-branch: true diff --git a/.github/workflows/i18n-push.yml b/.github/workflows/i18n-push.yml index 92bacf67..b0002f25 100644 --- a/.github/workflows/i18n-push.yml +++ b/.github/workflows/i18n-push.yml @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2023 Graz University of Technology. +# Copyright (C) 2026 KTH Royal Institute of Technology. # # React-Searchkit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -10,8 +11,35 @@ on: workflow_dispatch # manually trigger jobs: i18n-extract: - uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-push-base.yml@master - with: - extract-backend: false - frontend-package-path: "./" - secrets: inherit + runs-on: ubuntu-latest + env: + NODE-VERSION: 22 + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: ${{ env.NODE-VERSION }} + + - name: Extract frontend messages + run: | + npm ci + npm run extract_messages + + - name: Push source file using transifex client + uses: transifex/cli-action@v2 + with: + token: ${{ secrets.TRANSIFEX_TOKEN }} + args: push -s + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v8 + with: + commit-message: "i18n: push translations" + title: "i18n: push translations" + body: "i18n: push translations" + branch: 101-translations-push + delete-branch: true