Commits

Pedro Romano committed 87de995 Draft

Use language defined in environment if it is not defined in the configuration file.

  • Participants
  • Parent commits 9b8bf3e

Comments (0)

Files changed (1)

File tinkerer/ext/blog.py

     filing.initialize(app)
 
     # localization
-    lang = app.config.language if app.config.language else ""
+    languages = [app.config.language] if app.config.language else None
 
     locale_dir = ""
     try:
     app.t = gettext.translation(
                     "tinkerer",
                     locale_dir,
-                    languages=[lang],
+                    languages=languages,
                     fallback=True)
     app.t.install()