Skip to content

Commit

Permalink
Migrate update-translations.py to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzbawls committed Jun 17, 2019
1 parent 1558ff7 commit 70721b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/devtools/update-translations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
Expand All @@ -15,7 +15,6 @@
TODO:
- auto-add new translations to the build system according to the translation process
'''
from __future__ import division, print_function
import subprocess
import re
import sys
Expand All @@ -36,12 +35,12 @@ def check_at_repository_root():
if not os.path.exists('.git'):
print('No .git directory found')
print('Execute this script at the root of the repository', file=sys.stderr)
exit(1)
sys.exit(1)

def fetch_all_translations():
if subprocess.call([TX, 'pull', '-f', '-a']):
print('Error while fetching translations', file=sys.stderr)
exit(1)
sys.exit(1)

def find_format_specifiers(s):
'''Find all format specifiers in a string.'''
Expand Down Expand Up @@ -208,3 +207,4 @@ def postprocess_translations(reduce_diff_hacks=False):
check_at_repository_root()
fetch_all_translations()
postprocess_translations()

0 comments on commit 70721b4

Please sign in to comment.