-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
159 additions
and
24 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,49 @@ | ||
name: Crowdin (Download Translations) | ||
|
||
on: | ||
workflow_dispatch: # Allow running manually | ||
schedule: | ||
# https://crontab.guru | ||
- cron: '0 */12 * * *' # Every 12 hours | ||
|
||
# Queue this workflow after others in the 'crowdin' group, to avoid concurrency issues. | ||
concurrency: | ||
group: crowdin | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
download_translations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download to PR | ||
uses: crowdin/github-action@v1 | ||
with: | ||
upload_sources: false | ||
upload_translations: false | ||
download_translations: true | ||
skip_untranslated_strings: true | ||
crowdin_branch_name: ${{ github.ref_name }} | ||
|
||
create_pull_request: true | ||
pull_request_title: Crowdin translations for ${{ github.ref_name }} | ||
pull_request_body: | | ||
New pull request with translations from [Crowdin](https://crowdin.com/project/freecam). | ||
Powered by [Crowdin's GitHub Action](https://github.com/crowdin/github-action). | ||
pull_request_labels: enhancement, i18n | ||
pull_request_base_branch_name: ${{ github.ref_name }} | ||
localization_branch_name: i18n/${{ github.ref_name }} | ||
commit_message: | | ||
i18n: New translations from Crowdin | ||
[skip ci] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_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,31 @@ | ||
name: Crowdin (Upload Sources) | ||
|
||
on: | ||
workflow_dispatch: # Allow running manually | ||
push: # Run when en_us is modified on the main branch | ||
branches: | ||
- main | ||
paths: | ||
- '**/lang/en_us.json' | ||
|
||
# Queue this workflow after others in the 'crowdin' group, to avoid concurrency issues. | ||
concurrency: | ||
group: crowdin | ||
|
||
jobs: | ||
upload_sources: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Upload Sources | ||
uses: crowdin/github-action@v1 | ||
with: | ||
upload_sources: true | ||
upload_translations: false | ||
download_translations: false | ||
crowdin_branch_name: ${{ github.ref_name }} | ||
env: | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_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,33 @@ | ||
name: Crowdin (Upload Translations) | ||
|
||
on: | ||
workflow_dispatch: # Allow running manually | ||
## (Disable automatic runs for now) | ||
# push: # Run when a non-en_us lang file is modified on the main branch | ||
# branches: | ||
# - main | ||
# paths: | ||
# - '**/lang/*.json' | ||
# - '!**/lang/en_us.json' | ||
|
||
# Queue this workflow after others in the 'crowdin' group, to avoid concurrency issues. | ||
concurrency: | ||
group: crowdin | ||
|
||
jobs: | ||
upload_translations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Upload Translations | ||
uses: crowdin/github-action@v1 | ||
with: | ||
upload_sources: false | ||
upload_translations: true | ||
download_translations: false | ||
crowdin_branch_name: ${{ github.ref_name }} | ||
env: | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_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
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
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
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 @@ | ||
project_id_env: CROWDIN_PROJECT_ID | ||
api_token_env: CROWDIN_PERSONAL_TOKEN | ||
preserve_hierarchy: true | ||
|
||
files: | ||
- source: '/**/lang/en_us.json' | ||
translation: '/**/lang/%locale%.json' | ||
languages_mapping: | ||
locale: | ||
# Valid keys: https://developer.crowdin.com/language-codes | ||
# Valid values ("in-game" locale column): https://minecraft.wiki/w/Language | ||
it: it_it | ||
ja: ja_jp | ||
zh-CN: zh_cn |