mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-21 19:00:12 +00:00
Translate nickname error message
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# encoding: utf-8
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from seahub.utils import validate_group_name
|
||||
|
||||
@@ -12,4 +13,4 @@ class ProfileForm(forms.Form):
|
||||
if validate_group_name(nickname):
|
||||
return nickname
|
||||
else:
|
||||
raise forms.ValidationError(u'昵称只能包含中英文字符、数字及下划线')
|
||||
raise forms.ValidationError(_(u'Nickname can only contain characters, numbers or underscore.'))
|
||||
|
Reference in New Issue
Block a user