Localazy Update Download #839
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
name: 'Localazy Update Download' | |
on: | |
schedule: | |
# https://crontab.guru/ | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
localization-update: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'flybywiresim' | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install Localazy CLI | |
run: npm install -g @localazy/cli | |
- name: Download flyPad Translations | |
run: cd fbw-common/src/systems/instruments/src/EFB/Localization && node build-flypad-translation.js | |
- name: Download A32NX locPak Translations | |
run: cd fbw-a32nx/src/localization && node build-locPak-translation.js | |
- name: Download A380X locPak Translations | |
run: cd fbw-a380x/src/localization && node build-locPak-translation.js | |
- name: Print git status | |
run: git status | |
- name: Create PR | |
uses: gr2m/create-or-update-pull-request-action@v1.x # Generate a PR or updates an existing PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: localazy-update # Specify branch that this action uses. | |
title: 'build: update FlyByWire localization' | |
body: > | |
This PR automatically downloads and updates the approved changes from Localazy translations for | |
the flyPadOS3 and the locPak files for persisting these changes in the repo. | |
Changes will be collected in this PR and this PR needs to be manually merged to master eventually. | |
Ask on Discord #localisation if you have questions about this. | |
labels: | | |
EFB, | |
i18n | |
path: fbw-common/src/systems/instruments/src/EFB/Localization | |
commit-message: 'automatically updated flyPad localization' | |
- uses: gr2m/create-or-update-pull-request-action@v1.x | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: localazy-update # Specify branch that this action uses. | |
path: fbw-a32nx/src/localization | |
commit-message: 'automatically updated A32NX locPak localization' | |
- uses: gr2m/create-or-update-pull-request-action@v1.x | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
branch: localazy-update # Specify branch that this action uses. | |
path: fbw-a380x/src/localization | |
commit-message: 'automatically updated A380X locPak localization' |