Fix some untranslatable text

This commit is contained in:
rubenwardy
2022-01-14 18:25:28 +00:00
parent f3856b5db5
commit beb916d521
32 changed files with 2748 additions and 1529 deletions

View File

@@ -51,7 +51,7 @@
{% if package.author %}
<div class="d-none d-md-block">
<span class="mr-2">
{{ package.type.value }}
{{ package.type.text }}
</span>
{% for warning in package.content_warnings %}
<span class="badge badge-warning" title="{{ warning.description }}">

View File

@@ -106,7 +106,7 @@
<form method="post" action="{{ package.getURL("packages.review") }}" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<p>
{{ _("Do you recommend this %(type)s?", type=package.type.value | lower) }}
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
</p>
<div class="btn-group btn-group-toggle" data-toggle="buttons">
@@ -145,7 +145,7 @@
<form method="post" action="{{ package.getURL("packages.review") }}" class="card-body">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<p>
{{ _("Do you recommend this %(type)s?", type=package.type.value | lower) }}
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
</p>
<div class="btn-group">

View File

@@ -11,7 +11,7 @@
{% for topic in topics %}
<tr class="{% if topic.wip %}wiptopic{% endif %} {% if topic.discarded %}discardtopic{% endif %}">
<td>
[{{ topic.type.value }}]
[{{ topic.type.text }}]
</td>
<td>
<a href="https://forum.minetest.net/viewtopic.php?t={{ topic.topic_id}}">{{ topic.title }}</a>

View File

@@ -19,7 +19,7 @@
<ul>
{% for t in similar_topics %}
<li>
[{{ t.type.value }}]
[{{ t.type.text }}]
<a href="https://forum.minetest.net/viewtopic.php?t={{ t.topic_id }}">
{{ _("%(title)s by %(display_name)s", title=t.title, display_name=t.author.display_name) }}
</a>

View File

@@ -46,7 +46,7 @@
<div class="alert alert-secondary">
<a class="float-right btn btn-sm btn-default" href="/help/package_config/#cdbjson">{{ _("Read more") }}</a>
{{ _("You can include a .cdb.json file in your %(type)s to update these details automatically.", type=package.type.value.lower()) }}
{{ _("You can include a .cdb.json file in your %(type)s to update these details automatically.", type=package.type.text.lower()) }}
</div>
{% endif %}

View File

@@ -11,7 +11,7 @@
<h1>{{ self.title() }}</h1>
<p>
{{ _("A release is a single downloadable version of your %(title)s.", title=package.type.value.lower()) }}
{{ _("A release is a single downloadable version of your %(title)s.", title=package.type.text.lower()) }}
{{ _("You need to create releases even if you use a rolling release development cycle, as Minetest needs them to check for updates.") }}
</p>

View File

@@ -32,7 +32,7 @@
</div>
<div class="card-body">
<p>
{{ _("Do you recommend this %(type)s?", type=package.type.value | lower) }}
{{ _("Do you recommend this %(type)s?", type=package.type.text | lower) }}
</p>
{{ render_toggle_field(form.recommends, icons={"yes":"fa-thumbs-up", "no":"fa-thumbs-down"}) }}

View File

@@ -21,7 +21,7 @@
<a href="{{ pkg.getURL('packages.view') }}">
{{ _("%(title)s by %(author)s", title=pkg.title, author=pkg.author.display_name) }}
</a>
[{{ pkg.type.value }}]
[{{ pkg.type.text }}]
</li>
{% endfor %}
</ul>

View File

@@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
<a class="btn btn-secondary float-right" href="/help/update_config/">Help</a>
<a class="btn btn-secondary float-right" href="/help/update_config/">{{ _("Help") }}</a>
<h1>{{ _("Configure Git Update Detection") }}</h1>
<p>

View File

@@ -393,7 +393,7 @@
<dl>
<dt>{{ _("Type") }}</dt>
<dd>{{ package.type.value }}</dd>
<dd>{{ package.type.text }}</dd>
<dt>{{ _("Technical Name") }}</dt>
<dd>{{ package.name }}</dd>
<dt>{{ _("License") }}</dt>
@@ -403,8 +403,8 @@
{% elif package.type == package.type.TXP %}
{{ render_license(package.media_license) }}
{% else %}
{{ render_license(package.license) }} for code,<br />
{{ render_license(package.media_license) }} for media.
{{ _("%(code_license)s for code,<br>%(media_license)s for media.",
code_license=render_license(package.license), media_license=render_license(package.media_license)) }}
{% endif %}
</dd>
<dt>{{ _("Maintenance State") }}</dt>

View File

@@ -148,10 +148,12 @@
</h2>
<p>
Meta packages that have hard dependers, but are not fulfilled.
{{ _("Meta packages that have hard dependers, but no packages providing them.") }}
</p>
<a class="btn btn-primary" href="{{ url_for('todo.metapackages') }}">View</a>
<a class="btn btn-primary" href="{{ url_for('todo.metapackages') }}">
{{ _("View") }}
</a>
{% endif %}

View File

@@ -9,11 +9,11 @@
<div class="btn-group btn-group-sm mr-2">
{% if is_mtm_only %}
<a class="btn btn-sm btn-primary active" href="{{ url_set_query(mtm=0) }}">
Minetest Mods only
{{ _("Minetest-Mods org only") }}
</a>
{% else %}
<a class="btn btn-sm btn-secondary" href="{{ url_set_query(mtm=1) }}">
Minetest Mods only
{{ _("Minetest-Mods org only") }}
</a>
{% endif %}
</div>
@@ -21,11 +21,11 @@
<div class="btn-group btn-group-sm">
<a class="btn {% if sort_by == 'date' %}btn-primary active{% else %}btn-secondary{% endif %}"
href="{{ url_set_query(sort='date') }}">
Sort by date
{{ _("Sort by date") }}
</a>
<a class="btn {% if sort_by == 'score' %}btn-primary active{% else %}btn-secondary{% endif %}"
href="{{ url_set_query(sort='score') }}">
Sort by score
{{ _("Sort by score") }}
</a>
</div>
</div>

View File

@@ -35,9 +35,9 @@
<table class="table mt-5">
<tr>
<th>Package</th>
<th>{{ _("Package") }}</th>
<th></th>
<th>Tags</th>
<th>{{ _("Tags") }}</th>
</tr>
{% for package in packages %}
<tr>
@@ -70,70 +70,5 @@
{% endfor %}
</table>
<div class="modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ _("Edit tags") }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<select name="tags" multiple>
{% for tag in tags %}
<option value="{{ tag.name }}">{{ tag.title }}</option>
{% endfor %}
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Update</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% from "macros/forms.html" import form_scripts %}
{% block scriptextra %}
{{ form_scripts() }}
<script>
$(".add-btn").click(function() {
$(this).parent().parent();
$(".modal select option").removeAttr("selected");
$(".multichoice_selector").remove();
$(".modal .modal-body").prepend(`
<div class="multichoice_selector bulletselector form-control">
<input type="text" placeholder="Start typing to see suggestions">
<div class="clearboth"></div>
</div>
`);
$(".modal").modal("show");
$(".modal input").focus();
$(".multichoice_selector").each(function() {
const ele = $(this);
const sel = ele.parent().find("select");
sel.hide();
const options = [];
sel.find("option").each(function() {
const text = $(this).text();
options.push({
id: $(this).attr("value"),
value: text,
toString: function() { return text; },
});
});
ele.selectSelector(options, sel);
});
});
</script>
{% endblock %}

View File

@@ -9,15 +9,15 @@ Topics to be Added
<div class="btn-group btn-group-sm mr-2">
<a class="btn btn-secondary {% if sort_by=='date' %}active{% endif %}"
href="{{ url_for('todo.topics', q=query, show_discarded=show_discarded, n=n, sort='date') }}">
Sort by date
{{ _("Sort by date") }}
</a>
<a class="btn btn-secondary {% if sort_by=='name' %}active{% endif %}"
href="{{ url_for('todo.topics', q=query, show_discarded=show_discarded, n=n, sort='name') }}">
Sort by name
{{ _("Sort by name") }}
</a>
<a class="btn btn-secondary {% if sort_by=='views' %}active{% endif %}"
href="{{ url_for('todo.topics', q=query, show_discarded=show_discarded, n=n, sort='views') }}">
Sort by views
{{ _("Sort by views") }}
</a>
</div>
@@ -26,29 +26,27 @@ Topics to be Added
{% if n >= 10000 %}
<a class="btn btn-secondary"
href="{{ url_for('todo.topics', q=query, show_discarded=show_discarded, n=100, sort=sort_by) }}">
Paginated list
{{ _("Paginated list") }}
</a>
{% else %}
<a class="btn btn-secondary"
href="{{ url_for('todo.topics', q=query, show_discarded=show_discarded, n=10000, sort=sort_by) }}">
Unlimited list
{{ _("Unlimited list") }}
</a>
{% endif %}
{% endif %}
<a class="btn btn-secondary" href="{{ url_for('todo.topics', q=query, show_discarded=not show_discarded, n=n, sort=sort_by) }}">
{% if not show_discarded %}
Show
{{ _("Show discarded topics") }}
{% else %}
Hide
{{ _("Hide discarded topics") }}
{% endif %}
discarded topics
</a>
</div>
</div>
<h1>Topics to be Added</h1>
<h1>{{ _("Topics to be Added") }}</h1>
{% if topic_count > 0 %}
<p>

View File

@@ -40,7 +40,9 @@
{% endfor %}
</div>
<a class="btn btn-secondary float-right" href="/help/update_config/">Help</a>
<a class="btn btn-secondary float-right" href="/help/update_config/">
{{ _("Help") }}
</a>
<a class="btn btn-secondary float-right mr-2" href="{{ url_for('packages.bulk_update_config', username=user.username) }}">
{{ _("See all Update Settings") }}
</a>
@@ -66,7 +68,8 @@
{{ render_outdated_packages(outdated_packages, current_user) }}
<div class="mt-5"></div>
<a class="btn btn-secondary float-right" href="{{ url_for('todo.tags', author=user.username) }}">See All</a>
<a class="btn btn-secondary float-right" href="{{ url_for('todo.tags', author=user.username) }}">
{{_ ("See All") }}</a>
<h2>{{ _("Packages Without Tags") }}</h2>
<p>
{{ _("Labelling your packages with tags helps users find them.") }}