realm: Clean up use of "Realm" in more user-facing strings.

We should be talking about organization names.
This commit is contained in:
Tim Abbott 2018-03-16 16:47:55 -07:00
parent 8e334b0f64
commit 149f3efe5a
2 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ class RealmTest(ZulipTestCase):
self.login(email)
result = self.client_patch('/json/realm', data)
self.assert_json_error(result, 'Realm description is too long.')
self.assert_json_error(result, 'Organization description is too long.')
realm = get_realm('zulip')
self.assertNotEqual(realm.description, new_description)
@ -106,7 +106,7 @@ class RealmTest(ZulipTestCase):
self.login(email)
result = self.client_patch('/json/realm', data)
self.assert_json_error(result, 'Realm name is too long.')
self.assert_json_error(result, 'Organization name is too long.')
realm = get_realm('zulip')
self.assertNotEqual(realm.name, new_name)

View File

@ -60,9 +60,9 @@ def update_realm(
if default_language is not None and default_language not in get_available_language_codes():
raise JsonableError(_("Invalid language '%s'" % (default_language,)))
if description is not None and len(description) > 1000:
return json_error(_("Realm description is too long."))
return json_error(_("Organization description is too long."))
if name is not None and len(name) > Realm.MAX_REALM_NAME_LENGTH:
return json_error(_("Realm name is too long."))
return json_error(_("Organization name is too long."))
if authentication_methods is not None and True not in list(authentication_methods.values()):
return json_error(_("At least one authentication method must be enabled."))
if signup_notifications_stream_id is not None and settings.NEW_USER_BOT is None: