forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(actions): Update translations automatically
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | ||
|
||
name: Update Translations | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
branch: ["main", "2.4", "2.5"] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.1.7 | ||
with: | ||
ref: ${{ matrix.branch }} | ||
|
||
- name: Install Dependencies | ||
run: sudo apt-get install -y --no-install-recommends -- qt6-l10n-tools | ||
|
||
- name: Install transifex client | ||
run: curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash | ||
|
||
- name: Pull translations | ||
run: ./tx pull -a -f --minimum-perc 1 | ||
env: | ||
TX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }} | ||
|
||
- name: Compile translations | ||
run: for XX in res/translations/mixxx_*.ts; do /usr/lib/qt6/bin/lrelease -nounfinished $XX -qm ${XX/%.ts/.qm}; done | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
branch: pull-translations/${{ matrix.branch }} | ||
commit-message: |- | ||
Pull Transifex translations for ${{ matrix.branch }} | ||
This pulls the latest translations from the ${{ matrix.branch}} on Transifex | ||
and compiles the TS files into QM files using Qt's Linguist tool chain. | ||
URL: https://www.transifex.com/mixxx-dj-software/mixxxdj/${{ matrix.branch }}/ | ||
title: Pull Transifex translations for ${{ matrix.branch }} | ||
body: |- | ||
This pulls the latest translations from the ${{ matrix.branch}} on Transifex | ||
and compiles the TS files into QM files using Qt's Linguist tool chain. | ||
URL: https://www.transifex.com/mixxx-dj-software/mixxxdj/${{ matrix.branch }}/ | ||
labels: translations |