Browse Source

Support translation on home page

better_user
Maël Kervella 8 years ago
parent
commit
55c1da241a
  1. BIN
      re2o/locale/fr/LC_MESSAGES/django.mo
  2. 13
      re2o/locale/fr/LC_MESSAGES/django.po
  3. 9
      re2o/templates/re2o/index.html

BIN
re2o/locale/fr/LC_MESSAGES/django.mo

Binary file not shown.

13
re2o/locale/fr/LC_MESSAGES/django.po

@ -38,6 +38,19 @@ msgstr "Anglais"
msgid "French"
msgstr "Français"
#: templates/re2o/index.html:30
msgid "Home"
msgstr "Accueil"
#: templates/re2o/index.html:33
#, python-format
msgid "Welcome to %(site_name)s !"
msgstr "Bienvenue sur %(site_name)s !"
#: templates/re2o/index.html:47
msgid "Go there"
msgstr "Accéder"
#: templates/re2o/about.html:29 templates/re2o/about.html:35
msgid "About Re2o"
msgstr "A propos de Re2o"

9
re2o/templates/re2o/index.html

@ -25,11 +25,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% load bootstrap3 %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Accueil{% endblock %}
{% block title %}{% trans "Home" %}{% endblock %}
{% block content %}
<h1>Bienvenue sur {{ request.get_host }} !</h1>
<h1>{% blocktrans %}Welcome to {{ site_name }} !{% endblocktrans %}</h1>
<div class="row">
{% for service_list in services_urls %}
@ -38,12 +39,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="col-12">
<div class="thumbnail">
{% if service.image %}
<a href="{{ service.url }}"><img src="{{ service.image.url }}" alt="{{ service.name }}"></a>
<a href="{{ service.url }}"><img src="{{ service.image.url }}" alt="{{ service.name }}"></a>
{% endif %}
<div class="caption">
<h3>{{ service.name }}</h3>
<p>{{ service.description }}</p>
<p><a href="{{ service.url }}" class="btn btn-primary" role="button">Accéder</a></p>
<p><a href="{{ service.url }}" class="btn btn-primary" role="button">{% trans "Go there" %}</a></p>
</div>
</div>
</div>

Loading…
Cancel
Save