Skip to content

Commit 6ee30ea

Browse files
authored
Add action to upload messages file to Crowdin (#3121)
1 parent 402b732 commit 6ee30ea

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

.github/workflows/nightly.yml

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
with:
2828
debug_build: true
2929

30+
upload-translations:
31+
name: Upload translations
32+
needs: ci
33+
uses: ./.github/workflows/translations-upload.yml
34+
3035
release:
3136
name: Nightly release
3237
needs: ci

.github/workflows/translations-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
2424
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
2525
config: 'crowdin.yml'
26+
crowdin_branch_name: ${{ github.ref_name }}
2627

2728
upload_sources: false
2829
upload_translations: false
2930

3031
download_translations: true
31-
crowdin_branch_name: master
3232
download_translations_args: '-l ca -l da -l de -l es-ES -l eu -l fr -l gl -l hr -l hu -l id -l it -l ja -l ko -l lv -l nl -l pt-PT -l pt-BR -l pl -l ru -l sv-SE -l zh-CN -l zh-TW'
3333
localization_branch_name: update_translations_crowdin
3434
push_translations: true
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Translations upload to Crowdin
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
betaflight-messages-to-crowdin:
9+
name: Messages file to Crowdin
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Upload messages file
16+
uses: crowdin/[email protected]
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
21+
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
22+
config: 'crowdin.yml'
23+
crowdin_branch_name: ${{ github.ref_name }}
24+
25+
upload_sources: true
26+
upload_translations: false
27+
28+
download_translations: false
29+

crowdin.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# ID used by the upload action to Crowdin
2+
project_id_env: CROWDIN_PROJECT_ID
3+
api_token_env: CROWDIN_PERSONAL_TOKEN
4+
15
#
26
# Files configuration
37
#

0 commit comments

Comments
 (0)