Skip to content

Commit

Permalink
CATTY-639 Migrate to Crowdin API v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wallisch committed Oct 18, 2024
1 parent 38e1d65 commit eee0f87
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/scheduled-upload-crowdin.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/synchronize-crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: synchronize-crowdin

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
push:
branches:
- "CATTY-639"

jobs:
SynchronizeCrowdin:
if: github.repository == 'Catrobat/Catty'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Synchronize Crowdin Translations
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: true
config: 'src/crowdin.yml'
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_labels: 'translations'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
14 changes: 14 additions & 0 deletions src/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "Catty/Resources/Localization"

"preserve_hierarchy": true

"files": [
{
"source": "en.lproj/Localizable.strings",
"dest": "catty/Localizable.strings",
"translation": "%osx_code%/%original_file_name%",
"update_option": "update_as_unapproved"
}
]

0 comments on commit eee0f87

Please sign in to comment.