From 038875f876d79d0f1e971886fe42f5bee4f9f31e Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 21 Aug 2018 20:32:50 -0400 Subject: autopep8 --- lib/inx/generate.py | 1 + lib/inx/utils.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/inx') diff --git a/lib/inx/generate.py b/lib/inx/generate.py index f9ed799b..1cf347f2 100644 --- a/lib/inx/generate.py +++ b/lib/inx/generate.py @@ -5,6 +5,7 @@ from .outputs import generate_output_inx_files from .extensions import generate_extension_inx_files from .utils import iterate_inx_locales, inx_path + def generate_inx_files(): for locale in iterate_inx_locales(): generate_input_inx_files() 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 -- cgit v1.2.3