From 41dca2eccb8b97797bfd05d3a7e25ef3e5354f06 Mon Sep 17 00:00:00 2001 From: zhengxie Date: Thu, 17 Jan 2013 11:01:00 +0800 Subject: [PATCH] Translate nickname error message --- profile/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profile/forms.py b/profile/forms.py index 6d463ce2fe..76fb63c308 100644 --- a/profile/forms.py +++ b/profile/forms.py @@ -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.'))