diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index c3ae47a795..bebb1001ed 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-02 16:07+0800\n" +"POT-Creation-Date: 2016-08-03 11:50+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,7 +65,7 @@ msgstr "" msgid "Email %s invalid." msgstr "" -#: seahub/api2/endpoints/invitations.py:56 +#: seahub/api2/endpoints/invitations.py:56 seahub/base/accounts.py:575 #, python-format msgid "User %s already exists." msgstr "" @@ -385,10 +385,6 @@ msgstr "" msgid "Enter a valid email address." msgstr "" -#: seahub/base/accounts.py:575 -msgid "A user with this email already" -msgstr "" - #: seahub/base/accounts.py:579 msgid "Invalid user id." msgstr "" @@ -738,8 +734,8 @@ msgstr "" #: seahub/message/templates/message/user_msg_list.html:52 #: seahub/message/templates/message/user_msg_list.html:54 #: seahub/notifications/templates/notifications/notification_list.html:33 -#: seahub/profile/templates/profile/set_profile.html:144 -#: seahub/profile/templates/profile/set_profile.html:146 +#: seahub/profile/templates/profile/set_profile.html:137 +#: seahub/profile/templates/profile/set_profile.html:139 #: seahub/templates/js/sysadmin-templates.html:373 #: seahub/templates/js/sysadmin-templates.html:432 #: seahub/templates/js/sysadmin-templates.html:497 @@ -2650,8 +2646,8 @@ msgid "Two-Factor Authentication" msgstr "" #: seahub/profile/templates/profile/set_profile.html:20 -#: seahub/profile/templates/profile/set_profile.html:142 -#: seahub/profile/templates/profile/set_profile.html:165 +#: seahub/profile/templates/profile/set_profile.html:135 +#: seahub/profile/templates/profile/set_profile.html:158 msgid "Delete Account" msgstr "" @@ -2737,43 +2733,36 @@ msgstr "" #: seahub/profile/templates/profile/set_profile.html:118 msgid "" -"If you don't have any device with you, you can access\n" -" your account using backup codes." +"If you don't have any device with you, you can access your account using " +"backup codes." msgstr "" -#: seahub/profile/templates/profile/set_profile.html:120 +#: seahub/profile/templates/profile/set_profile.html:119 #, python-format -msgid "" -"\n" -" You have only one backup code remaining.\n" -" " -msgid_plural "" -"\n" -" You have %(counter)s backup codes remaining.\n" -" " +msgid "You have only one backup code remaining." +msgid_plural "You have %(counter)s backup codes remaining." msgstr[0] "" msgstr[1] "" -#: seahub/profile/templates/profile/set_profile.html:127 +#: seahub/profile/templates/profile/set_profile.html:122 msgid "Show Codes" msgstr "" -#: seahub/profile/templates/profile/set_profile.html:131 +#: seahub/profile/templates/profile/set_profile.html:126 msgid "" -"Two-factor authentication is not enabled for your\n" -" account. Enable two-factor authentication for enhanced account\n" -" security." +"Two-factor authentication is not enabled for your account. Enable two-factor " +"authentication for enhanced account security." msgstr "" -#: seahub/profile/templates/profile/set_profile.html:135 +#: seahub/profile/templates/profile/set_profile.html:128 msgid "Enable Two-Factor Authentication" msgstr "" -#: seahub/profile/templates/profile/set_profile.html:143 +#: seahub/profile/templates/profile/set_profile.html:136 msgid "This operation will not be reverted. Please think twice!" msgstr "" -#: seahub/profile/templates/profile/set_profile.html:166 +#: seahub/profile/templates/profile/set_profile.html:159 msgid "Really want to delete your account?" msgstr "" @@ -6170,10 +6159,6 @@ msgstr "" msgid "No conflict in the merge." msgstr "" -#: seahub/views/ajax.py:1588 -msgid "Faied to change password, you are not owner." -msgstr "" - #: seahub/views/ajax.py:1694 seahub/views/ajax.py:1836 msgid "Invalid folder permission, should be \"rw\" or \"r\"" msgstr "" diff --git a/locale/en/LC_MESSAGES/djangojs.po b/locale/en/LC_MESSAGES/djangojs.po index 5be9a405db..622d032a54 100644 --- a/locale/en/LC_MESSAGES/djangojs.po +++ b/locale/en/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-08-02 16:07+0800\n" +"POT-Creation-Date: 2016-08-03 11:50+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/seahub/base/accounts.py b/seahub/base/accounts.py index 50f731b165..4bc1fc1742 100644 --- a/seahub/base/accounts.py +++ b/seahub/base/accounts.py @@ -572,7 +572,7 @@ class RegistrationForm(forms.Form): if not emailuser: return self.cleaned_data['email'] else: - raise forms.ValidationError(_("A user with this email already")) + raise forms.ValidationError(_("User %s already exists.") % email) def clean_userid(self): if self.cleaned_data['userid'] and len(self.cleaned_data['userid']) != 40: diff --git a/seahub/profile/templates/profile/set_profile.html b/seahub/profile/templates/profile/set_profile.html index cd65122655..3644feae3b 100644 --- a/seahub/profile/templates/profile/set_profile.html +++ b/seahub/profile/templates/profile/set_profile.html @@ -115,22 +115,15 @@

- {% blocktrans %}If you don't have any device with you, you can access - your account using backup codes.{% endblocktrans %} - {% blocktrans count counter=backup_tokens %} - You have only one backup code remaining. - {% plural %} - You have {{ counter }} backup codes remaining. - {% endblocktrans %} + {% blocktrans %}If you don't have any device with you, you can access your account using backup codes.{% endblocktrans %} + {% blocktrans count counter=backup_tokens %}You have only one backup code remaining.{% plural %}You have {{ counter }} backup codes remaining.{% endblocktrans %}

{% trans "Show Codes" %}

{% else %} -

{% blocktrans %}Two-factor authentication is not enabled for your - account. Enable two-factor authentication for enhanced account - security.{% endblocktrans %}

+

{% blocktrans %}Two-factor authentication is not enabled for your account. Enable two-factor authentication for enhanced account security.{% endblocktrans %}

{% trans "Enable Two-Factor Authentication" %}

diff --git a/seahub/views/ajax.py b/seahub/views/ajax.py index 45b697d52a..f3feb4ffee 100644 --- a/seahub/views/ajax.py +++ b/seahub/views/ajax.py @@ -1585,8 +1585,8 @@ def ajax_repo_change_passwd(request, repo_id): is_owner = True if username == repo_owner else False if not is_owner: return HttpResponse(json.dumps({ - 'error': _('Faied to change password, you are not owner.')}), - status=400, content_type=content_type) + 'error': 'Permission denied'}), + status=403, content_type=content_type) old_passwd = request.POST.get('old_passwd', '') new_passwd = request.POST.get('new_passwd', '')