backups: Make validator errors translatable

Fix spelling error.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2018-12-13 20:47:08 -05:00
parent 493fdd572b
commit 6a3f158266
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 4 additions and 4 deletions

View File

@ -84,8 +84,8 @@ class UploadForm(forms.Form):
file = forms.FileField(
label=_('Upload File'),
required=True,
validators=[FileExtensionValidator(['gz'],
'Backup files have to be in .tar.gz format')],
validators=[FileExtensionValidator(
['gz'], _('Backup files have to be in .tar.gz format'))],
help_text=_('Select the backup file you want to upload'))
@ -136,7 +136,7 @@ class AddRepositoryForm(forms.Form):
if passphrase != confirm_passphrase:
raise forms.ValidationError(
"The entered encryption passphrases do not match"
_("The entered encryption passphrases do not match")
)
path = cleaned_data.get("repository")

View File

@ -44,7 +44,7 @@
class="inline-block" >
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-default"
title="{% trans 'Unount Location' %}">
title="{% trans 'Unmount Location' %}">
<span class="glyphicon glyphicon-eject" aria-hidden="true">
</button>
</form>