Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test branch PR #78

Open
wants to merge 8 commits into
base: v0.21
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/export-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Export translations from prelude

on:
pull_request:
paths: [prelude.yaml]
push:
paths: [prelude.yaml]

jobs:
export:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m venv .venv
./.venv/bin/activate
pip install -r requirements.txt

- name: Run the export translations script
run: python scripts/export-translations.py

- name: Create patch containing changes
run: git diff > sync-translations.patch

- name: Record pull request head data
run: |
echo 'export PR_HEAD_URL="${{ github.event.pull_request.head.repo.clone_url }}"' > git_vars.sh
echo 'export PR_HEAD_REF="${{ github.event.pull_request.head.ref }}"' >> git_vars.sh
echo 'export COMMIT_MESSAGE="Export translations from prelude"' >> git_vars.sh
if: ${{ github.event_name == 'pull_request' }}

- name: Record push head data
run: |
echo 'export PR_HEAD_URL="${{ github.event.repository.clone_url }}"' > git_vars.sh
echo 'export PR_HEAD_REF="${{ github.event.ref }}"' >> git_vars.sh
echo 'export COMMIT_MESSAGE="Export translations from prelude"' >> git_vars.sh
if: ${{ github.event_name == 'push' }}

- name: Upload data
uses: actions/upload-artifact@v4
with:
name: sync-translations-data
path: |
sync-translations.patch
git_vars.sh
8 changes: 8 additions & 0 deletions prelude.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ common:
text: 'Si raccomanda di controllare la seguente compatibility patch compilation per questa mod: {0}'
- lang: ja
text: '次の互換性パッチを確認することをお勧めします: {0}'
- lang: ko
text: 'Bad Korean translation'
- lang: pl
text: 'Jest rekomendowane żebyś sprawdził następujące kompatybilności patchu kompilacji dla tego moda: {0}'
- lang: pt_BR
Expand All @@ -233,6 +235,12 @@ common:
- lang: uk_UA
text: 'Радимо переглянути наступну колекцію патчів сумісності для цього моду: {0}'

- &newMessageAnchor
type: say
content:
- lang: en
text: 'This is a test message. Modify prelude again'

- &compatPatchForX
type: say
content:
Expand Down