-
Notifications
You must be signed in to change notification settings - Fork 13
68 lines (66 loc) · 1.83 KB
/
Copy pathlocalization.yml
File metadata and controls
68 lines (66 loc) · 1.83 KB
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
58
59
60
61
62
63
64
65
66
67
68
name: "localization"
on:
workflow_call:
inputs:
branch_name:
type: string
description: "Branch name"
default: "master"
secrets:
CROWDIN_TOKEN:
required: true
description: "Crowdin personal API token"
CROWDIN_PROJECT_ID:
required: true
description: "Crowdin project ID"
jobs:
generate_pot:
runs-on: windows-latest
env:
UV_NO_DEV: true
permissions:
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v6
- name: setup uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --frozen --group build
- name: build POT file
run: uv run setup.py extract_messages
- name: upload POT file
uses: actions/upload-artifact@v7
with:
name: basiliskLLM.pot
path: basiliskLLM.pot
if-no-files-found: error
retention-days: 30
archive: false
upload_on_crowdin:
runs-on: ubuntu-latest
needs: [generate_pot]
if: ${{ inputs.branch_name == 'master' }}
permissions:
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v6
- name: download translations template artifact
uses: actions/download-artifact@v8
with:
name: basiliskLLM.pot
path: ./translations
- name: move translations template
run: |
mv translations/basiliskLLM.pot .
rm -rf translations
- name: upload on crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: true
config: "./crowdin.yml"
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}