summaryrefslogtreecommitdiff
path: root/lib/inx/utils.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-21 20:32:50 -0400
committerLex Neva <github.com@lexneva.name>2018-08-21 20:32:50 -0400
commit038875f876d79d0f1e971886fe42f5bee4f9f31e (patch)
tree296c60d3b490f988802f9bec884eed32dcbf9c0c /lib/inx/utils.py
parentf26042f477f1520443b1d9dad0bb88ef3ad7ca47 (diff)
autopep8
Diffstat (limited to 'lib/inx/utils.py')
-rw-r--r--lib/inx/utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/inx/utils.py b/lib/inx/utils.py
index 6103f360..6670cfcb 100644
--- a/lib/inx/utils.py
+++ b/lib/inx/utils.py
@@ -13,10 +13,11 @@ template_path = os.path.join(_top_path, "templates")
current_translation = default_translation
current_locale = "en_US"
+
def build_environment():
env = Environment(
- loader = FileSystemLoader(template_path),
- autoescape = True,
+ loader=FileSystemLoader(template_path),
+ autoescape=True,
extensions=['jinja2.ext.i18n']
)
@@ -25,11 +26,13 @@ def build_environment():
return env
+
def write_inx_file(name, contents):
inx_file_name = "inkstitch_%s_%s.inx" % (name, current_locale)
with open(os.path.join(inx_path, inx_file_name), 'w') as inx_file:
print >> inx_file, contents
+
def iterate_inx_locales():
global current_translation, current_locale