From a77b2490db136a6f95a6c3f8cc6e602b7a262092 Mon Sep 17 00:00:00 2001 From: m-r-r Date: Sun, 3 Jun 2012 12:35:29 +0200 Subject: [dev-random] Translations support ! --- dev-random/templates/article.html | 8 ++++++++ dev-random/templates/index.html | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/dev-random/templates/article.html b/dev-random/templates/article.html index ab5679c..4bd02f5 100644 --- a/dev-random/templates/article.html +++ b/dev-random/templates/article.html @@ -1,3 +1,4 @@ +{%- if article.lang %}{% set DEFAULT_LANG = article.lang %}{% endif -%} {% extends "base.html" %} {% block headers %} @@ -24,6 +25,13 @@
Dans «{{ article.category }}» par {{ article.author}} + {% if article.translations %} +    Langues: + {{ article.lang or DEFAULT_LANG }} + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} + {% endif %}
diff --git a/dev-random/templates/index.html b/dev-random/templates/index.html index 11314d1..c098ddc 100644 --- a/dev-random/templates/index.html +++ b/dev-random/templates/index.html @@ -20,6 +20,13 @@
Dans «{{ article.category }}» par {{ article.author}} + {% if article.translations %} +    Langues: + {{ article.lang or DEFAULT_LANG }} + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} + {% endif %}
-- cgit