-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ELEMENTS-1429: add crowdin sync workflow
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Workflow that syncronizes translations from Crowdin | ||
name: Crowdin Sync | ||
|
||
on: | ||
# Check for updates every day | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
# Sync when a commit is done on maintenance-3.0.x | ||
push: | ||
branches: | ||
- maintenance-3.0.x | ||
paths: | ||
- 'ui/i18n/messages.json' | ||
|
||
jobs: | ||
crowdin: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Crowdin Action | ||
uses: crowdin/[email protected] | ||
with: | ||
# Tokens | ||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
# Load external configuration file (to support translation rename) | ||
config: crowdin-conf.yml | ||
|
||
# Upload sources for translation | ||
upload_sources: true | ||
|
||
# Auto-approve reference sentences we are pushing (english) | ||
auto_approve_imported: true | ||
|
||
# Name of the branch where to merge the translations | ||
localization_branch_name: maintenance-3.0.x | ||
|
||
# The commit message | ||
commit_message: 'Automatic update of translations from Crowdin' | ||
|
||
# Automatically download all the new translations | ||
download_translations: true | ||
|
||
# User properties | ||
github_user_name: nuxeo-web-ui-jx-bot | ||
github_user_email: [email protected] | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"preserve_hierarchy": true | ||
"files": [ | ||
{ | ||
"source": "/ui/i18n/messages.json", | ||
"translation": "/ui/i18n/messages-%two_letters_code%.json", | ||
"translation_replace": { | ||
"-es": "-es-ES", | ||
"-pt": "-pt-PT", | ||
"-sv": "-sv-SE", | ||
"-zh": "-zh-CN", | ||
}, | ||
"dest" : "/nuxeo-ui-elements/messages.json", | ||
} | ||
] |