File tree Expand file tree Collapse file tree 1 file changed +73
-0
lines changed Expand file tree Collapse file tree 1 file changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test translations
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ paths :
7
+ - ' **.po'
8
+ branches :
9
+ - translation/source
10
+ push :
11
+ paths :
12
+ - ' **.po'
13
+ branches :
14
+ - translation/source
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ concurrency :
20
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
21
+ cancel-in-progress : true
22
+
23
+ env :
24
+ I18N_BRANCH : translation/source
25
+
26
+ jobs :
27
+ matrix :
28
+ runs-on : ubuntu-latest
29
+ outputs :
30
+ languages : ${{ steps.languages.outputs.languages }}
31
+
32
+ steps :
33
+ - name : Grab the repo src
34
+ uses : actions/checkout@v4
35
+ with :
36
+ ref : ${{ env.I18N_BRANCH }}
37
+
38
+ - name : List languages
39
+ id : languages
40
+ working-directory : locales
41
+ run : |
42
+ list=$(find * -maxdepth 0 -type d | jq -nRc '[inputs]')
43
+ echo "languages=$list" >> $GITHUB_OUTPUT
44
+
45
+
46
+ test-translation :
47
+ runs-on : ubuntu-latest
48
+ needs : matrix
49
+ strategy :
50
+ fail-fast : false
51
+ matrix :
52
+ language : ${{fromJson(needs.matrix.outputs.languages)}}
53
+
54
+ steps :
55
+ - name : Grab the repo src
56
+ uses : actions/checkout@v4
57
+ with :
58
+ ref : ${{ env.I18N_BRANCH }}
59
+
60
+ - name : Set up Python
61
+ uses : actions/setup-python@v4
62
+ with :
63
+ python-version : >-
64
+ 3.10
65
+
66
+ - name : Install Python tooling
67
+ run : python -m pip install --upgrade nox virtualenv sphinx-lint
68
+
69
+ - name : Build translated docs in ${{ matrix.language }}
70
+ run : nox -s build -- -q -D language=${{ matrix.language }}
71
+
72
+ - name : Lint translation file
73
+ run : sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po
You can’t perform that action at this time.
0 commit comments