electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 79edd2dbf1ad98ed255d85bace7b4622a1f4560e
parent c3e26a1e2b8b579c64f765d02e015df65e82934c
Author: Johann Bauer <bauerj@bauerj.eu>
Date:   Mon, 12 Mar 2018 16:58:05 +0100

Fix crowdin upload

Diffstat:
Mcontrib/make_locale | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/contrib/make_locale b/contrib/make_locale @@ -28,11 +28,11 @@ os.system(cmd) os.chdir('lib') crowdin_identifier = 'electrum' -crowdin_file_name = 'electrum-client/messages.pot' +crowdin_file_name = 'files[electrum-client/messages.pot]' locale_file_name = 'locale/messages.pot' crowdin_api_key = None -filename = '~/.crowdin_api_key' +filename = os.path.expanduser('~/.crowdin_api_key') if os.path.exists(filename): with open(filename) as f: crowdin_api_key = f.read().strip() @@ -44,13 +44,14 @@ if crowdin_api_key: # Push to Crowdin print('Push to Crowdin') url = ('https://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key) - with open(locale_file_name,'rb') as f: + with open(locale_file_name, 'rb') as f: files = {crowdin_file_name: f} - requests.request('POST', url, files=files) + response = requests.request('POST', url, files=files) + print("", "update-file:", "-"*20, response.text, "-"*20, sep="\n") # Build translations print('Build translations') - response = requests.request('GET', 'https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key).content - print(response) + response = requests.request('GET', 'https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key) + print("", "export:", "-" * 20, response.text, "-" * 20, sep="\n") # Download & unzip print('Download translations')