Allow translating text in templates
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2 class="mb-4">Approval Queue</h2>
|
||||
<h2 class="mb-4">{{ _("Approval Queue") }}</h2>
|
||||
{% if canApproveScn and screenshots %}
|
||||
<div class="card my-4">
|
||||
<h3 class="card-header">Screenshots
|
||||
<h3 class="card-header">{{ _("Screenshots") }}
|
||||
<form class="float-right" method="post" action="{{ url_for('todo.view_editor') }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="action" value="screenshots_approve_all" />
|
||||
<input class="btn btn-sm btn-primary" type="submit" value="Approve All" />
|
||||
<input class="btn btn-sm btn-primary" type="submit" value="{{ _('Approve All') }}" />
|
||||
</form>
|
||||
</h3>
|
||||
<ul class="card-body d-flex p-0 flex-row flex-wrap justify-content-start align-content-start p-4">
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</a></li>
|
||||
{% else %}
|
||||
<li><i>No screenshots need reviewing.</i></li>
|
||||
<li><i>{{ _("No screenshots need reviewing.") }}</i></li>
|
||||
{% endfor %}
|
||||
{% for i in range(4) %}
|
||||
<li class="packagetile flex-fill"></li>
|
||||
@@ -43,7 +43,7 @@
|
||||
{% if canApproveNew and (packages or wip_packages) %}
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<h3 class="card-header">Packages</h3>
|
||||
<h3 class="card-header">{{ _("Packages") }}</h3>
|
||||
<div class="list-group list-group-flush">
|
||||
{% for p in packages %}
|
||||
<a href="{{ p.getURL("packages.view") }}" class="list-group-item list-group-item-action">
|
||||
@@ -62,7 +62,7 @@
|
||||
{{ p.title }} by {{ p.author.display_name }}
|
||||
</a>
|
||||
{% else %}
|
||||
<li class="list-group-item"><i>No packages need reviewing.</i></li>
|
||||
<li class="list-group-item"><i>{{ _("No packages need reviewing.") }}</i></li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,21 +72,22 @@
|
||||
{% if canApproveRel and releases %}
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<h3 class="card-header">Releases</h3>
|
||||
<h3 class="card-header">{{ _("Releases") }}</h3>
|
||||
<ul class="list-group list-group-flush" style="max-height: 500px; overflow: hidden auto;">
|
||||
{% for r in releases %}
|
||||
<li class="list-group-item">
|
||||
{% if r.task_id %}
|
||||
<span class="mr-2 badge badge-warning">Importing</span>
|
||||
<span class="mr-2 badge badge-warning">{{ _("Importing") }}</span>
|
||||
{% endif %}
|
||||
<a href="{{ r.getEditURL() }}">{{ r.title }}</a>
|
||||
on
|
||||
<a href="{{ r.package.getURL("packages.view") }}">
|
||||
{{ r.package.title }} by {{ r.package.author.display_name }}
|
||||
{{ _("%(title)s by %(display_name)s",
|
||||
title=r.package.title, display_name=r.package.author.display_name) }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="list-group-item"><i>No releases need reviewing.</i></li>
|
||||
<li class="list-group-item"><i>{{ _("No releases need reviewing.") }}</i></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -96,14 +97,14 @@
|
||||
|
||||
{% if not (packages or screenshots or releases) %}
|
||||
<p>
|
||||
<i>All done!</i>
|
||||
<i>{{ _("All done!") }}</i>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if license_needed %}
|
||||
<h2 class="mt-5">License Needed</h2>
|
||||
<h2 class="mt-5">{{ _("License Needed") }}</h2>
|
||||
<div class="card">
|
||||
<h3 class="card-header">License Needed</h3>
|
||||
<h3 class="card-header">{{ _("License Needed") }}</h3>
|
||||
<div class="list-group list-group-flush">
|
||||
{% for p in license_needed %}
|
||||
<a href="{{ p.getURL("packages.view") }}" class="list-group-item list-group-item-action">
|
||||
@@ -123,10 +124,11 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h2 class="mt-5">Tag Packages</h2>
|
||||
<h2 class="mt-5">{{ _("Tag Packages") }}</h2>
|
||||
|
||||
<p>
|
||||
{{ total_to_tag }} / {{ total_packages }} packages don't have any tags.
|
||||
{{ _("%(total_to_tag)d / %(total_packages)d packages don't have any tags.",
|
||||
total_to_tag=total_to_tag, total_packages=total_packages) }}
|
||||
</p>
|
||||
|
||||
<div class="progress my-4">
|
||||
@@ -135,13 +137,14 @@
|
||||
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.tags') }}">View Tags</a>
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.tags') }}">{{ _("View Tags") }}</a>
|
||||
|
||||
|
||||
{% if unfulfilled_meta_packages %}
|
||||
<h2 class="mt-5">
|
||||
<span class="fas fa-exclamation-triangle pr-2" style="color: orange;"></span>
|
||||
{{ unfulfilled_meta_packages }} Unfulfilled Dependencies
|
||||
{{ unfulfilled_meta_packages }}
|
||||
{{ _("Unfulfilled Dependencies") }}
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
@@ -152,7 +155,7 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h2 class="mt-5">WIP</h2>
|
||||
<h2 class="mt-5">{{ _("WIP") }}</h2>
|
||||
|
||||
{% if canApproveNew and (packages or wip_packages) %}
|
||||
<div class="card">
|
||||
@@ -167,7 +170,7 @@
|
||||
</span>
|
||||
|
||||
{% if p.state == p.state.WIP %}
|
||||
<span class="mr-2 badge badge-warning">WIP</span>
|
||||
<span class="mr-2 badge badge-warning">{{ _("WIP") }}</span>
|
||||
{% else %}
|
||||
<span class="mr-2 badge badge-danger">{{ p.state.value }}</span>
|
||||
{% endif %}
|
||||
@@ -175,7 +178,7 @@
|
||||
{{ p.title }} by {{ p.author.display_name }}
|
||||
</a>
|
||||
{% else %}
|
||||
<li class="list-group-item"><i>No packages need reviewing.</i></li>
|
||||
<li class="list-group-item"><i>{{ _("No packages need reviewing.") }}</i></li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user