Update French localization file #1676
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: Update French localization file | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */4 * * *' # every 4 hours | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
update-french: | |
name: Update French localization file | |
if: github.repository == 'Dymerz/StarCitizen-Localization' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
uses: chill-viking/[email protected] | |
with: | |
working_directory: tools/ini-utils | |
- name: Build ini-utils | |
working-directory: tools/ini-utils | |
run: npm run build | |
- name: Download global.ini from 'SPEED0U/StarCitizenTranslations' - AI translated | |
run: | | |
curl -o global.ini -L "https://raw.githubusercontent.com/SPEED0U/StarCitizenTranslations/main/french_(france)/global.ini" | |
mv global.ini speedou.ini | |
- name: Download global.ini from 'traduction.circuspes.fr' - Human translated | |
run: | | |
curl -o global.ini -L "https://traduction.circuspes.fr/download/global.ini" | |
mv global.ini circus.ini | |
- name: Validate "SPEED0U" file | |
run: node ./tools/ini-utils/dist/src/index.js validate "$GITHUB_WORKSPACE/data/Localization/english/global.ini" "$GITHUB_WORKSPACE/speedou.ini" | |
- name: Validate "traduction.circuspes.fr" file | |
run: node ./tools/ini-utils/dist/src/index.js validate "$GITHUB_WORKSPACE/data/Localization/english/global.ini" "$GITHUB_WORKSPACE/circus.ini" | |
- name: Merge INI files | |
run: node ./tools/ini-utils/dist/src/index.js merge "$GITHUB_WORKSPACE/data/Localization/english/global.ini" "$GITHUB_WORKSPACE/circus.ini" "$GITHUB_WORKSPACE/speedou.ini" "$GITHUB_WORKSPACE/data/Localization/french_(france)/global.ini" | |
- name: Create Pull Request | |
if: github.ref == 'refs/heads/main' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
add-paths: data/Localization/french_(france)/global.ini | |
commit-message: Update French localization 🇫🇷 | |
branch: feature/update-french | |
title: Update French localization 🇫🇷 | |
labels: french | |
delete-branch: true | |
assignees: Dymerz | |
draft: always-true |