Translation support and minor login view changes #35

Open
rskthomas wants to merge 20 commits from feature/translation into main
Showing only changes of commit 521c082635 - Show all commits

View file

@ -212,19 +212,23 @@
<div class="container d-flex justify-content-center align-items-center"> <div class="container d-flex justify-content-center align-items-center">
<span class="text-muted mx-auto">{{ commit_id }}</span> <span class="text-muted mx-auto">{{ commit_id }}</span>
<div class="dropdown ms-auto"> <div class="dropdown ms-auto">
<button class="btn btn-secondary dropdown-toggle" type="button" id="languageDropdown" data-bs-toggle="dropdown" aria-expanded="false"> <form action="{% url 'set_language' %}" method="post">
{% get_current_language as LANGUAGE_CODE %} {% csrf_token %}
{% get_language_info_list for LANGUAGES as languages %} <button class="btn btn-secondary dropdown-toggle" type="button" id="languageDropdown" data-bs-toggle="dropdown" aria-expanded="false">
{{ LANGUAGE_CODE|get_language_code:languages }} {% get_current_language as LANGUAGE_CODE %}
</button> {% get_language_info_list for LANGUAGES as languages %}
<ul class="dropdown-menu" aria-labelledby="languageDropdown"> {{ LANGUAGE_CODE|get_language_code:languages }}
{% for lang in languages %} </button>
<li> <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="languageDropdown">
<a class="dropdown-item" href="{% url 'set_language' %}?language={{ lang.code }}">{{ lang.name_local }}</a> {% for lang in languages %}
</li> <li>
{% endfor %} <button class="dropdown-item" type="submit" name="language" value="{{ lang.code }}">{{ lang.name_local }}</button>
</ul> </li>
</div> {% endfor %}
</ul>
</form>
<div>
</div> </div>
</footer> </footer>