Skip to content

Commit

Permalink
Mark more strings as translatable in navbar, register and user search…
Browse files Browse the repository at this point in the history
… templates (#79)

* Translate navbar tooltips

* Translate registration tos/privacy notice

* Translate user search results
  • Loading branch information
erdnaxe authored Apr 13, 2024
1 parent 3a54b26 commit 0a4c9fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions templates/components/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
{% if is_admin() %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('admin.view') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Admin Panel">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Admin Panel{% endtrans %}">
<i class="fas fa-wrench d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -82,7 +82,7 @@

<li class="nav-item">
<a class="nav-link" href="{{ url_for('views.notifications') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Notifications{% endtrans %}">
<i class="fas fa-bell d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -96,7 +96,7 @@
{% if Configs.user_mode == "teams" %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('teams.private') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Team">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Team{% endtrans %}">
<i class="fas fa-users d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -109,7 +109,7 @@

<li class="nav-item">
<a class="nav-link" href="{{ url_for('users.private') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Profile">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Profile{% endtrans %}">
<i class="fas fa-user-circle d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -121,7 +121,7 @@

<li class="nav-item">
<a class="nav-link" href="{{ url_for('views.settings') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Settings">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Settings{% endtrans %}">
<i class="fas fa-cogs d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -133,7 +133,7 @@

<li class="nav-item">
<a class="nav-link" href="{{ url_for('auth.logout') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Logout">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Logout{% endtrans %}">
<i class="fas fa-sign-out-alt d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -148,7 +148,7 @@
{% if registration_visible() %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('auth.register') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Register">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Register{% endtrans %}">
<i class="fas fa-user-plus d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand All @@ -161,7 +161,7 @@

<li class="nav-item">
<a class="nav-link" href="{{ url_for('auth.login') }}">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="Login">
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{% trans %}Login{% endtrans %}">
<i class="fas fa-sign-in-alt d-none d-md-inline d-lg-none"></i>
</span>
<span class="d-sm-inline d-md-none d-lg-inline">
Expand Down
6 changes: 4 additions & 2 deletions templates/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ <h1>
<div class="row pt-3">
<div class="col-md-12 text-center">
<small class="text-muted text-center">
{% trans trimmed privacy_link=Configs.privacy_link, tos_link=Configs.tos_link %}
By registering, you agree to the
<a href="{{ Configs.privacy_link }}" rel="noopener" target="_blank">privacy policy</a>
and <a href="{{ Configs.tos_link }}" rel="noopener" target="_blank">terms of service</a>
<a href="{{ privacy_link }}" target="_blank">privacy policy</a>
and <a href="{{ tos_link }}" target="_blank">terms of service</a>
{% endtrans %}
</small>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/users/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ <h1>{% trans %}Users{% endtrans %}</h1>
<div class="col-md-12">
{% if q and field %}
<h5 class="text-muted text-center">
Searching for users with <strong>{{ field }}</strong> matching <strong>{{ q }}</strong>
{% trans %}Searching for users with <strong>{{ field }}</strong> matching <strong>{{ q }}</strong>{% endtrans %}
</h5>
<h6 class="text-muted text-center pb-3">
Page {{ users.page }} of {{ users.total }} results
{% trans page=users.page, total=users.total %}Page {{ page }} of {{ total }} results{% endtrans %}
</h6>
{% endif %}

Expand Down

0 comments on commit 0a4c9fd

Please sign in to comment.