Update module terminology improvements

"Update" is universally applied as the term for
upgrade/update/unattended upgrade/... as agreed on #1376 .

Changes also include simplifcation of text and interface, too.
Code may still need to be updated. This commit only touches on visibile
text.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Robert Martinez 2018-10-25 20:44:00 +02:00 committed by James Valleroy
parent e2584be45d
commit 2bf766a589
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
4 changed files with 33 additions and 28 deletions

View File

@ -32,12 +32,10 @@ is_essential = True
managed_packages = ['unattended-upgrades']
name = _('Software Upgrades')
name = _('Update')
description = [
_('Upgrades install the latest software and security updates. When '
'automatic upgrades are enabled, upgrades are automatically run every '
'night. You don\'t normally need to start the upgrade process.')
_('Search for and apply the latest software and security updates. ')
]
service = None

View File

@ -26,7 +26,5 @@ from django.utils.translation import ugettext_lazy as _
class ConfigureForm(forms.Form):
"""Configuration form to enable/disable automatic upgrades."""
auto_upgrades_enabled = forms.BooleanField(
label=_('Enable automatic upgrades'), required=False,
help_text=_('When enabled, the unattended-upgrades program will be run '
'once per day. It will attempt to perform any package '
'upgrades that are available.'))
label=_('Enable auto-update'), required=False,
help_text=_('When enabled, FreedomBox automatically updates once a day.'))

View File

@ -34,37 +34,47 @@
{% block configuration %}
<p>
{% blocktrans trimmed %}
Depending on the number of packages to install, this may take a long time
to complete. While upgrades are in progress, you will not be able to
install other packages. During the upgrade, this web interface may be
temporarily unavailable and show an error. Refresh the page to continue.
{% endblocktrans %}
</p>
{% if not is_busy %}
<p>
<form class="form" method="post" action="{% url 'upgrades:upgrade' %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary"
value="{% trans "Upgrade now &raquo;" %}"/>
<input type="submit" class="btn btn-primary btn-lg"
value="{% trans "Update now" %}"/>
</form>
</p>
{% endif %}
{% if is_busy %}
<p class="running-status-parent">
<span class="running-status loading"></span>
{% trans "A package manager is running." %}
</p>
<p class="running-status-parent text-center btn btn-primary btn-lg">
<span class="running-status loading"></span>
{% trans "Updating..." %}
</p>
{% endif %}
<p>
{% blocktrans trimmed %}
<b>This may take a long time to complete</b>. During an update, you
can not install apps. Also, this web interface may be temporarily
unavailable and show an error. In that case refresh the page to continue.
{% endblocktrans %}
</p>
{% if log %}
<h5>{% trans "Recent log from upgrades:" %}</h5>
<p>
<a class="btn btn-default" role="button" data-toggle="collapse" href="#collapseLog" aria-expanded="false" aria-controls="collapseLog">
Toggle recent update logs
</a>
<pre>{{ log }}</pre>
<div class="collapse" id="collapseLog">
<pre>{{ log }}</pre>
</div>
</p>
{% endif %}
{% endblock %}
{% block page_js %}
@ -80,4 +90,3 @@
<script type="text/javascript" src="{% static 'theme/js/refresh.js' %}"></script>
{% endif %}
{% endblock %}

View File

@ -33,10 +33,10 @@ from .forms import ConfigureForm
subsubmenu = [{
'url': reverse_lazy('upgrades:index'),
'text': ugettext_lazy('Automatic Upgrades')
'text': ugettext_lazy('Auto-update')
}, {
'url': reverse_lazy('upgrades:upgrade'),
'text': ugettext_lazy('Upgrade Packages')
'text': ugettext_lazy('Manual update')
}]