Commit faf297e9ece0d4b8db553b0c60338e609d504cac

Authored by Alexandre Barbosa
2 parents 83dc32cc ea9742ad

Merge branch 'translation_sprint_30' into 'spb-release/3.0'

Translation sprint 30

See merge request !55
colab/accounts/forms.py
@@ -198,12 +198,10 @@ class UserCreationForm(UserForm): @@ -198,12 +198,10 @@ class UserCreationForm(UserForm):
198 username = forms.RegexField(label=_("Username"), max_length=30, 198 username = forms.RegexField(label=_("Username"), max_length=30,
199 regex=r'^[\w.@+-]+$', 199 regex=r'^[\w.@+-]+$',
200 help_text=_(("Required. 30 characters or fewer" 200 help_text=_(("Required. 30 characters or fewer"
201 - ". Letters, digits and "  
202 - "@/./+/-/_ only.")), 201 + ". Letter, digits and _")),
203 error_messages={ 202 error_messages={
204 'invalid': _(("This value may contain only" 203 'invalid': _(("This value may contain only"
205 - " letters, numbers and "  
206 - "@/./+/-/_ characters."))}) 204 + ". Letters, digits and _"))})
207 password1 = forms.CharField(label=_("Password"), 205 password1 = forms.CharField(label=_("Password"),
208 widget=forms.PasswordInput) 206 widget=forms.PasswordInput)
209 password2 = forms.CharField(label=_("Password confirmation"), 207 password2 = forms.CharField(label=_("Password confirmation"),
@@ -252,12 +250,12 @@ class UserCreationForm(UserForm): @@ -252,12 +250,12 @@ class UserCreationForm(UserForm):
252 250
253 class UserChangeForm(forms.ModelForm): 251 class UserChangeForm(forms.ModelForm):
254 username = forms.RegexField( 252 username = forms.RegexField(
255 - label=_("Username"), max_length=30, regex=r"^[\w.@+-]+$",  
256 - help_text=_("Required. 30 characters or fewer. Letters, digits and "  
257 - "@/./+/-/_ only."), 253 + label=_("Username"), max_length=30, regex=r"^[\w*]",
  254 + help_text=_("Required. 30 characters or fewer. Letters, digits and _."
  255 + ),
258 error_messages={ 256 error_messages={
259 - 'invalid': _("This value may contain only letters, numbers and "  
260 - "@/./+/-/_ characters.")}) 257 + 'invalid': _("This value may contain only letters, numbers and _.")
  258 + })
261 password = ReadOnlyPasswordHashField(label=_("Password"), 259 password = ReadOnlyPasswordHashField(label=_("Password"),
262 help_text=_("Raw passwords are not" 260 help_text=_("Raw passwords are not"
263 " stored, so there is no" 261 " stored, so there is no"
colab/accounts/models.py
@@ -82,8 +82,7 @@ class User(AbstractUser): @@ -82,8 +82,7 @@ class User(AbstractUser):
82 # without having to rewrite all AbstractUser here 82 # without having to rewrite all AbstractUser here
83 User._meta.get_field('email')._unique = True 83 User._meta.get_field('email')._unique = True
84 User._meta.get_field('username').help_text = _( 84 User._meta.get_field('username').help_text = _(
85 - u'Required. 30 characters or fewer. Letters, digits and '  
86 - u'./+/-/_ only.' 85 + u'Required. 30 characters or fewer. Letters, digits and _.'
87 ) 86 )
88 User._meta.get_field('username').validators[0] = validators.RegexValidator( 87 User._meta.get_field('username').validators[0] = validators.RegexValidator(
89 r'^\w+$', 88 r'^\w+$',
colab/locale/pt_BR/LC_MESSAGES/django.mo
No preview for this file type
colab/locale/pt_BR/LC_MESSAGES/django.po
@@ -1281,6 +1281,11 @@ msgstr "" @@ -1281,6 +1281,11 @@ msgstr ""
1281 "Outro exemplo de uso com relacionamento. Usado para recuperar todos as " 1281 "Outro exemplo de uso com relacionamento. Usado para recuperar todos as "
1282 "mensagem de um dado usuário usando o campo username ou email" 1282 "mensagem de um dado usuário usando o campo username ou email"
1283 1283
  1284 +
  1285 +#: colab/accounts/forms.py:276
  1286 +msgid "This value may contain only letters, numbers and _."
  1287 +msgstr "Esse campo só pode conter letras, numeros e _."
  1288 +
1284 #~ msgid "Please correct the errors below and try again" 1289 #~ msgid "Please correct the errors below and try again"
1285 #~ msgstr "Por favor, corrija os erros abaixo e tente novamente" 1290 #~ msgstr "Por favor, corrija os erros abaixo e tente novamente"
1286 1291