Skip to content

Commit

Permalink
chore(Crowdin): Switch to GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Nov 11, 2023
1 parent e475785 commit 487fcc0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/sync-crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Crowdin Action

on:
push:
branches: [feat/i10n]

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v1
with:
config: crowdin.yml
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: feat/translations
create_pull_request: true
pull_request_title: "chore(i18n): Sync translations"
pull_request_body: "Sync translations from [Crowdin/ReVanced](https://crowdin.com/project/revanced)"
pull_request_base_branch_name: "feat/i10n"
commit_message: "chore(i18n): Sync translations"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
10 changes: 7 additions & 3 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
preserve_hierarchy: 1
project_id_env: "CROWDIN_PROJECT_ID"
api_token_env: "CROWDIN_PERSONAL_TOKEN"

preserve_hierarchy: true
files:
- source: /assets/i18n/en_US.json
translation: /assets/i18n/%locale_with_underscore%.json
- source: /assets/i18n/strings.i18n.json
translation: /assets/i18n/strings_%locale_with_underscore%.i18n.json
skip_untranslated_strings: true

0 comments on commit 487fcc0

Please sign in to comment.