Repository: zulip/zulip

Issue:
Change "invite-only" wording to "private"
![screenshot from 2018-05-31 16-47-49](https://user-images.githubusercontent.com/549661/40807927-9f721af0-64f3-11e8-9a12-2de8aa2ee678.png)
We should be referring to private streams as "private streams" everywhere that isn't a code-level identifier. (see https://chat.zulip.org/#narrow/stream/19-documentation/subject/private.20versus.20invite-only/near/586071)


Discussion:
These can read:
**public stream**
**private stream** with **shared history**
**private stream** with **protected history**

for the three cases.
Hello @zulip/server-user-docs members, this issue was labeled with the "area: documentation (user)" label, so you may want to check it out!

<!-- areaLabelNotification -->
I'd love for this to happen before the 1.9.0 release, so our terminology is consistent in the released version.  @eeshangarg can you take this?
Thanks @eeshangarg! Re-opening, since I think there may be a few more, and it would be good to go through and also correct the few places where the content is now incorrect (e.g. what does the API now return for the privacy of a stream?)

I found a few more, e.g. in zerver/views/streams.py, with the following command
`git grep -Ini "invite[^_]only" -- ':(exclude)static/locale/' .;`
I believe the scope of this ticket is only user-facing docs?  Changing what we return in the API is a non-trivial deprecation problem.
yeah, changing the API should not be a part of this. I assumed the API had been changed (and just the docs hadn't), but it looks like that isn't the case.

In any case, the ones in zerver/views/streams.py are error and/or success messages, which I think we should update as a part of this. 

Resolving patch:
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -2253,7 +2253,7 @@ def validate_user_access_to_subscribers_helper(user_profile: Optional[UserProfil
         return
 
     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 private stream"))
 
 def bulk_get_subscriber_user_ids(stream_dicts: Iterable[Mapping[str, Any]],
                                  user_profile: UserProfile,
diff --git a/zerver/views/streams.py b/zerver/views/streams.py
--- a/zerver/views/streams.py
+++ b/zerver/views/streams.py
@@ -308,7 +308,7 @@ def add_subscriptions_backend(
 
     if len(principals) > 0:
         if user_profile.realm.is_zephyr_mirror_realm and not all(stream.invite_only for stream in streams):
-            return json_error(_("You can only invite other Zephyr mirroring users to invite-only streams."))
+            return json_error(_("You can only invite other Zephyr mirroring users to private streams."))
         subscribers = set(principal_to_user_profile(user_profile, principal) for principal in principals)
     else:
         subscribers = set([user_profile])


Test patch:
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -2770,9 +2770,9 @@ def test_list_respects_invite_only_bit(self) -> None:
         self.assertIn("subscriptions", result.json())
         for sub in result.json()["subscriptions"]:
             if sub['name'] == "Normandy":
-                self.assertEqual(sub['invite_only'], False, "Normandy was mistakenly marked invite-only")
+                self.assertEqual(sub['invite_only'], False, "Normandy was mistakenly marked private")
             if sub['name'] == "Saxony":
-                self.assertEqual(sub['invite_only'], True, "Saxony was not properly marked invite-only")
+                self.assertEqual(sub['invite_only'], True, "Saxony was not properly marked private")
 
     @slow("lots of queries")
     def test_inviteonly(self) -> None: