Skip to content

Commit 91d7dbb

Browse files
author
Maciej Olko
committed
Fetch API key from file instead of environment variable, sync README, add .gitignore
1 parent 28d5593 commit 91d7dbb

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.tx/api-key
2+
.python-version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Polskie tłumaczenie dokumentacji Pythona
22
========================================
3-
![9.31% do language switchera](https://img.shields.io/badge/language_switcher-9.31%25-0.svg)
3+
![9.31% language switchera](https://img.shields.io/badge/language_switcher-9.31%25-0.svg)
44
![postęp tłumaczenia całości dokumentacji](https://img.shields.io/badge/dynamic/json.svg?label=całość&query=$.pl&url=http://gce.zhsj.me/python/newest)
55

66
Znalazłeś błąd lub masz sugestię?

manage_translations.py

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ def recreate_tx_config():
8282
def _get_resources():
8383
resources = []
8484
offset = 0
85+
with open('.tx/api-key') as f:
86+
transifex_api_key = f.read()
8587
while True:
8688
response = requests.get(
8789
f'https://api.transifex.com/organizations/python-doc/projects/{PROJECT_SLUG}/resources/',
8890
params={'language_code': LANGUAGE, 'offset': offset},
89-
auth=('api', getenv('TRANSIFEX_API_KEY')))
91+
auth=('api', transifex_api_key))
9092
response_list = response.json()
9193
resources.extend(response_list)
9294
if len(response_list) < 100:

0 commit comments

Comments
 (0)