mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
ci(crowdin): add config file, plural support
This commit is contained in:
parent
4fa78df4fd
commit
49a13ada59
2 changed files with 23 additions and 11 deletions
19
.github/crowdin.yml
vendored
Normal file
19
.github/crowdin.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
project_id_env: CROWDIN_PROJECT_ID
|
||||||
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
|
|
||||||
|
preserve_hierarchy: true
|
||||||
|
|
||||||
|
pull_request_title: 'chore(translation): sync translation with Crowdin'
|
||||||
|
commit_message: 'chore(translation): sync translation with Crowdin'
|
||||||
|
pull_request_labels: 'translation'
|
||||||
|
|
||||||
|
files: [
|
||||||
|
{
|
||||||
|
source: 'app/src/res/values/strings.xml',
|
||||||
|
translation: 'app/src/res/values-%android_code%/strings.xml'
|
||||||
|
}
|
||||||
|
{
|
||||||
|
source: 'app/src/res/values/plurals.xml',
|
||||||
|
translation: 'app/src/res/values-%android_code%/plurals.xml'
|
||||||
|
}
|
||||||
|
]
|
15
.github/workflows/crowdin.yml
vendored
15
.github/workflows/crowdin.yml
vendored
|
@ -7,34 +7,27 @@ on:
|
||||||
- "app/src/res/values/strings.xml"
|
- "app/src/res/values/strings.xml"
|
||||||
- ".github/workflows/crowdin.yml"
|
- ".github/workflows/crowdin.yml"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * 1"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
synchronize-with-crowdin:
|
synchronize-with-crowdin:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Crowdin action
|
- name: Crowdin action
|
||||||
uses: crowdin/github-action@v1
|
uses: crowdin/github-action@v1
|
||||||
# TODO: Move to Crowdin configuration file
|
|
||||||
with:
|
with:
|
||||||
|
config: ".github/crowdin.yml"
|
||||||
upload_sources: true
|
upload_sources: true
|
||||||
upload_translations: false
|
upload_translations: false
|
||||||
download_translations: true
|
download_translations: true
|
||||||
localization_branch_name: crowdin_translations
|
|
||||||
create_pull_request: true
|
create_pull_request: true
|
||||||
pull_request_title: 'chore(translation): sync translation with Crowdin'
|
localization_branch_name: "crowdin_translations"
|
||||||
pull_request_body: 'Lorem, foobarit:tm:!'
|
pull_request_base_branch_name: "dev"
|
||||||
pull_request_labels: 'translation'
|
|
||||||
pull_request_base_branch_name: 'dev'
|
|
||||||
# TODO: add plurals.xml
|
|
||||||
source: 'app/src/res/values/strings.xml'
|
|
||||||
translation: 'app/src/res/values-%android_code%/strings.xml'
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
|
|
Loading…
Reference in a new issue