Merge pull request #1334 from ogayot/leading-capital-error-message

identity: add leading capital letter to error messages
This commit is contained in:
Olivier Gayot 2022-06-24 10:08:11 +02:00 committed by GitHub
commit add252a42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -64,11 +64,11 @@ class LUKSOptionsForm(SubForm):
def validate_password(self): def validate_password(self):
if len(self.password.value) < 1: if len(self.password.value) < 1:
return _("Password must be set") return _("Passphrase must be set")
def validate_confirm_password(self): def validate_confirm_password(self):
if self.password.value != self.confirm_password.value: if self.password.value != self.confirm_password.value:
return _("Passwords do not match") return _("Passphrases do not match")
class LVMOptionsForm(SubForm): class LVMOptionsForm(SubForm):

View File

@ -83,7 +83,7 @@ class VolGroupForm(CompoundDiskForm):
self.deleted_vg_names = deleted_vg_names self.deleted_vg_names = deleted_vg_names
super().__init__(model, possible_components, initial) super().__init__(model, possible_components, initial)
connect_signal(self.encrypt.widget, 'change', self._change_encrypt) connect_signal(self.encrypt.widget, 'change', self._change_encrypt)
setup_password_validation(self, _("passphrases")) setup_password_validation(self, _("Passphrases"))
self._change_encrypt(None, self.encrypt.value) self._change_encrypt(None, self.encrypt.value)
name = VGNameField(_("Name:")) name = VGNameField(_("Name:"))

View File

@ -191,7 +191,7 @@ def setup_password_validation(form, desc):
password = form.password.value password = form.password.value
if not password.startswith(new_text): if not password.startswith(new_text):
form.confirm_password.show_extra( form.confirm_password.show_extra(
# desc is "passwords" or "passphrases" # desc is "Passwords" or "Passphrases"
("info_error", _("{desc} do not match").format(desc=desc))) ("info_error", _("{desc} do not match").format(desc=desc)))
else: else:
form.confirm_password.show_extra('') form.confirm_password.show_extra('')
@ -229,7 +229,7 @@ class IdentityView(BaseView):
self.form = IdentityForm(controller, initial) self.form = IdentityForm(controller, initial)
connect_signal(self.form, 'submit', self.done) connect_signal(self.form, 'submit', self.done)
setup_password_validation(self.form, _("passwords")) setup_password_validation(self.form, _("Passwords"))
super().__init__( super().__init__(
screen( screen(