summaryrefslogtreecommitdiffstats
path: root/gen_web_gettext.py
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2016-11-13 15:09:30 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2016-11-17 10:19:59 +0000
commit2657cc39218d6ec3b5a7b5f9a462a8262e7404d5 (patch)
tree4d54c0eb599caf199ff8ca7548d9ae8f0817e47b /gen_web_gettext.py
parent441861786b02a00c95e9d485b8a814ece43edd50 (diff)
downloaddeluge-2657cc39218d6ec3b5a7b5f9a462a8262e7404d5.tar.gz
deluge-2657cc39218d6ec3b5a7b5f9a462a8262e7404d5.tar.bz2
deluge-2657cc39218d6ec3b5a7b5f9a462a8262e7404d5.zip
[Lint] Quote cleanup
Diffstat (limited to 'gen_web_gettext.py')
-rwxr-xr-xgen_web_gettext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gen_web_gettext.py b/gen_web_gettext.py
index 44654cb4c..71ea0b82d 100755
--- a/gen_web_gettext.py
+++ b/gen_web_gettext.py
@@ -58,7 +58,7 @@ def check_missing_markup(js_dir):
for match in string_re.finditer(line):
for string in match.groups():
# Ignore string that contains only digits or specificied strings in skip.
- if not string or string.split("'")[1].isdigit() or any(x in string for x in skip):
+ if not string or string.split('\'')[1].isdigit() or any(x in string for x in skip):
continue
locations = strings.get(string, [])
locations.append((os.path.join(root, filename), str(lineno + 1)))
@@ -97,7 +97,7 @@ def create_gettext_js(js_dir):
if __name__ == '__main__':
gettext_fname = create_gettext_js(WEBUI_JS_DIR)
- print("Created '%s'" % gettext_fname)
+ print('Created: %s' % gettext_fname)
missed_markup = check_missing_markup(WEBUI_JS_DIR)
if missed_markup:
print('Possible missed text for translation markup:')