mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat: crowdin workflow
This commit is contained in:
parent
787e47f634
commit
0fc8e7cbc8
45
.github/workflows/crowdin.yml
vendored
Normal file
45
.github/workflows/crowdin.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Sync Crowdin translations
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "flutter"
|
||||||
|
paths:
|
||||||
|
- "assets/i18n/en_US.json"
|
||||||
|
- ".github/workflows/crowdin.yml"
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # daily
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-crowdin:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Crowdin
|
||||||
|
uses: crowdin/github-action@1.0.4
|
||||||
|
with:
|
||||||
|
config: crowdin.yml
|
||||||
|
upload_translations: true
|
||||||
|
download_translations: true
|
||||||
|
push_translations: true
|
||||||
|
create_pull_request: false
|
||||||
|
localization_branch_name: i18n_flutter
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
|
||||||
|
# commented due to Manager not being ready for the translated files to be in the main branch
|
||||||
|
# - name: GitHub is so dumb i just cant
|
||||||
|
# run: |
|
||||||
|
# sudo chmod -R ugo+rwX .
|
||||||
|
|
||||||
|
# - name: Merge
|
||||||
|
# run: |
|
||||||
|
# git checkout flutter
|
||||||
|
# git add *
|
||||||
|
# git merge i18n_flutter
|
||||||
|
# git push
|
10
crowdin.yml
10
crowdin.yml
@ -1,3 +1,9 @@
|
|||||||
|
project_id_env: CROWDIN_PROJECT_ID
|
||||||
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
|
|
||||||
|
commit_message: 'chore(i18n): sync translations'
|
||||||
|
|
||||||
|
preserve_hierarchy: true
|
||||||
files:
|
files:
|
||||||
- source: /assets/i18n/en_US.json
|
- source: assets/i18n/en_US.json
|
||||||
translation: /assets/i18n/%locale_with_underscore%.json
|
translation: assets/i18n/%locale_with_underscore%.json
|
Loading…
x
Reference in New Issue
Block a user