Skip to content

Commit

Permalink
fix: crowdin sync
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus8448 committed May 14, 2024
1 parent 2ab2313 commit 8a08484
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/crowdin_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Crowdin Translation Push

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'src/main/generated/assets/galacticraft/lang/en_us.json'

jobs:
crowdin_push:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Crowdin Push
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: false

source: 'src/main/generated/assets/galacticraft/lang/en_us.json'
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Crowdin Translation Sync

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
Sync:
crowdin_sync:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
Expand All @@ -14,20 +15,20 @@ jobs:
- name: Crowdin Sync
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_sources: false
upload_translations: false
download_translations: true

localization_branch_name: 'feat/lang/service'

create_pull_request: true
pull_request_title: 'feat: updated translations from crowdin'
pull_request_labels: 'priority: medium, status: ready for review, type: translation'
pull_request_labels: 'priority: low, status: ready for review, type: translation'
pull_request_base_branch_name: 'main'

source: 'src/main/generated/assets/galacticraft/lang/en_us.json'
translation: 'src/main/resources/assets/galacticraft/lang/%locale_with_underscore%.json'
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

0 comments on commit 8a08484

Please sign in to comment.