From c56de199f4f6647ff415bf6d60e5e460580a41a5 Mon Sep 17 00:00:00 2001 From: hachiyanagi-ks Date: Mon, 5 Oct 2015 13:57:10 +0900 Subject: [PATCH] Merge pull request #393 from hachiyanagi-ks/develop/cypress/fix-layouts-register Fix messages in registration #392 (cherry picked from commit a85b6f914c0042e5653677034c9528ac022e42c8) --- ga/conf/locale/ja_JP/LC_MESSAGES/gacco.po | 8 ++++++++ openedx/core/djangoapps/user_api/tests/test_views.py | 4 ++-- openedx/core/djangoapps/user_api/views.py | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ga/conf/locale/ja_JP/LC_MESSAGES/gacco.po b/ga/conf/locale/ja_JP/LC_MESSAGES/gacco.po index 02eb5a4fee2c..d6b8504b8218 100644 --- a/ga/conf/locale/ja_JP/LC_MESSAGES/gacco.po +++ b/ga/conf/locale/ja_JP/LC_MESSAGES/gacco.po @@ -2291,6 +2291,14 @@ msgstr "半角英数{password_min_length}文字以上" msgid "It includes single-byte uppercase and lowercase letters, numbers, one or more characters" msgstr "半角アルファベットの大文字、小文字、数字を1文字以上含めてください" +#: openedx/core/djangoapps/user_api/views.py +msgid "Alphanumeric characters {min_length} or more characters, {max_length} characters or less" +msgstr "半角英数{min_length}文字以上、{max_length}文字以下" + +#: openedx/core/djangoapps/user_api/views.py +msgid "I agree to the {platform_name} {terms_of_service}." +msgstr "{terms_of_service}に同意" + #-#-#-#-# Original messages in gacco/templates #-#-#-#-# #: templates/theme-header.html diff --git a/openedx/core/djangoapps/user_api/tests/test_views.py b/openedx/core/djangoapps/user_api/tests/test_views.py index 6653e673e679..486605d486d0 100644 --- a/openedx/core/djangoapps/user_api/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/tests/test_views.py @@ -881,7 +881,7 @@ def test_register_form_default_fields(self): u"required": True, u"label": u"Public username", u"placeholder": u"JaneDoe", - u"instructions": u"The name that will identify you in your courses - (cannot be changed later)", + u"instructions": u"Alphanumeric characters 2 or more characters, 30 characters or less
The name that will identify you in your courses - (cannot be changed later)", u"restrictions": { "min_length": USERNAME_MIN_LENGTH, "max_length": USERNAME_MAX_LENGTH @@ -970,7 +970,7 @@ def test_register_form_third_party_auth_running(self): u"required": True, u"label": u"Public username", u"placeholder": u"JaneDoe", - u"instructions": u"The name that will identify you in your courses - (cannot be changed later)", + u"instructions": u"Alphanumeric characters 2 or more characters, 30 characters or less
The name that will identify you in your courses - (cannot be changed later)", u"restrictions": { "min_length": USERNAME_MIN_LENGTH, "max_length": USERNAME_MAX_LENGTH diff --git a/openedx/core/djangoapps/user_api/views.py b/openedx/core/djangoapps/user_api/views.py index 3e51c56d7090..a482e6ff4df3 100644 --- a/openedx/core/djangoapps/user_api/views.py +++ b/openedx/core/djangoapps/user_api/views.py @@ -390,6 +390,8 @@ def _add_username_field(self, form_desc, required=True): # Translators: These instructions appear on the registration form, immediately # below a field meant to hold the user's public username. username_instructions = _( + u"Alphanumeric characters {min_length} or more characters, {max_length} characters or less" + ).format(min_length=2, max_length=30) + "
" + _( u"The name that will identify you in your courses - " "{bold_start}(cannot be changed later){bold_end}" ).format(bold_start=u'', bold_end=u'')