11#!/usr/bin/env python
22#
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.
44# It has to be run inside the python-docs-uk git root directory.
55#
66# Inspired by django-docs-translations script by claudep.
2020import sys
2121
2222LANGUAGE = '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'
2428
2529def fetch ():
2630 """
2731 Fetch translations from Transifex, remove source lines.
2832 """
2933 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 " )
3135 exit (1 )
3236 lang = LANGUAGE
3337 pull_returncode = call (f'tx pull -l { lang } --minimum-perc=1 --force --skip' , shell = True )
@@ -41,11 +45,6 @@ def fetch():
4145 call (f'msgcat --no-location -o { po_path } { po_path } ' , shell = True )
4246
4347
44- RESOURCE_NAME_MAP = {'glossary_' : 'glossary' }
45- TX_ORGANISATION = 'python-doc'
46- TX_PROJECT = 'python-newest'
47- GH_ORGANISATION = 'python'
48-
4948def recreate_tx_config ():
5049 """
5150 Regenerate Transifex client config for all resources.
@@ -144,13 +143,13 @@ def average(averages, weights):
144143 f'''\
145144 Український переклад документації Python
146145========================================
147- 
146+ 
148147
149148
150149
151150
152151Якщо ви знайшли помилку або маєте пропозицію,
153- [додати issue](https://github.com/{ GH_ORGANISATION } /python-docs-uk /issues) у цьому проекті або запропонуйте зміни:
152+ [додати issue](https://github.com/{ GH_ORGANISATION } /{ GH_PROJECT } /issues) у цьому проекті або запропонуйте зміни:
154153
155154* Зареєструйтесь на платформі [Transifex](https://www.transifex.com/)
156155* Перейдіть на сторінку [документації Python](https://www.transifex.com/{ TX_ORGANISATION } /{ TX_PROJECT } /).
0 commit comments