From 2bf766a58941f37459aa2b52323137c45e0e9172 Mon Sep 17 00:00:00 2001 From: Robert Martinez Date: Thu, 25 Oct 2018 20:44:00 +0200 Subject: [PATCH] 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 --- plinth/modules/upgrades/__init__.py | 6 +-- plinth/modules/upgrades/forms.py | 6 +-- .../modules/upgrades/templates/upgrades.html | 45 +++++++++++-------- plinth/modules/upgrades/views.py | 4 +- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index b5a442722..b46bf68d5 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -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 diff --git a/plinth/modules/upgrades/forms.py b/plinth/modules/upgrades/forms.py index 8be3efff4..7cacd3853 100644 --- a/plinth/modules/upgrades/forms.py +++ b/plinth/modules/upgrades/forms.py @@ -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.')) diff --git a/plinth/modules/upgrades/templates/upgrades.html b/plinth/modules/upgrades/templates/upgrades.html index effafee80..bb8954be8 100644 --- a/plinth/modules/upgrades/templates/upgrades.html +++ b/plinth/modules/upgrades/templates/upgrades.html @@ -34,37 +34,47 @@ {% block configuration %} -

- {% 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 %} -

- {% if not is_busy %} +

{% csrf_token %} - +
+

{% endif %} {% if is_busy %} -

- - {% trans "A package manager is running." %} -

+

+ + {% trans "Updating..." %} +

{% endif %} +

+ {% blocktrans trimmed %} + This may take a long time to complete. 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 %} +

+ + + {% if log %} -
{% trans "Recent log from upgrades:" %}
+

+ -

{{ log }}
+
+
{{ log }}
+
+

{% endif %} + {% endblock %} {% block page_js %} @@ -80,4 +90,3 @@ {% endif %} {% endblock %} - diff --git a/plinth/modules/upgrades/views.py b/plinth/modules/upgrades/views.py index 2d9cc4f8e..9d1b4f621 100644 --- a/plinth/modules/upgrades/views.py +++ b/plinth/modules/upgrades/views.py @@ -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') }]