From d526ff00f2b95cbab9d4c7604922f65a9dae0a2b Mon Sep 17 00:00:00 2001 From: Ben Muschol Date: Sat, 9 Mar 2019 11:43:48 -0500 Subject: [PATCH] settings: Rename "user avatar" to "profile picture" This renames references to user avatars, bot avatars, or organization icons to profile pictures. The string in the UI are updated, in addition to the help files, comments, and documentation. Actual variable/function names, changelog entries, routes, and s3 buckets are left as-is in order to avoid introducing bugs. Fixes #11824. --- docs/testing/manual-testing.md | 2 +- static/js/settings_account.js | 2 +- static/js/settings_org.js | 2 +- static/templates/edit_bot.handlebars | 4 ++-- .../settings/account-settings.handlebars | 8 ++++---- .../templates/settings/bot-settings.handlebars | 6 +++--- .../organization-profile-admin.handlebars | 8 ++++---- templates/zerver/help/bots-and-integrations.md | 4 ++-- .../help/create-your-organization-profile.md | 2 +- .../zerver/help/getting-started-with-zulip.md | 2 +- templates/zerver/help/include/sidebar_index.md | 2 +- .../zerver/help/mention-a-user-or-group.md | 2 +- templates/zerver/help/set-your-avatar.md | 17 ----------------- .../zerver/help/set-your-profile-picture.md | 17 +++++++++++++++++ templates/zerver/help/view-someones-profile.md | 2 +- zerver/data_import/slack.py | 2 +- zerver/tests/test_email_notifications.py | 2 +- zerver/tests/test_upload.py | 2 +- zproject/prod_settings_template.py | 4 ++-- 19 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 templates/zerver/help/set-your-avatar.md create mode 100644 templates/zerver/help/set-your-profile-picture.md diff --git a/docs/testing/manual-testing.md b/docs/testing/manual-testing.md index 20c9a82cdf..78226082d2 100644 --- a/docs/testing/manual-testing.md +++ b/docs/testing/manual-testing.md @@ -402,7 +402,7 @@ Do these tasks as Cordelia. - Your account - Change full name (Hamlet should see the name change) - - Customize avatar + - Customize profile picture - Deactivate account (and then log in as Iago to re-activate Cordelia) - Display settings - Right now, these unfortunately require reloads to take effect. diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 6046ff0c5c..b96015bc0f 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -533,7 +533,7 @@ exports.set_up = function () { $("#user-avatar-source").hide(); var spinner = $("#upload_avatar_spinner").expectOne(); - loading.make_indicator(spinner, {text: 'Uploading avatar.'}); + loading.make_indicator(spinner, {text: 'Uploading profile picture.'}); channel.post({ url: '/json/users/me/avatar', diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 22fe810081..13e2ae6025 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -1022,7 +1022,7 @@ exports.build_page = function () { var error_field = $("#realm_icon_file_input_error"); error_field.hide(); var spinner = $("#upload_icon_spinner").expectOne(); - loading.make_indicator(spinner, {text: i18n.t("Uploading icon.")}); + loading.make_indicator(spinner, {text: i18n.t("Uploading profile picture.")}); $("#upload_icon_button_text").expectOne().hide(); channel.post({ diff --git a/static/templates/edit_bot.handlebars b/static/templates/edit_bot.handlebars index b25cbeaaa8..138dbf2a3a 100644 --- a/static/templates/edit_bot.handlebars +++ b/static/templates/edit_bot.handlebars @@ -21,10 +21,10 @@
- +
- +
diff --git a/static/templates/settings/account-settings.handlebars b/static/templates/settings/account-settings.handlebars index 9480eb7852..16171a2438 100644 --- a/static/templates/settings/account-settings.handlebars +++ b/static/templates/settings/account-settings.handlebars @@ -156,7 +156,7 @@
-

{{t "User avatar" }}

+

{{t "Profile picture" }}

@@ -165,16 +165,16 @@ {{t "Avatar from Gravatar" }}
- +
diff --git a/static/templates/settings/bot-settings.handlebars b/static/templates/settings/bot-settings.handlebars index eb50558dcf..e02c44520c 100644 --- a/static/templates/settings/bot-settings.handlebars +++ b/static/templates/settings/bot-settings.handlebars @@ -94,9 +94,9 @@
- - - ({{t "Optional" }}) + + + ({{t "Optional" }})

diff --git a/static/templates/settings/organization-profile-admin.handlebars b/static/templates/settings/organization-profile-admin.handlebars index 48aae6d410..52a5412e40 100644 --- a/static/templates/settings/organization-profile-admin.handlebars +++ b/static/templates/settings/organization-profile-admin.handlebars @@ -27,22 +27,22 @@ -
{{t "Organization avatar" }}
+
{{t "Organization profile picture" }}
+ id="realm_icon_file_input" value="{{t 'Upload profile picture' }}"/>
+ id="realm_icon_delete_button">{{t 'Delete profile picture' }}
diff --git a/templates/zerver/help/bots-and-integrations.md b/templates/zerver/help/bots-and-integrations.md index e71618f55b..b67ae53796 100644 --- a/templates/zerver/help/bots-and-integrations.md +++ b/templates/zerver/help/bots-and-integrations.md @@ -20,9 +20,9 @@ integration with an existing product, see our ## Anatomy of a bot You can think of a bot as a special kind of user, with limited permissions. -Each bot has a **name**, **avatar**, **email**, **bot type** and **API key**. +Each bot has a **name**, **profile picture**, **email**, **bot type** and **API key**. -* The **name** and **avatar** play the same role they do for human users. They +* The **name** and **profile picture** play the same role they do for human users. They are the most visible attributes of a bot. * The **email** is not used for anything, and will likely be removed in a diff --git a/templates/zerver/help/create-your-organization-profile.md b/templates/zerver/help/create-your-organization-profile.md index e583d24c3e..8eb9af1cfc 100644 --- a/templates/zerver/help/create-your-organization-profile.md +++ b/templates/zerver/help/create-your-organization-profile.md @@ -19,7 +19,7 @@ including bold/italic, links, lists, and {settings_tab|organization-profile} -1. Edit your organization **name**, **description**, and **avatar**. +1. Edit your organization **name**, **description**, and **profile picture**. 1. Click **Save changes**. {end_tabs} diff --git a/templates/zerver/help/getting-started-with-zulip.md b/templates/zerver/help/getting-started-with-zulip.md index 43b15ca7b5..2b8a90247c 100644 --- a/templates/zerver/help/getting-started-with-zulip.md +++ b/templates/zerver/help/getting-started-with-zulip.md @@ -14,7 +14,7 @@ or desktop experience. ## Set up your account -- [Set a profile picture](/help/set-your-avatar) +- [Set a profile picture](/help/set-your-profile-picture) - Get the [mobile and desktop apps](/apps) - [Browse and subscribe to streams](/help/browse-and-subscribe-to-streams) - [Configure your notifications](/#settings/notifications) to work the way diff --git a/templates/zerver/help/include/sidebar_index.md b/templates/zerver/help/include/sidebar_index.md index 4afd966895..6013bd16a8 100644 --- a/templates/zerver/help/include/sidebar_index.md +++ b/templates/zerver/help/include/sidebar_index.md @@ -12,7 +12,7 @@ * [Edit your profile](/help/edit-your-profile) * [Change your password](/help/change-your-password) * [Review your settings](/help/review-your-settings) -* [Set your avatar](/help/set-your-avatar) +* [Set your profile picture](/help/set-your-profile-picture) * [Change your language](/help/change-your-language) * [Use 24-hour time](/help/change-the-time-format) * [Joining an organization](/help/join-a-zulip-organization) diff --git a/templates/zerver/help/mention-a-user-or-group.md b/templates/zerver/help/mention-a-user-or-group.md index 54ba3e8079..0e85677c53 100644 --- a/templates/zerver/help/mention-a-user-or-group.md +++ b/templates/zerver/help/mention-a-user-or-group.md @@ -29,7 +29,7 @@ messages and alert words. {end_tabs} -Alternatively, click on the avatar of any user in the main message feed. +Alternatively, click on the profile picture of any user in the main message feed. ## Silently mention a user diff --git a/templates/zerver/help/set-your-avatar.md b/templates/zerver/help/set-your-avatar.md deleted file mode 100644 index 9cc78351ea..0000000000 --- a/templates/zerver/help/set-your-avatar.md +++ /dev/null @@ -1,17 +0,0 @@ -# Set your avatar - -By default, Zulip uses avatars from [Gravatar](https://en.gravatar.com/). -If your email address already has a gravatar associated with it, Zulip will -use your existing gravatar. - -You can also upload a custom avatar to Zulip. - -### Set your avatar - -{start_tabs} - -{settings_tab|your-account} - -2. Under **User Avatar**, click **Upload new avatar** and choose an image to upload. - -{end_tabs} diff --git a/templates/zerver/help/set-your-profile-picture.md b/templates/zerver/help/set-your-profile-picture.md new file mode 100644 index 0000000000..cebed6dbe4 --- /dev/null +++ b/templates/zerver/help/set-your-profile-picture.md @@ -0,0 +1,17 @@ +# Set your profile picture + +By default, Zulip uses profile picture from [Gravatar](https://en.gravatar.com/). +If your email address already has a gravatar associated with it, Zulip will +use your existing gravatar. + +You can also upload a custom profile picture to Zulip. + +### Set your profile picture + +{start_tabs} + +{settings_tab|your-account} + +2. Under **Profile picture**, click **Upload new profile picture** and choose an image to upload. + +{end_tabs} diff --git a/templates/zerver/help/view-someones-profile.md b/templates/zerver/help/view-someones-profile.md index c6f0c6e37d..f566ddd55e 100644 --- a/templates/zerver/help/view-someones-profile.md +++ b/templates/zerver/help/view-someones-profile.md @@ -8,7 +8,7 @@ were last active, and any ### Via the message list -1. Click on a user's avatar. +1. Click on a user's profile picture. 1. Click **View full profile**. diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py index 4b8dfe59d3..7592a7fab0 100755 --- a/zerver/data_import/slack.py +++ b/zerver/data_import/slack.py @@ -161,7 +161,7 @@ def users_to_zerver_userprofile(slack_data_dir: str, users: List[ZerverFieldsT], email = get_user_email(user, domain_name) # avatar - # ref: https://chat.zulip.org/help/set-your-avatar + # ref: https://chat.zulip.org/help/set-your-profile-picture avatar_url = build_avatar_url(slack_user_id, user['team_id'], user['profile']['avatar_hash']) build_avatar(user_id, realm_id, email, avatar_url, timestamp, avatar_list) diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.py index d5257e46cb..4fa256950d 100644 --- a/zerver/tests/test_email_notifications.py +++ b/zerver/tests/test_email_notifications.py @@ -845,7 +845,7 @@ class TestMissedMessages(ZulipTestCase): '/user_uploads/2/1f/some_random_value' self.assertEqual(actual_output, expected_output) - # A user avatar like syntax, but not actually in an HTML tag + # A profile picture like syntax, but not actually in an HTML tag test_data = '

Set src="/avatar/username@example.com?s=30"

' actual_output = relative_to_full_url("http://example.com", test_data) expected_output = '

Set src="/avatar/username@example.com?s=30"

' diff --git a/zerver/tests/test_upload.py b/zerver/tests/test_upload.py index 1208f018b2..a247381d16 100644 --- a/zerver/tests/test_upload.py +++ b/zerver/tests/test_upload.py @@ -1055,7 +1055,7 @@ class AvatarTest(UploadSerializeMixin, ZulipTestCase): def test_delete_avatar(self) -> None: """ - A DELETE request to /json/users/me/avatar should delete the user avatar and return gravatar URL + A DELETE request to /json/users/me/avatar should delete the profile picture and return gravatar URL """ self.login(self.example_email("hamlet")) hamlet = self.example_user('hamlet') diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py index 57ef8e09e9..797e1fec17 100644 --- a/zproject/prod_settings_template.py +++ b/zproject/prod_settings_template.py @@ -280,7 +280,7 @@ FEEDBACK_EMAIL = ZULIP_ADMINISTRATOR # "file:///" as a hyperlink (useful if you have e.g. an NFS share). ENABLE_FILE_LINKS = False -# By default, files uploaded by users and user avatars are stored +# By default, files uploaded by users and profile pictures are stored # directly on the Zulip server. You can configure files being instead # stored in Amazon S3 or another scalable data store here. See docs at: # @@ -476,7 +476,7 @@ AUTH_LDAP_USER_ATTR_MAP = { # "first_name": "fn", # "last_name": "ln", - # User avatars can be pulled from the LDAP "thumbnailPhoto"/"jpegPhoto" field. + # Profile pictures can be pulled from the LDAP "thumbnailPhoto"/"jpegPhoto" field. # "avatar": "thumbnailPhoto", # This line is for having Zulip to automatically deactivate users