diff options
author | ng0 <ng0@n0.is> | 2018-01-01 19:18:34 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2018-01-01 19:18:34 +0000 |
commit | 9ce835c374f97434d7fc5c880d335b0d123c3cc1 (patch) | |
tree | db59e4a1c1535bbb06b15dc01673df9d8b76ad98 | |
parent | 7ecb1d7847db925a1fe2752c027876d46abc0967 (diff) | |
download | www-9ce835c374f97434d7fc5c880d335b0d123c3cc1.tar.gz www-9ce835c374f97434d7fc5c880d335b0d123c3cc1.zip |
i18nfix: pep fixes
-rw-r--r-- | i18nfix.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -10,6 +10,7 @@ Extract translations from a Jinja2 template, stripping leading newlines. | |||
10 | import jinja2.ext | 10 | import jinja2.ext |
11 | import re | 11 | import re |
12 | 12 | ||
13 | |||
13 | def normalize(message): | 14 | def 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 | |||
26 | def wrap_gettext(f): | 28 | def wrap_gettext(f): |
27 | """ | 29 | """ |
28 | Call gettext with whitespace normalized. | 30 | Call gettext with whitespace normalized. |