@@ -23,28 +23,45 @@ jobs:
23
23
- uses : actions/setup-python@master
24
24
with :
25
25
python-version : 3
26
- - run : sudo apt-get install -y gettext
27
- - run : pip install transifex-python six
26
+ - run : sudo apt-get install -y gettext rsync
27
+ - run : pip install transifex-python six sphinx-intl blurb
28
28
- run : curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
29
29
working-directory : /usr/local/bin
30
30
- uses : actions/checkout@master
31
31
with :
32
- ref : ${{ matrix.version }}
33
- - run : .github/scripts/manage_translation.py recreate_config
32
+ repository : python/cpython
33
+ ref : main
34
+ path : cpython
35
+ - run : make gettext
36
+ working-directory : cpython/Doc
37
+ - run : sphinx-intl create-txconfig
38
+ working-directory : cpython/Doc/build
39
+ - run : sphinx-intl update-txconfig-resources --transifex-organization-name python-doc --transifex-project-name python-newest -d . -p gettext
40
+ working-directory : cpython/Doc/build
34
41
env :
35
42
TX_TOKEN : ${{ secrets.TX_TOKEN }}
36
- - run : .github/scripts/manage_translation.py fetch_translations
43
+ - run : tx pull -l uk --force --skip
44
+ working-directory : cpython/Doc/build
37
45
env :
38
46
TX_TOKEN : ${{ secrets.TX_TOKEN }}
39
47
- run : find -name "*.po" -exec msgcat --no-location -o {} {} \;
40
- -
run :
git config --local user.email [email protected]
41
- - run : git config --local user.name "GitHub Action's update-translation job"
42
- - run : git add .
43
- - run : git commit -m 'Update translation from Transifex' || true
48
+ working-directory : cpython/Doc/build
49
+ - uses : actions/checkout@master
50
+ with :
51
+ ref : ${{ matrix.version }}
52
+ path : python-docs-uk
53
+ - run : rsync -r --del --exclude .git --exclude Makefile cpython/Doc/build/uk/LC_MESSAGES/ python-docs-uk
54
+ - run : |
55
+ git config --local user.email [email protected]
56
+ git config --local user.name "GitHub Action's update-translation job"
57
+ git add .
58
+ git commit -m 'Update translation from Transifex' || true
59
+ working-directory: python-docs-uk
44
60
- uses : ad-m/github-push-action@master
45
61
with :
46
62
branch : ${{ matrix.version }}
47
63
github_token : ${{ secrets.GITHUB_TOKEN }}
64
+ directory : python-docs-uk
48
65
49
66
lint-translation :
50
67
runs-on : ubuntu-latest
@@ -88,10 +105,10 @@ jobs:
88
105
- run : git pull
89
106
working-directory : ./Doc/locales/uk/LC_MESSAGES
90
107
-
uses :
sphinx-doc/[email protected]
91
- - run : make -e SPHINXOPTS=" -D language='uk' -W --keep-going" ${{ matrix.format }}
108
+ - run : make -e SPHINXOPTS="--color -D language='uk' -W --keep-going" ${{ matrix.format }}
92
109
working-directory : ./Doc
93
- - run : make sphinx-lint
94
110
- uses : actions/upload-artifact@master
111
+ if : success() || failure()
95
112
with :
96
113
name : build-${{ matrix.version }}-${{ matrix.format }}
97
114
path : Doc/build/${{ matrix.format }}
@@ -108,7 +125,7 @@ jobs:
108
125
name : build-${{ matrix.version }}-latex
109
126
- run : sudo apt-get update
110
127
- run : sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
111
- - run : make -i
128
+ - run : make
112
129
- uses : actions/upload-artifact@master
113
130
with :
114
131
name : build-${{ matrix.version }}-pdf
0 commit comments