-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
94 additions
and
809 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Download from crowdin | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 * * * * | ||
|
||
jobs: | ||
download: | ||
runs-on: ubuntu-latest | ||
# secrets cannot be accessed inside an `if` so this needs to be checked in separate job | ||
name: dowload | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: master | ||
|
||
- name: Install crowdin cli | ||
run: | | ||
wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add - | ||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list.d/crowdin.list | ||
sudo apt-get update && sudo apt-get install crowdin3 | ||
- name: Download translations | ||
shell: bash | ||
run: | | ||
crowdin download --all | ||
env: | ||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} | ||
|
||
# - uses: EndBug/add-and-commit@v9 | ||
# with: | ||
# message: "PO files updated." | ||
|
||
# - name: Create pull request | ||
# id: cpr_crowdin | ||
# uses: peter-evans/create-pull-request@v3 | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# commit-message: Crowdin translations download | ||
# title: "[Crowdin] Updated translation files" | ||
# body: | | ||
# Created by the [Crowdin download workflow](.github/workflows/crowdin_download.yml). | ||
# branch: "auto/crowdin" | ||
# author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
|
||
- name: create pull request | ||
run: gh pr create -B auto/crowdin -H master --title 'Update translations.' --body 'Created by Github action' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Upload to crowdin | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [master] | ||
paths: | ||
- "**.py" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
|
||
- name: Install crowdin cli | ||
run: | | ||
wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add - | ||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list.d/crowdin.list | ||
sudo apt-get update && sudo apt-get install crowdin3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
|
||
- name: babel extract (pot file generation) | ||
run: | | ||
pip install babel | ||
sh ./bin/pot-generation.sh | ||
- name: Upload sources | ||
shell: bash | ||
run: | | ||
crowdin upload | ||
env: | ||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
project_id: "532668" | ||
api_token_env: CROWDIN_API_KEY | ||
|
||
files: | ||
- source: /resources/locale/*.pot | ||
translation: /resources/locale/%locale%/LC_MESSAGES/%file_name%.po |
Binary file not shown.
Oops, something went wrong.