Skip to content

Translations update from Hosted Weblate #16

Translations update from Hosted Weblate

Translations update from Hosted Weblate #16

name: "Generate static data for locales"
on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "locales/**"
- "utils/i18n/*"
- .github/workflows/generate-static-locale-data.yml
pull_request:
paths:
- "locales/**"
- "utils/i18n/*"
- .github/workflows/generate-static-locale-data.yml
jobs:
generate-static-locale-data:
name: "Regenerate static locale data if applicable"
runs-on: "ubuntu-latest"
permissions:
contents: "write"
steps:
- uses: actions/checkout@v4
- name: "Set up python 3.13"
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "pip"
cache-dependency-path: "utils/i18n/requirements.txt"
- name: Install dependencies
run: pip install -r 'utils/i18n/requirements.txt'
- name: Generate locale data
run: python ./utils/i18n/generate.py
- name: Commit if applicable
if: github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Regenerate static locale data"
file_pattern: 'src/helpers/i18n_data.py'