Support translation of lang attribute in default themes

This commit is contained in:
Jorge Maldonado Ventura 2018-07-01 20:32:08 +02:00
commit 71af410285
11 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Deuxième article</title> <title>Deuxième article</title>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Trop bien !</title> <title>Trop bien !</title>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Deuxième article</title> <title>Deuxième article</title>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Trop bien !</title> <title>Trop bien !</title>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Deuxième article</title> <title>Deuxième article</title>

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block html_lang %}{{ article.lang }}{% endblock %}
{% block title %}{{ article.title|striptags }}{% endblock %} {% block title %}{{ article.title|striptags }}{% endblock %}
{% block content %} {% block content %}
<section id="content" class="body"> <section id="content" class="body">

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}"> <html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>{% block title %}{{ SITENAME }}{%endblock%}</title> <title>{% block title %}{{ SITENAME }}{%endblock%}</title>
@ -15,7 +15,7 @@
<body id="index" class="home"> <body id="index" class="home">
{% include 'github.html' %} {% include 'github.html' %}
<header id="banner" class="body"> <header id="banner" class="body">
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1> <h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %}<strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1>
<nav><ul> <nav><ul>
{% for title, link in MENUITEMS %} {% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li> <li><a href="{{ link }}">{{ title }}</a></li>

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block html_lang %}{{ page.lang }}{% endblock %}
{% block title %}{{ page.title }}{% endblock %} {% block title %}{{ page.title }}{% endblock %}
{% block content %} {% block content %}
<section id="content" class="body"> <section id="content" class="body">

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block html_lang %}{{ article.lang }}{% endblock %}
{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %} {% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %}

View file

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}"> <html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head> <head>
{% block head %} {% block head %}
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title> <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>

View file

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block html_lang %}{{ page.lang }}{% endblock %}
{% block title %}{{ SITENAME }} - {{ page.title }}{%endblock%} {% block title %}{{ SITENAME }} - {{ page.title }}{%endblock%}