Updating the Crowdin Workflow Configuration
This commit is contained in:
50
.github/workflows/crowdin.yml
vendored
50
.github/workflows/crowdin.yml
vendored
@@ -4,35 +4,37 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
- 'manager/app/src/main/res/**'
|
- 'manager/app/src/main/res/values/strings.xml'
|
||||||
|
- 'manager/app/src/main/res/values-*/strings.xml'
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
synchronize-with-crowdin:
|
synchronize-with-crowdin:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: crowdin action
|
- name: Crowdin Action
|
||||||
uses: crowdin/github-action@master
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
upload_sources: true
|
upload_sources: true
|
||||||
upload_translations: true
|
upload_translations: true
|
||||||
download_translations: true
|
auto_approve_imported: true
|
||||||
localization_branch_name: "Crowdin"
|
download_translations: true
|
||||||
crowdin_branch_name: "main"
|
skip_untranslated_files: false
|
||||||
create_pull_request: true
|
skip_untranslated_strings: true
|
||||||
pull_request_title: 'New Crowdin Translations'
|
|
||||||
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
|
|
||||||
pull_request_base_branch_name: 'main'
|
|
||||||
skip_untranslated_files: true
|
|
||||||
env:
|
|
||||||
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
|
|
||||||
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
|
create_pull_request: true
|
||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
localization_branch_name: "Crowdin"
|
||||||
|
pull_request_labels: 'enhancement, translation'
|
||||||
|
pull_request_title: 'opt: sync translation from Crowdin'
|
||||||
|
|
||||||
# Visit https://crowdin.com/settings#api-key to create this token
|
config: 'crowdin.yml'
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
crowdin_branch_name: "main"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
|
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
project_id_env: CROWDIN_PROJECT_ID
|
||||||
|
api_token_env: CROWDIN_API_TOKEN
|
||||||
|
preserve_hierarchy: 1
|
||||||
files:
|
files:
|
||||||
- source: /manager/app/src/main/res/values/strings.xml
|
- source: /manager/app/src/main/res/values/strings.xml
|
||||||
translation: /manager/app/src/main/res/values-%two_letters_code%/strings.xml
|
translation: /manager/app/src/main/res/values-%two_letters_code%/strings.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user