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

View File

@ -44,7 +44,7 @@
class="inline-block" > class="inline-block" >
{% csrf_token %} {% csrf_token %}
<button type="submit" class="btn btn-sm btn-default" <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"> <span class="glyphicon glyphicon-eject" aria-hidden="true">
</button> </button>
</form> </form>