registration: Set the organization language at creation time.

In this commit, we add a new dropdown 'Organization language' on
the `/new` and `/realm/register` pages. This dropdown allows setting
the language of the organization during its creation. This allows
messages from Welcome Bot and introductory messages in streams to be
internationalized.

Fixes a part of #25729.
This commit is contained in:
Hemant Umre
2023-09-13 01:28:58 +05:30
committed by Tim Abbott
parent f8aac58a6a
commit ac1f711fef
14 changed files with 191 additions and 18 deletions

View File

@@ -310,6 +310,7 @@ class TestGenerateRealmCreationLink(ZulipTestCase):
"email": email,
"realm_name": "Zulip test",
"realm_type": Realm.ORG_TYPES["business"]["id"],
"realm_default_language": "en",
"realm_subdomain": "custom-test",
},
)
@@ -337,12 +338,13 @@ class TestGenerateRealmCreationLink(ZulipTestCase):
"email": email,
"realm_name": realm_name,
"realm_type": Realm.ORG_TYPES["business"]["id"],
"realm_default_language": "en",
"realm_subdomain": string_id,
},
)
self.assertEqual(result.status_code, 302)
self.assertEqual(
f"/accounts/new/send_confirm/?email={urllib.parse.quote(email)}&realm_name={urllib.parse.quote_plus(realm_name)}&realm_type=10&realm_subdomain={string_id}",
f"/accounts/new/send_confirm/?email={urllib.parse.quote(email)}&realm_name={urllib.parse.quote_plus(realm_name)}&realm_type=10&realm_default_language=en&realm_subdomain={string_id}",
result["Location"],
)
result = self.client_get(result["Location"])