From 15e9c6cad9e423426365e1e408c08743b87029cc Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 25 Oct 2024 07:47:40 -0700 Subject: [PATCH] backups: Better explanation for the format of upload file Fixes: #2115. Tests: - Visit the backups upload page. Notice that the new help text is as expected. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/backups/forms.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plinth/modules/backups/forms.py b/plinth/modules/backups/forms.py index 5b0d9c07f..30c5471b4 100644 --- a/plinth/modules/backups/forms.py +++ b/plinth/modules/backups/forms.py @@ -15,6 +15,7 @@ from django.core.validators import (FileExtensionValidator, from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ +from plinth import cfg from plinth.modules.storage import get_mounts from plinth.utils import format_lazy @@ -138,7 +139,11 @@ class UploadForm(forms.Form): label=_('Upload File'), required=True, validators=[ FileExtensionValidator( ['gz'], _('Backup files have to be in .tar.gz format')) - ], help_text=_('Select the backup file you want to upload')) + ], help_text=format_lazy( + _('Select the backup file to upload from the local computer. This ' + 'must be a file previously downloaded from the result of a ' + 'successful backup on a {box_name}. It must have a .tar.gz ' + 'extension.'), box_name=_(cfg.box_name))) def repository_validator(path):