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

Prayge5 #530

Merged
merged 2 commits into from
Oct 21, 2023
Merged
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
58 changes: 35 additions & 23 deletions .github/workflows/translate_branch_update.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
name: Update translate branch
name: Update translation branch

on:
workflow_dispatch:
push:
branches: ['master']

jobs:
add_translation:
update_translation:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
name: 'Update old translation'

steps:
- name: 'Update Branch'
uses: actions/checkout@v4

- name: Create temporary branch
run: |
git branch -f translate_tmp
git checkout translate_tmp
git reset --hard origin/master
- name: Apply existing translation
run: |
git fetch origin translate
git checkout origin/translate -- ./tools/translator/ss220replace.json
./tools/translator/ss220_replacer_linux --prefix=ss220 --root=./../../ --location=./
- name: 'Push Translation'
run: |
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push -u -f origin translate
- name: 'Update Branch'
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Installing Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Installing deps
run: |
python -m pip install --upgrade pip
pip install -r ./tools/translator/requirements.txt
- name: Create temporary branch
run: |
git checkout -b translate_tmp
git reset --hard origin/master
- name: Apply existing translation
run: |
git fetch origin translate
git checkout origin/translate -- ./tools/translator/ss220replace.json
./tools/translator/ss220_replacer_linux --prefix=ss220 --root=./../../ --location=./
- name: 'Push Translation'
run: |
git config --local user.email "[email protected]"
git config --local user.name "SS220Manager"
git commit -m "Generate translation file"
git push -f origin translate_tmp:translate
Loading