Commit ea9742ad73d97e16029d858aeae05f7284275787
1 parent
870e1511
Exists in
spb-release/3.0
and in
2 other branches
Small correction: added _.
Signed-off-by: Alexandre Barbosa <alexandreab@live.com> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Carolina Ramalho <carol15022@hotmail.com>
Showing
3 changed files
with
9 additions
and
7 deletions
Show diff stats
colab/accounts/forms.py
... | ... | @@ -198,10 +198,10 @@ class UserCreationForm(UserForm): |
198 | 198 | username = forms.RegexField(label=_("Username"), max_length=30, |
199 | 199 | regex=r'^[\w.@+-]+$', |
200 | 200 | help_text=_(("Required. 30 characters or fewer" |
201 | - ". Letter and digits.")), | |
201 | + ". Letter, digits and _")), | |
202 | 202 | error_messages={ |
203 | 203 | 'invalid': _(("This value may contain only" |
204 | - " letters and numbers."))}) | |
204 | + ". Letters, digits and _"))}) | |
205 | 205 | password1 = forms.CharField(label=_("Password"), |
206 | 206 | widget=forms.PasswordInput) |
207 | 207 | password2 = forms.CharField(label=_("Password confirmation"), |
... | ... | @@ -251,9 +251,11 @@ class UserCreationForm(UserForm): |
251 | 251 | class UserChangeForm(forms.ModelForm): |
252 | 252 | username = forms.RegexField( |
253 | 253 | label=_("Username"), max_length=30, regex=r"^[\w*]", |
254 | - help_text=_("Required. 30 characters or fewer. Letters and digits."), | |
254 | + help_text=_("Required. 30 characters or fewer. Letters, digits and _." | |
255 | + ), | |
255 | 256 | error_messages={ |
256 | - 'invalid': _("This value may contain only letters and numbers.")}) | |
257 | + 'invalid': _("This value may contain only letters, numbers and _.") | |
258 | + }) | |
257 | 259 | password = ReadOnlyPasswordHashField(label=_("Password"), |
258 | 260 | help_text=_("Raw passwords are not" |
259 | 261 | " stored, so there is no" | ... | ... |
colab/accounts/models.py
... | ... | @@ -82,7 +82,7 @@ class User(AbstractUser): |
82 | 82 | # without having to rewrite all AbstractUser here |
83 | 83 | User._meta.get_field('email')._unique = True |
84 | 84 | User._meta.get_field('username').help_text = _( |
85 | - u'Required. 30 characters or fewer. Letters and digits.' | |
85 | + u'Required. 30 characters or fewer. Letters, digits and _.' | |
86 | 86 | ) |
87 | 87 | User._meta.get_field('username').validators[0] = validators.RegexValidator( |
88 | 88 | r'^\w+$', | ... | ... |
colab/locale/pt_BR/LC_MESSAGES/django.po
... | ... | @@ -1283,8 +1283,8 @@ msgstr "" |
1283 | 1283 | |
1284 | 1284 | |
1285 | 1285 | #: colab/accounts/forms.py:276 |
1286 | -msgid "This value may contain only letters and numbers." | |
1287 | -msgstr "Esse campo só pode conter letras e/ou numeros." | |
1286 | +msgid "This value may contain only letters, numbers and _." | |
1287 | +msgstr "Esse campo só pode conter letras, numeros e _." | |
1288 | 1288 | |
1289 | 1289 | #~ msgid "Please correct the errors below and try again" |
1290 | 1290 | #~ msgstr "Por favor, corrija os erros abaixo e tente novamente" | ... | ... |