diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-03-06 03:50:07 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-03-06 03:50:07 +0100 |
commit | 14af51dacedf00bbd460cdc1584cd9f81cb0d1f5 (patch) | |
tree | ead860a63fd22466d020ddceeaafe45d38076611 /template.py | |
parent | a28f7615c32a9bde7cc70fd00290a8f68917f916 (diff) | |
download | www-14af51dacedf00bbd460cdc1584cd9f81cb0d1f5.tar.gz www-14af51dacedf00bbd460cdc1584cd9f81cb0d1f5.zip |
conversion/text
Diffstat (limited to 'template.py')
-rwxr-xr-x | template.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/template.py b/template.py index ed8f47eb..78a801ff 100755 --- a/template.py +++ b/template.py | |||
@@ -50,7 +50,12 @@ for in_file in glob.glob("*.j2"): | |||
50 | env.install_gettext_translations(tr, newstyle=True) | 50 | env.install_gettext_translations(tr, newstyle=True) |
51 | 51 | ||
52 | 52 | ||
53 | content = tmpl.render(lang=locale, url=url, self_localized=self_localized, url_localized=url_localized) | 53 | content = tmpl.render( |
54 | lang=locale, | ||
55 | url=url, | ||
56 | self_localized=self_localized, | ||
57 | url_localized=url_localized, | ||
58 | filename=name + "." + ext) | ||
54 | out_name = "./" + locale + "/" + in_file.rstrip(".j2") | 59 | out_name = "./" + locale + "/" + in_file.rstrip(".j2") |
55 | os.makedirs("./" + locale, exist_ok=True) | 60 | os.makedirs("./" + locale, exist_ok=True) |
56 | with codecs.open(out_name, "w", "utf-8") as f: | 61 | with codecs.open(out_name, "w", "utf-8") as f: |