-
Notifications
You must be signed in to change notification settings - Fork 157
57 lines (48 loc) · 1.74 KB
/
crowdin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This action synchronizes translations with Crowdin:
# - new source strings from en_us.json are uploaded
# - new translations added in Crowdin are downloaded
# - if translations were downloaded a pull request is created
#
# Adding a new branch:
# - add branch to matrix
# - manually run the action once to initialize the new branch on Crowdin
# - make sure Crowdin knows about the new branch
name: Crowdin
# can be run manually
# also automatically runs once a week (only on the default branch)
on:
workflow_dispatch: ~
schedule:
- cron: 1 2 * * 3 # At 02:01 on Wednesday.
jobs:
crowdin:
runs-on: ubuntu-22.04
strategy:
max-parallel: 1
matrix:
branch: ["1.17", "1.18", "1.19", "1.19.3", "1.19.4"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- uses: crowdin/github-action@master
with:
upload_sources: true
download_translations: true
# skip_untranslated_strings: true
source: src/main/resources/assets/modmenu/lang/en_us.json
translation: src/main/resources/assets/modmenu/lang/%locale%.json
# locale/language mappings must be added in Crowdin
# see https://github.com/jackassmc/minecraft-crowdin-languages
crowdin_branch_name: ${{ matrix.branch }}
localization_branch_name: l10n_${{ matrix.branch }}
pull_request_base_branch_name: ${{ matrix.branch }}
pull_request_title: Update ${{ matrix.branch }} translations
commit_message: |
Update ${{ matrix.branch }} translations
- Updated translations
project_id: 520764
token: ${{ secrets.CROWDIN_TOKEN }}
skip_ref_checkout: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}