Drop de/es locales, complete fr translations, add navbar language switcher.
This commit is contained in:
parent
86e3570714
commit
b974a9cc92
9 changed files with 309 additions and 929 deletions
|
|
@ -54,6 +54,21 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
{% endif %}
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
<li class="nav-item dropdown">
|
||||
<button class="btn nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ LANGUAGE_CODE|upper }}
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{% for lang_code, lang_name in LANGUAGES %}
|
||||
<li>
|
||||
<button class="dropdown-item{% if lang_code == LANGUAGE_CODE %} active{% endif %}" type="button" data-lang="{{ lang_code }}">
|
||||
{{ lang_name }}
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
{% url 'account_email' as url %}
|
||||
|
|
@ -110,26 +125,18 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
<form action="{% url 'set_language' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<p class="small text-center text-muted mt-1">
|
||||
{% if request.user.is_authenticated %}
|
||||
{% trans "Connected as" %} <code>{{ request.user.username }}</code> ·
|
||||
{% endif %}
|
||||
<a class="text-reset" href="https://github.com/krek0/photo21">{% trans "Source code" %}</a> ·
|
||||
<!-- <select title="language" name="language" class="lang-select"> -->
|
||||
<!-- {% get_current_language as LANGUAGE_CODE %} -->
|
||||
<!-- {% get_available_languages as LANGUAGES %} -->
|
||||
<!-- {% for lang_code, lang_name in LANGUAGES %} -->
|
||||
<!-- <option value="{{ lang_code }}" {% if lang_code == LANGUAGE_CODE %}selected{% endif %}> -->
|
||||
<!-- {{ lang_name }} ({{ lang_code }}) -->
|
||||
<!-- </option> -->
|
||||
<!-- {% endfor %} -->
|
||||
<!-- </select> -->
|
||||
<noscript><input type="submit"></noscript>
|
||||
</p>
|
||||
</form>
|
||||
<p class="small text-center text-muted mt-1">
|
||||
{% if request.user.is_authenticated %}
|
||||
{% trans "Connected as" %} <code>{{ request.user.username }}</code> ·
|
||||
{% endif %}
|
||||
<a class="text-reset" href="https://git.sinfonie.org/sinfonie/photo26">{% trans "Source code" %}</a>
|
||||
</p>
|
||||
</footer>
|
||||
<form id="lang-form" action="{% url 'set_language' %}" method="post" hidden>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="language" id="lang-input">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
</form>
|
||||
|
||||
<script src="{% static "lang-select.js" %}"></script>
|
||||
<script src="{% static "bootstrap5/js/bootstrap.bundle.min.js" %}"></script>
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<h3 class="mt-4">{% trans "Behind the scene" %}</h3>
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
This project if a fork of <a href="https://gitlab.crans.org/bde/photo21/">Photo21</a>.
|
||||
Because we value your privacy, we do not sell the data on this site,
|
||||
unlike many free online platforms.
|
||||
<!-- The dedicated server running this website is kindly hosted by -->
|
||||
<!-- <a href="https://sinfonie.org/">Sinfonie</a> at the ENS Rennes. -->
|
||||
<!-- This project if a fork of <a href="https://gitlab.crans.org/bde/photo21/">Photo21</a>. -->
|
||||
<!-- Because we value your privacy, we do not sell the data on this site, -->
|
||||
<!-- unlike many free online platforms. -->
|
||||
The dedicated server running this website is kindly hosted by
|
||||
<a href="https://sinfonie.org/">Sinfonie</a> at the ENS Rennes.
|
||||
<!-- Current active administrators are: -->
|
||||
<!-- {% endblocktrans %} -->
|
||||
<!-- {% for user in superusers %} <code>{{ user.username }}</code>{% endfor %}. -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue