Correctly display and translate the account menu

This commit is contained in:
Rodolphe Breard 2018-02-17 19:12:11 +01:00
parent a09ff2edc1
commit aa6e3bcc04
3 changed files with 78 additions and 4 deletions

View file

@ -0,0 +1,37 @@
msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-17 19:06+0100\n"
"PO-Revision-Date: 2018-02-17 19:06+0100\n"
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
"Language-Team: Khaganat <assoc@khaganat.net>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: templates/navbar/navbar.html:43
msgid "my_account"
msgstr "my account"
#: templates/navbar/navbar.html:46
msgid "settings"
msgstr ""
#: templates/navbar/navbar.html:49
msgid "administration"
msgstr ""
#: templates/navbar/navbar.html:51
msgid "logout"
msgstr ""
#: templates/navbar/navbar.html:56
msgid "login"
msgstr ""
#: templates/navbar/navbar.html:59
msgid "register"
msgstr ""

View file

@ -0,0 +1,37 @@
msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-17 19:06+0100\n"
"PO-Revision-Date: 2018-02-17 19:06+0100\n"
"Last-Translator: Khaganat <assoc@khaganat.net>\n"
"Language-Team: Khaganat <assoc@khaganat.net>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: templates/navbar/navbar.html:43
msgid "my_account"
msgstr "mon compte"
#: templates/navbar/navbar.html:46
msgid "settings"
msgstr "paramètres"
#: templates/navbar/navbar.html:49
msgid "administration"
msgstr "administration"
#: templates/navbar/navbar.html:51
msgid "logout"
msgstr "déconnexion"
#: templates/navbar/navbar.html:56
msgid "login"
msgstr "connexion"
#: templates/navbar/navbar.html:59
msgid "register"
msgstr "inscription"

View file

@ -40,15 +40,15 @@
<ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex"> <ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% trans "my_account" %}</a> <a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% trans "my_account"|capfirst %}</a>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
<!-- <!--
<a class="dropdown-item" href="{% url "settings" %}">{% trans "settings" %}</a> <a class="dropdown-item" href="{% url "settings" %}">{% trans "settings"|capfirst %}</a>
--> -->
{% if user.is_superuser %} {% if user.is_superuser %}
<a class="dropdown-item" href="{% url "admin:index" %}">{% trans "administration" %}</a> <a class="dropdown-item" href="{% url "admin:index" %}">{% trans "administration"|capfirst %}</a>
{% endif %} {% endif %}
<a class="dropdown-item" href="{% url "logout" %}">{% trans "logout" %}</a> <a class="dropdown-item" href="{% url "logout" %}">{% trans "logout"|capfirst %}</a>
</div> </div>
</li> </li>
{% else %} {% else %}