-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (44 loc) · 1.54 KB
/
crowdin_download.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
name: Crowdin Download
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
synchronize-with-crowdin:
name: Download translations from Crowdin
if: github.repository_owner == 'DHD2280'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate Crowdin Translators table
id: "contributors"
uses: andrii-bodnar/action-crowdin-contributors@v2
with:
contributors_per_line: 6
max_contributors: 50
image_size: 32
min_words_contributed: 1
files: ./docs/translators.md
crowdin_project_link: 'https://crowdin.com/project/oxygen-customizer/'
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Save translators
run:
printf '%s\n' '${{ steps.contributors.outputs.json_report }}' > ./app/src/main/assets/Misc/translators.json
- name: Download translations
uses: crowdin/github-action@v2
with:
upload_translations: false
upload_sources: false
download_translations: true
localization_branch_name: beta-localization
create_pull_request: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}