changeset 951:43df2bf38787

pages (g): use language in data for locale
author Goffi <goffi@goffi.org>
date Wed, 21 Jun 2017 08:07:43 +0200
parents 67a59552f3e3
children 0f309eeef26d
files src/pages/g/page_meta.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/pages/g/page_meta.py	Sat Jun 03 22:27:04 2017 +0200
+++ b/src/pages/g/page_meta.py	Wed Jun 21 08:07:43 2017 +0200
@@ -75,9 +75,10 @@
 
     # we copy data useful in templates
     template_data = request.template_data
-    for key in (u'name', u'locale'):
-        if key in data:
-            template_data[key] = data[key]
+    if u'name' in data:
+        template_data[u'name'] = data[u'name']
+    if u'language' in data:
+        template_data[u'locale'] = data[u'language']
 
 
 def prepare_render(self, request):