Skip to content

Commit

Permalink
Chore: migrate crowdin to GHA (#2421)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Dec 3, 2023
1 parent 04ae39e commit 9afa40a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Crowdin Action

on:
workflow_dispatch:
schedule:
- cron: '2 */12 * * *'
push:
paths: [
'/public/locales/en/**',
]
branches: [ main ]

jobs:
synchronize-with-crowdin:
name: Crowdin Sync
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/github-action@v1
with:
upload_translations: false
download_translations: true
crowdin_branch_name: main
localization_branch_name: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
3 changes: 3 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
- source: /public/locales/en/*.json
translation: /public/locales/%osx_locale%/%original_file_name%

0 comments on commit 9afa40a

Please sign in to comment.