Set the language-code in the output pages automatically

This commit is contained in:
Andrew Scheller 2015-11-13 12:00:25 +00:00
parent 5481ecc4ba
commit 9ba61b786b
7 changed files with 11 additions and 9 deletions

View File

@ -277,7 +277,8 @@ def render_pin(pin_num, selected_url, overlay=None):
pin_selected = selected, pin_selected = selected,
pin_url = pin_url, pin_url = pin_url,
pin_title = ', '.join(pin_link_title), pin_title = ', '.join(pin_link_title),
pin_name = pin_name pin_name = pin_name,
langcode = lang
) )
def render_nav(url, overlay=None): def render_nav(url, overlay=None):
@ -425,7 +426,8 @@ for pin in range(1,len(pinout.pins)+1):
resource_url = resource_url, resource_url = resource_url,
overlays = overlays_html, overlays = overlays_html,
description = pinout.settings['default_desc'], description = pinout.settings['default_desc'],
title = pin_title + pinout.settings['title_suffix'] title = pin_title + pinout.settings['title_suffix'],
langcode = lang
) )
print('Outputting page {}'.format(pin_url)) print('Outputting page {}'.format(pin_url))

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="de-DE"> <html lang="{{langcode}}">
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title> <title>{{title}}</title>

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en-GB"> <html lang="{{langcode}}">
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title> <title>{{title}}</title>

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="es-ES"> <html lang="{{langcode}}">
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title> <title>{{title}}</title>

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="fr-FR"> <html lang="{{langcode}}">
<head> <head>
<title>{{title}}</title> <title>{{title}}</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en-GB"> <html lang="{{langcode}}">
<head> <head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title> <title>{{title}}</title>

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="tr-TR"> <html lang="{{langcode}}">
<head> <head>
<title>{{title}}</title> <title>{{title}}</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=utf-8" />
@ -66,4 +66,4 @@
<script src='{{resource_url}}pinout.js?v={{v}}'></script> <script src='{{resource_url}}pinout.js?v={{v}}'></script>
</body> </body>
</html> </html>