-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from ExpressLRS/crowdin-integration
Add crowdin.com integration
- Loading branch information
Showing
8 changed files
with
142 additions
and
17 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,46 @@ | ||
name: Translations download and PR | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '00 3 * * 1' | ||
|
||
|
||
|
||
jobs: | ||
crowdin-translations-to-pr: | ||
name: Create a PR with the latest translations from Crowdin | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download Crowdin translations and create Pull Request | ||
uses: crowdin/github-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
config: 'crowdin.yml' | ||
crowdin_branch_name: ${{ github.ref_name }} | ||
|
||
upload_sources: false | ||
upload_translations: false | ||
|
||
download_translations: true | ||
download_translations_args: '-l zh-CN' | ||
localization_branch_name: update-translations-crowdin | ||
push_translations: true | ||
commit_message: 'Update translations' | ||
|
||
create_pull_request: true | ||
pull_request_title: 'Update translations' | ||
pull_request_body: | | ||
**This is an automated PR.** | ||
This PR updates the translations using the content from Crowdin. Thanks to all the translators for the really hard work!!! | ||
If you want to help to make the localization better, or add a new language, go to [Crowdin](https://crowdin.com/project/expresslrs-configurator/) and start helping!. | ||
[crowdin.com/expresslrs-configurator](https://crowdin.com/project/expresslrs-configurator/) |
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,34 @@ | ||
name: Upload translation keys to Crowdin | ||
|
||
concurrency: upload-crowdin | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'locales/en/**' | ||
|
||
jobs: | ||
upload-message-keys-to-crowdin: | ||
name: Messages file to Crowdin | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Upload messages file | ||
uses: crowdin/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
config: 'crowdin.yml' | ||
crowdin_branch_name: ${{ github.ref_name }} | ||
|
||
upload_sources: true | ||
upload_translations: false | ||
|
||
download_translations: false |
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 |
---|---|---|
|
@@ -55,3 +55,4 @@ npm-debug.log.* | |
/src/api/src/services/BinaryFlashingStrategy/firmware | ||
__pycache__ | ||
r2 | ||
crowdin_env.sh |
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
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,13 @@ | ||
project_id_env: CROWDIN_PROJECT_ID | ||
api_token_env: CROWDIN_PERSONAL_TOKEN | ||
"base_path": "." | ||
"base_url": "https://api.crowdin.com" | ||
|
||
"preserve_hierarchy": true | ||
|
||
files: [ | ||
{ | ||
"source": "/src/i18n/locales/en/messages.json", | ||
"translation": "/src/i18n/locales/%two_letters_code%/%original_file_name%", | ||
} | ||
] |
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
File renamed without changes.
File renamed without changes.