feat: update Chinese language and fix translate issue (#33) #66
This file contains hidden or 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
| # Copyright (C) 2005 - 2025 Settlers Freaks <sf-team at siedler25.org> | |
| # | |
| # SPDX-License-Identifier: GPL-2.0-or-later | |
| name: Synchronize with Launchpad | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| upload: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| venv_dir="/tmp/venv" | |
| python -m venv "$venv_dir" | |
| . $venv_dir/bin/activate | |
| echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV" | |
| echo "$venv_dir/bin" >> "$GITHUB_PATH" | |
| pip install Cython configobj 'pip<23.1' # Use a pip version that still allows the legacy installation for this breezy version | |
| pip install 'breezy[fastimport,git,launchpad]<3.3' # 3.3+ requires interactive login | |
| fastimport_dir=$venv_dir/lib/python*/site-packages/breezy/plugins/fastimport | |
| # Add missing import and use binary buffer of stdin for Python3 compat | |
| sed -i '1 i from breezy import controldir' $fastimport_dir/branch_updater.py | |
| sed -i 's/helpers.binary_stream(sys.stdin)/sys.stdin.buffer/' $fastimport_dir/cmds.py | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup SSH | |
| uses: MrSquaare/ssh-setup-action@v3 | |
| with: | |
| host: bazaar.launchpad.net | |
| private-key: ${{ secrets.LAUNCHPAD_PRIVATE_KEY }} | |
| - name: Synchronize bazaar and git | |
| run: | | |
| brz init-repo bzr-repo | |
| (cd "$GITHUB_WORKSPACE" && git fast-export -M --all) | (cd bzr-repo && brz fast-import -) | |
| - name: Login to launchpad | |
| run: brz launchpad-login ${{ secrets.LAUNCHPAD_USER }} | |
| - name: Upload to launchpad | |
| working-directory: bzr-repo/trunk | |
| run: brz push --overwrite lp:~s25rttrteam/s25rttr/s25rttr-languages |