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.
This commit is contained in:
Ben Muschol 2019-03-09 11:43:48 -05:00 committed by Tim Abbott
parent cfbe316215
commit d526ff00f2
19 changed files with 45 additions and 45 deletions

View File

@ -402,7 +402,7 @@ Do these tasks as Cordelia.
- Your account - Your account
- Change full name (Hamlet should see the name change) - 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) - Deactivate account (and then log in as Iago to re-activate Cordelia)
- Display settings - Display settings
- Right now, these unfortunately require reloads to take effect. - Right now, these unfortunately require reloads to take effect.

View File

@ -533,7 +533,7 @@ exports.set_up = function () {
$("#user-avatar-source").hide(); $("#user-avatar-source").hide();
var spinner = $("#upload_avatar_spinner").expectOne(); var spinner = $("#upload_avatar_spinner").expectOne();
loading.make_indicator(spinner, {text: 'Uploading avatar.'}); loading.make_indicator(spinner, {text: 'Uploading profile picture.'});
channel.post({ channel.post({
url: '/json/users/me/avatar', url: '/json/users/me/avatar',

View File

@ -1022,7 +1022,7 @@ exports.build_page = function () {
var error_field = $("#realm_icon_file_input_error"); var error_field = $("#realm_icon_file_input_error");
error_field.hide(); error_field.hide();
var spinner = $("#upload_icon_spinner").expectOne(); 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(); $("#upload_icon_button_text").expectOne().hide();
channel.post({ channel.post({

View File

@ -21,10 +21,10 @@
</div> </div>
<div class="avatar-section"> <div class="avatar-section">
<label for="bot_avatar_file_input">Avatar</label> <label for="bot_avatar_file_input">Avatar</label>
<input type="file" name="bot_avatar_file_input" class="notvisible edit_bot_avatar_file_input" value="{{t 'Upload avatar' }}" /> <input type="file" name="bot_avatar_file_input" class="notvisible edit_bot_avatar_file_input" value="{{t 'Upload profile picture' }}" />
<div class="edit_bot_avatar_file"></div> <div class="edit_bot_avatar_file"></div>
<button type="button" class="btn btn-default edit_bot_avatar_upload_button">{{t "Choose avatar" }}</button> <button type="button" class="btn btn-default edit_bot_avatar_upload_button">{{t "Choose avatar" }}</button>
<button type="button" class="btn btn-default edit_bot_avatar_clear_button display-none">{{t "Clear avatar" }}</button> <button type="button" class="btn btn-default edit_bot_avatar_clear_button display-none">{{t "Clear profile picture" }}</button>
<div><label for="edit_bot_avatar_file" generated="true" class="edit_bot_avatar_error text-error"></label></div> <div><label for="edit_bot_avatar_file" generated="true" class="edit_bot_avatar_error text-error"></label></div>
</div> </div>
<div class="buttons"> <div class="buttons">

View File

@ -156,7 +156,7 @@
</div> </div>
<div class="inline-block user-avatar-section"> <div class="inline-block user-avatar-section">
<h3>{{t "User avatar" }}</h3> <h3>{{t "Profile picture" }}</h3>
<div class="inline-block"> <div class="inline-block">
<div id="user-settings-avatar"> <div id="user-settings-avatar">
@ -165,16 +165,16 @@
<a href="https://en.gravatar.com/" target="_blank" class="white-color">{{t "Avatar from Gravatar" }}</a> <a href="https://en.gravatar.com/" target="_blank" class="white-color">{{t "Avatar from Gravatar" }}</a>
</div> </div>
</div> </div>
<input type="file" name="user_avatar_file_input" class="notvisible" id="user_avatar_file_input" value="{{t 'Upload avatar' }}" /> <input type="file" name="user_avatar_file_input" class="notvisible" id="user_avatar_file_input" value="{{t 'Upload profile picture' }}" />
<div id="upload_avatar_spinner"></div> <div id="upload_avatar_spinner"></div>
</div> </div>
<div class="avatar-controls"> <div class="avatar-controls">
<button class="button rounded sea-green w-200 block" id="user_avatar_upload_button"> <button class="button rounded sea-green w-200 block" id="user_avatar_upload_button">
{{t 'Upload new avatar' }} {{t 'Upload new profile picture' }}
</button> </button>
<div id="user_avatar_file_input_error" class="text-error"></div> <div id="user_avatar_file_input_error" class="text-error"></div>
<button class="button rounded btn-danger w-200 m-t-20 block" id="user_avatar_delete_button"> <button class="button rounded btn-danger w-200 m-t-20 block" id="user_avatar_delete_button">
{{t 'Delete avatar' }} {{t 'Delete profile picture' }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -94,9 +94,9 @@
</div> </div>
<div class="input-group"> <div class="input-group">
<div id="bot_avatar_file"></div> <div id="bot_avatar_file"></div>
<input type="file" name="bot_avatar_file_input" class="notvisible" id="bot_avatar_file_input" value="{{t 'Upload avatar' }}" /> <input type="file" name="bot_avatar_file_input" class="notvisible" id="bot_avatar_file_input" value="{{t 'Upload profile picture' }}" />
<button class="button white rounded small btn-danger display-none" id="bot_avatar_clear_button">{{t "Clear avatar" }}</button> <button class="button white rounded small btn-danger display-none" id="bot_avatar_clear_button">{{t "Clear profile picture" }}</button>
<button class="button white rounded" id="bot_avatar_upload_button">{{t "Customize avatar" }}</button> ({{t "Optional" }}) <button class="button white rounded" id="bot_avatar_upload_button">{{t "Customize profile picture" }}</button> ({{t "Optional" }})
</div> </div>
<p> <p>
<div id="bot_avatar_file_input_error" class="text-error"></div> <div id="bot_avatar_file_input_error" class="text-error"></div>

View File

@ -27,22 +27,22 @@
</div> </div>
</div> </div>
<div>{{t "Organization avatar" }}</div> <div>{{t "Organization profile picture" }}</div>
<div class="realm-icon-section"> <div class="realm-icon-section">
<div class="inline-block"> <div class="inline-block">
<img id="realm-settings-icon" src="{{ realm_icon_url }}"/> <img id="realm-settings-icon" src="{{ realm_icon_url }}"/>
<input type="file" name="realm_icon_file_input" class="notvisible" <input type="file" name="realm_icon_file_input" class="notvisible"
id="realm_icon_file_input" value="{{t 'Upload icon' }}"/> id="realm_icon_file_input" value="{{t 'Upload profile picture' }}"/>
</div> </div>
<div class="inline-block avatar-controls"> <div class="inline-block avatar-controls">
<div id="realm_icon_file_input_error" class="alert text-error"></div> <div id="realm_icon_file_input_error" class="alert text-error"></div>
<button class="button rounded sea-green w-200 block input-size" <button class="button rounded sea-green w-200 block input-size"
id="realm_icon_upload_button"> id="realm_icon_upload_button">
<span id="upload_icon_button_text">{{t 'Upload new avatar' }}</span> <span id="upload_icon_button_text">{{t 'Upload new profile picture' }}</span>
<span id="upload_icon_spinner"></span> <span id="upload_icon_spinner"></span>
</button> </button>
<button class="button rounded btn-danger w-200 m-t-10 block input-size" <button class="button rounded btn-danger w-200 m-t-10 block input-size"
id="realm_icon_delete_button">{{t 'Delete icon' }}</button> id="realm_icon_delete_button">{{t 'Delete profile picture' }}</button>
</div> </div>
</div> </div>

View File

@ -20,9 +20,9 @@ integration with an existing product, see our
## Anatomy of a bot ## Anatomy of a bot
You can think of a bot as a special kind of user, with limited permissions. 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. are the most visible attributes of a bot.
* The **email** is not used for anything, and will likely be removed in a * The **email** is not used for anything, and will likely be removed in a

View File

@ -19,7 +19,7 @@ including bold/italic, links, lists, and
{settings_tab|organization-profile} {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**. 1. Click **Save changes**.
{end_tabs} {end_tabs}

View File

@ -14,7 +14,7 @@ or desktop experience.
## Set up your account ## 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) - Get the [mobile and desktop apps](/apps)
- [Browse and subscribe to streams](/help/browse-and-subscribe-to-streams) - [Browse and subscribe to streams](/help/browse-and-subscribe-to-streams)
- [Configure your notifications](/#settings/notifications) to work the way - [Configure your notifications](/#settings/notifications) to work the way

View File

@ -12,7 +12,7 @@
* [Edit your profile](/help/edit-your-profile) * [Edit your profile](/help/edit-your-profile)
* [Change your password](/help/change-your-password) * [Change your password](/help/change-your-password)
* [Review your settings](/help/review-your-settings) * [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) * [Change your language](/help/change-your-language)
* [Use 24-hour time](/help/change-the-time-format) * [Use 24-hour time](/help/change-the-time-format)
* [Joining an organization](/help/join-a-zulip-organization) * [Joining an organization](/help/join-a-zulip-organization)

View File

@ -29,7 +29,7 @@ messages and alert words.
{end_tabs} {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 ## Silently mention a user

View File

@ -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}

View File

@ -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}

View File

@ -8,7 +8,7 @@ were last active, and any
### Via the message list ### Via the message list
1. Click on a user's avatar. 1. Click on a user's profile picture.
1. Click **View full profile**. 1. Click **View full profile**.

View File

@ -161,7 +161,7 @@ def users_to_zerver_userprofile(slack_data_dir: str, users: List[ZerverFieldsT],
email = get_user_email(user, domain_name) email = get_user_email(user, domain_name)
# avatar # 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'], avatar_url = build_avatar_url(slack_user_id, user['team_id'],
user['profile']['avatar_hash']) user['profile']['avatar_hash'])
build_avatar(user_id, realm_id, email, avatar_url, timestamp, avatar_list) build_avatar(user_id, realm_id, email, avatar_url, timestamp, avatar_list)

View File

@ -845,7 +845,7 @@ class TestMissedMessages(ZulipTestCase):
'/user_uploads/2/1f/some_random_value</a>' '/user_uploads/2/1f/some_random_value</a>'
self.assertEqual(actual_output, expected_output) 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 = '<p>Set src="/avatar/username@example.com?s=30"</p>' test_data = '<p>Set src="/avatar/username@example.com?s=30"</p>'
actual_output = relative_to_full_url("http://example.com", test_data) actual_output = relative_to_full_url("http://example.com", test_data)
expected_output = '<p>Set src="/avatar/username@example.com?s=30"</p>' expected_output = '<p>Set src="/avatar/username@example.com?s=30"</p>'

View File

@ -1055,7 +1055,7 @@ class AvatarTest(UploadSerializeMixin, ZulipTestCase):
def test_delete_avatar(self) -> None: 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")) self.login(self.example_email("hamlet"))
hamlet = self.example_user('hamlet') hamlet = self.example_user('hamlet')

View File

@ -280,7 +280,7 @@ FEEDBACK_EMAIL = ZULIP_ADMINISTRATOR
# "file:///" as a hyperlink (useful if you have e.g. an NFS share). # "file:///" as a hyperlink (useful if you have e.g. an NFS share).
ENABLE_FILE_LINKS = False 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 # directly on the Zulip server. You can configure files being instead
# stored in Amazon S3 or another scalable data store here. See docs at: # 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", # "first_name": "fn",
# "last_name": "ln", # "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", # "avatar": "thumbnailPhoto",
# This line is for having Zulip to automatically deactivate users # This line is for having Zulip to automatically deactivate users