1
1
#!/usr/bin/env python
2
2
#
3
- # This python file contains utility scripts to manage Python docs Polish translation.
3
+ # This python file contains utility scripts to manage Python docs Ukrainian translation.
4
4
# It has to be run inside the python-docs-uk git root directory.
5
5
#
6
6
# Inspired by django-docs-translations script by claudep.
20
20
import sys
21
21
22
22
LANGUAGE = 'uk'
23
-
23
+ RESOURCE_NAME_MAP = {'glossary_' : 'glossary' }
24
+ TX_ORGANISATION = 'python-doc'
25
+ TX_PROJECT = 'python-newest'
26
+ GH_ORGANISATION = 'python'
27
+ GH_PROJECT = 'python-docs-uk'
24
28
25
29
def fetch ():
26
30
"""
27
31
Fetch translations from Transifex, remove source lines.
28
32
"""
29
33
if call ("tx --version" , shell = True ) != 0 :
30
- sys .stderr .write ("The Transifex client app is required (pip install transifex-client ).\n " )
34
+ sys .stderr .write ("The Transifex client app is required (https://developers. transifex.com/docs/cli ).\n " )
31
35
exit (1 )
32
36
lang = LANGUAGE
33
37
pull_returncode = call (f'tx pull -l { lang } --minimum-perc=1 --force --skip' , shell = True )
@@ -41,11 +45,6 @@ def fetch():
41
45
call (f'msgcat --no-location -o { po_path } { po_path } ' , shell = True )
42
46
43
47
44
- RESOURCE_NAME_MAP = {'glossary_' : 'glossary' }
45
- TX_ORGANISATION = 'python-doc'
46
- TX_PROJECT = 'python-newest'
47
- GH_ORGANISATION = 'python'
48
-
49
48
def recreate_tx_config ():
50
49
"""
51
50
Regenerate Transifex client config for all resources.
@@ -144,13 +143,13 @@ def average(averages, weights):
144
143
f'''\
145
144
Український переклад документації Python
146
145
========================================
147
- 
146
+ 
148
147

149
148

150
149

151
150
152
151
Якщо ви знайшли помилку або маєте пропозицію,
153
- [додати issue](https://github.com/{ GH_ORGANISATION } /python-docs-uk /issues) у цьому проекті або запропонуйте зміни:
152
+ [додати issue](https://github.com/{ GH_ORGANISATION } /{ GH_PROJECT } /issues) у цьому проекті або запропонуйте зміни:
154
153
155
154
* Зареєструйтесь на платформі [Transifex](https://www.transifex.com/)
156
155
* Перейдіть на сторінку [документації Python](https://www.transifex.com/{ TX_ORGANISATION } /{ TX_PROJECT } /).
0 commit comments