i18n: Fix a last few strings mentioning realms.

This commit is contained in:
Tim Abbott 2018-03-07 17:05:50 -08:00
parent c47403b024
commit c3964dff6e
5 changed files with 6 additions and 6 deletions

View File

@ -2063,7 +2063,7 @@ def validate_user_access_to_subscribers_helper(user_profile: Optional[UserProfil
raise ValidationError("Requesting user not in given realm") raise ValidationError("Requesting user not in given realm")
if user_profile.realm.is_zephyr_mirror_realm and not stream_dict["invite_only"]: if user_profile.realm.is_zephyr_mirror_realm and not stream_dict["invite_only"]:
raise JsonableError(_("You cannot get subscribers for public streams in this realm")) raise JsonableError(_("Subscriber data is not available for this stream"))
if (stream_dict["invite_only"] and not check_user_subscribed()): if (stream_dict["invite_only"] and not check_user_subscribed()):
raise JsonableError(_("Unable to retrieve subscribers for invite-only stream")) raise JsonableError(_("Unable to retrieve subscribers for invite-only stream"))

View File

@ -1659,7 +1659,7 @@ class TestJWTLogin(ZulipTestCase):
web_token = jwt.encode(payload, auth_key).decode('utf8') web_token = jwt.encode(payload, auth_key).decode('utf8')
data = {'json_web_token': web_token} data = {'json_web_token': web_token}
result = self.client_post('/accounts/login/jwt/', data) result = self.client_post('/accounts/login/jwt/', data)
self.assert_json_error_contains(result, "No realm specified in JSON web token claims", 400) self.assert_json_error_contains(result, "No organization specified in JSON web token claims", 400)
def test_login_failure_when_key_does_not_exist(self) -> None: def test_login_failure_when_key_does_not_exist(self) -> None:
data = {'json_web_token': 'not relevant'} data = {'json_web_token': 'not relevant'}

View File

@ -220,7 +220,7 @@ class AdminCreateUserTest(ZulipTestCase):
short_name='Romeo', short_name='Romeo',
)) ))
self.assert_json_error(result, self.assert_json_error(result,
"Email 'romeo@not-zulip.com' not allowed for realm 'zulip'") "Email 'romeo@not-zulip.com' not allowed in this organization")
RealmDomain.objects.create(realm=get_realm('zulip'), domain='zulip.net') RealmDomain.objects.create(realm=get_realm('zulip'), domain='zulip.net')

View File

@ -231,7 +231,7 @@ def remote_user_jwt(request: HttpRequest) -> HttpResponse:
raise JsonableError(_("No user specified in JSON web token claims")) raise JsonableError(_("No user specified in JSON web token claims"))
email_domain = payload.get('realm', None) email_domain = payload.get('realm', None)
if email_domain is None: if email_domain is None:
raise JsonableError(_("No realm specified in JSON web token claims")) raise JsonableError(_("No organization specified in JSON web token claims"))
email = "%s@%s" % (remote_user, email_domain) email = "%s@%s" % (remote_user, email_domain)

View File

@ -453,8 +453,8 @@ def create_user_backend(request: HttpRequest, user_profile: UserProfile,
# invited first.) # invited first.)
realm = user_profile.realm realm = user_profile.realm
if not email_allowed_for_realm(email, user_profile.realm): if not email_allowed_for_realm(email, user_profile.realm):
return json_error(_("Email '%(email)s' not allowed for realm '%(realm)s'") % return json_error(_("Email '%(email)s' not allowed in this organization") %
{'email': email, 'realm': realm.string_id}) {'email': email})
try: try:
get_user(email, user_profile.realm) get_user(email, user_profile.realm)