mirror of https://github.com/zulip/zulip.git
i18n: Fix a last few strings mentioning realms.
This commit is contained in:
parent
c47403b024
commit
c3964dff6e
|
@ -2063,7 +2063,7 @@ def validate_user_access_to_subscribers_helper(user_profile: Optional[UserProfil
|
|||
raise ValidationError("Requesting user not in given realm")
|
||||
|
||||
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()):
|
||||
raise JsonableError(_("Unable to retrieve subscribers for invite-only stream"))
|
||||
|
|
|
@ -1659,7 +1659,7 @@ class TestJWTLogin(ZulipTestCase):
|
|||
web_token = jwt.encode(payload, auth_key).decode('utf8')
|
||||
data = {'json_web_token': web_token}
|
||||
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:
|
||||
data = {'json_web_token': 'not relevant'}
|
||||
|
|
|
@ -220,7 +220,7 @@ class AdminCreateUserTest(ZulipTestCase):
|
|||
short_name='Romeo',
|
||||
))
|
||||
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')
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ def remote_user_jwt(request: HttpRequest) -> HttpResponse:
|
|||
raise JsonableError(_("No user specified in JSON web token claims"))
|
||||
email_domain = payload.get('realm', 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)
|
||||
|
||||
|
|
|
@ -453,8 +453,8 @@ def create_user_backend(request: HttpRequest, user_profile: UserProfile,
|
|||
# invited first.)
|
||||
realm = 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'") %
|
||||
{'email': email, 'realm': realm.string_id})
|
||||
return json_error(_("Email '%(email)s' not allowed in this organization") %
|
||||
{'email': email})
|
||||
|
||||
try:
|
||||
get_user(email, user_profile.realm)
|
||||
|
|
Loading…
Reference in New Issue