From ea9742ad73d97e16029d858aeae05f7284275787 Mon Sep 17 00:00:00 2001 From: Alexandre Barbosa Date: Thu, 4 Jun 2015 11:19:12 -0300 Subject: [PATCH] Small correction: added _. --- colab/accounts/forms.py | 10 ++++++---- colab/accounts/models.py | 2 +- colab/locale/pt_BR/LC_MESSAGES/django.po | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/colab/accounts/forms.py b/colab/accounts/forms.py index 48df1ce..50a264d 100644 --- a/colab/accounts/forms.py +++ b/colab/accounts/forms.py @@ -198,10 +198,10 @@ class UserCreationForm(UserForm): username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$', help_text=_(("Required. 30 characters or fewer" - ". Letter and digits.")), + ". Letter, digits and _")), error_messages={ 'invalid': _(("This value may contain only" - " letters and numbers."))}) + ". Letters, digits and _"))}) password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) password2 = forms.CharField(label=_("Password confirmation"), @@ -251,9 +251,11 @@ class UserCreationForm(UserForm): class UserChangeForm(forms.ModelForm): username = forms.RegexField( label=_("Username"), max_length=30, regex=r"^[\w*]", - help_text=_("Required. 30 characters or fewer. Letters and digits."), + help_text=_("Required. 30 characters or fewer. Letters, digits and _." + ), error_messages={ - 'invalid': _("This value may contain only letters and numbers.")}) + 'invalid': _("This value may contain only letters, numbers and _.") + }) password = ReadOnlyPasswordHashField(label=_("Password"), help_text=_("Raw passwords are not" " stored, so there is no" diff --git a/colab/accounts/models.py b/colab/accounts/models.py index 6de95c1..829545f 100644 --- a/colab/accounts/models.py +++ b/colab/accounts/models.py @@ -82,7 +82,7 @@ class User(AbstractUser): # without having to rewrite all AbstractUser here User._meta.get_field('email')._unique = True User._meta.get_field('username').help_text = _( - u'Required. 30 characters or fewer. Letters and digits.' + u'Required. 30 characters or fewer. Letters, digits and _.' ) User._meta.get_field('username').validators[0] = validators.RegexValidator( r'^\w+$', diff --git a/colab/locale/pt_BR/LC_MESSAGES/django.po b/colab/locale/pt_BR/LC_MESSAGES/django.po index 8cb6132..18f7a35 100644 --- a/colab/locale/pt_BR/LC_MESSAGES/django.po +++ b/colab/locale/pt_BR/LC_MESSAGES/django.po @@ -1283,8 +1283,8 @@ msgstr "" #: colab/accounts/forms.py:276 -msgid "This value may contain only letters and numbers." -msgstr "Esse campo só pode conter letras e/ou numeros." +msgid "This value may contain only letters, numbers and _." +msgstr "Esse campo só pode conter letras, numeros e _." #~ msgid "Please correct the errors below and try again" #~ msgstr "Por favor, corrija os erros abaixo e tente novamente" -- libgit2 0.21.2