snapshots: Translate snapshot types (field description)

Helps: #1938

BTW, columns centered.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Fioddor Superconcentrado authored and James Valleroy committed 2020-11-25 11:25:13 -05:00
1 parent a110c70b6f
commit 5f6add64bd
4 files changed
+55 -35

No files matched your search

@@ -29,8 +29,8 @@
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Rollback" %}</th>
<th><input type="checkbox" id="select-all"></th>
<th class="centered-column">{% trans "Rollback" %}</th>
<th class="centered-column"><input type="checkbox" id="select-all"></th>
</thead>
<tbody>
{% for snapshot in snapshots %}
@@ -49,8 +49,8 @@
{% endif %}
</td>
<td>{{ snapshot.date }}</td>
<td>{{ snapshot.description }}</td>
<td>
<td>{% trans snapshot.description %}</td>
<td class="centered-column">
<a href="{% url 'snapshot:rollback' snapshot.number %}"
class="btn btn-default btn-sm" role="button"
title="{% blocktrans trimmed with number=snapshot.number %}
@@ -60,7 +60,7 @@
aria-hidden="true"></span>
</a>
</td>
<td>
<td class="centered-column">
{% if not snapshot.is_default and not snapshot.is_active %}
<input type="checkbox" name="snapshot_list" value={{ snapshot.number }} />
{% endif %}
+9
View File
@@ -22,6 +22,15 @@ from plinth.modules import storage
from . import get_configuration
from .forms import SnapshotForm
# i18n for snapshot descriptions
SNAPSHOT_DESCRIPTION_STRINGS = {
'manually created': ugettext_lazy('manually created'),
'timeline': ugettext_lazy('timeline'),
'apt': ugettext_lazy('apt'),
}
subsubmenu = [
{
'url': reverse_lazy('snapshot:index'),