5
5
- cron : ' 0 6 * * *'
6
6
push :
7
7
branches : ['main']
8
+ pull_request :
9
+ branches : ['main']
8
10
workflow_dispatch :
9
11
10
12
jobs :
13
+
11
14
update-translation :
12
15
runs-on : ubuntu-latest
13
16
strategy :
14
- fail-fast : false
15
17
matrix :
16
18
version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
17
19
steps :
@@ -20,48 +22,74 @@ jobs:
20
22
access_token : ${{ secrets.GITHUB_TOKEN }}
21
23
- uses : actions/setup-python@master
22
24
with :
23
- python-version : 3
24
- - run : sudo apt-get install -y gettext
25
+ python-version : ' 3.12'
26
+ - run : sudo apt-get install -y gettext rsync
27
+ - run : pip install transifex-python six sphinx-intl blurb
25
28
- run : curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
26
29
working-directory : /usr/local/bin
27
- - run : pip install requests cogapp polib transifex-python sphinx-lint sphinx-intl blurb six
28
30
- uses : actions/checkout@master
29
31
with :
30
- ref : ${{ matrix.version }}
31
- - run : .github/scripts/manage_translation.py recreate_config
32
+ repository : python/cpython
33
+ ref : main
34
+ - run : make gettext
35
+ working-directory : ./Doc
36
+ - run : sphinx-intl create-txconfig
37
+ working-directory : ./Doc/build
38
+ - run : sphinx-intl update-txconfig-resources --transifex-organization-name python-doc --transifex-project-name python-newest -d . -p gettext
39
+ working-directory : ./Doc/build
32
40
env :
33
41
TX_TOKEN : ${{ secrets.TX_TOKEN }}
34
- - run : .github/scripts/manage_translation.py fetch_translations
42
+ - run : tx pull -l uk --force --skip
43
+ working-directory : ./Doc/build
35
44
env :
36
45
TX_TOKEN : ${{ secrets.TX_TOKEN }}
37
- -
run :
git config --local user.email [email protected]
38
- - run : git config --local user.name "GitHub Action's update-translation job"
39
- - run : git add .
40
- - run : git commit -m 'Update translation from Transifex' || true
46
+ - run : find -name "*.po" -exec msgcat --no-location -o {} {} \;
47
+ working-directory : ./Doc/build
48
+ - uses : actions/checkout@master
49
+ with :
50
+ ref : ${{ matrix.version }}
51
+ path : ./Doc/build/uk/LC_MESSAGES
52
+ - run : |
53
+ git config --local user.email [email protected]
54
+ git config --local user.name "GitHub Action's update-translation job"
55
+ git add -f .
56
+ git commit -m 'Update translation from Transifex' || true
57
+ working-directory: ./Doc/build/uk/LC_MESSAGES
41
58
- uses : ad-m/github-push-action@master
42
59
with :
43
60
branch : ${{ matrix.version }}
44
61
github_token : ${{ secrets.GITHUB_TOKEN }}
45
- - uses : peter-evans/repository-dispatch@main
62
+ directory : ./Doc/build/uk/LC_MESSAGES
63
+
64
+ lint-translation :
65
+ runs-on : ubuntu-latest
66
+ strategy :
67
+ matrix :
68
+ version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
69
+ needs : ['update-translation']
70
+ continue-on-error : true
71
+ steps :
72
+ - uses : actions/setup-python@master
46
73
with :
47
- python-version : 3
74
+ python-version : ' 3.12'
75
+ - run : pip install sphinx-lint
48
76
- uses : actions/checkout@master
49
77
with :
50
78
ref : ${{ matrix.version }}
51
79
-
uses :
rffontenelle/[email protected]
52
80
- run : sphinx-lint
81
+
53
82
build-translation :
54
83
runs-on : ubuntu-latest
55
84
strategy :
56
- fail-fast : false
57
85
matrix :
58
86
version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
59
87
format : [html, latex]
60
88
needs : ['update-translation']
61
89
steps :
62
90
- uses : actions/setup-python@master
63
91
with :
64
- python-version : 3.12 # pin for Sphinx 3.4.3 in 3.10 branch (see #63)
92
+ python-version : ' 3.12'
65
93
- uses : actions/checkout@master
66
94
with :
67
95
repository : python/cpython
@@ -75,16 +103,17 @@ jobs:
75
103
- run : git pull
76
104
working-directory : ./Doc/locales/uk/LC_MESSAGES
77
105
-
uses :
sphinx-doc/[email protected]
78
- - run : make -e SPHINXOPTS=" -D language='uk' -W --keep-going" ${{ matrix.format }}
106
+ - run : make -e SPHINXOPTS="-D language='uk' -D gettext_compact=0 --keep-going --color" SPHINXERRORHANDLING=" " ${{ matrix.format }}
79
107
working-directory : ./Doc
80
108
- uses : actions/upload-artifact@master
109
+ if : success() || failure()
81
110
with :
82
111
name : build-${{ matrix.version }}-${{ matrix.format }}
83
112
path : Doc/build/${{ matrix.format }}
113
+
84
114
output-pdf :
85
115
runs-on : ubuntu-latest
86
116
strategy :
87
- fail-fast : false
88
117
matrix :
89
118
version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
90
119
needs : ['build-translation']
94
123
name : build-${{ matrix.version }}-latex
95
124
- run : sudo apt-get update
96
125
- run : sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
97
- - run : make -i
126
+ - run : make
98
127
- uses : actions/upload-artifact@master
99
128
with :
100
129
name : build-${{ matrix.version }}-pdf
0 commit comments