aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2018-01-01 19:18:34 +0000
committerng0 <ng0@n0.is>2018-01-01 19:18:34 +0000
commit9ce835c374f97434d7fc5c880d335b0d123c3cc1 (patch)
treedb59e4a1c1535bbb06b15dc01673df9d8b76ad98
parent7ecb1d7847db925a1fe2752c027876d46abc0967 (diff)
downloadwww-9ce835c374f97434d7fc5c880d335b0d123c3cc1.tar.gz
www-9ce835c374f97434d7fc5c880d335b0d123c3cc1.zip
i18nfix: pep fixes
-rw-r--r--i18nfix.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/i18nfix.py b/i18nfix.py
index 331706af..b7fb4561 100644
--- a/i18nfix.py
+++ b/i18nfix.py
@@ -10,6 +10,7 @@ Extract translations from a Jinja2 template, stripping leading newlines.
10import jinja2.ext 10import jinja2.ext
11import re 11import re
12 12
13
13def normalize(message): 14def normalize(message):
14 message = message.strip() 15 message = message.strip()
15 # collapse whitespaces (including newlines) into one space. 16 # collapse whitespaces (including newlines) into one space.
@@ -23,6 +24,7 @@ def babel_extract(fileobj, keywords, comment_tags, options):
23 message = normalize(message) 24 message = normalize(message)
24 yield lineno, funcname, message, comments 25 yield lineno, funcname, message, comments
25 26
27
26def wrap_gettext(f): 28def wrap_gettext(f):
27 """ 29 """
28 Call gettext with whitespace normalized. 30 Call gettext with whitespace normalized.