Commit 4a33dd03 authored by Harrison Healey's avatar Harrison Healey
Browse files

MM-26731 Sidebar text updates (#5992)

parent 51394589
......@@ -58,7 +58,7 @@ export default class DeleteCategoryModal extends React.PureComponent<Props, Stat
<span className='delete-category__helpText'>
<FormattedMarkdownMessage
id='delete_category_modal.helpText'
defaultMessage='Channels in **{category_name}** move back to the Channels and Direct Messages categories. You are not removed from any channels.'
defaultMessage="Channels in **{category_name}** will move back to the Channels and Direct messages categories. You're not removed from any channels."
values={{
category_name: this.props.category.display_name,
}}
......
......@@ -65,18 +65,9 @@ export default class EditCategoryModal extends React.PureComponent<Props, State>
}
getText = () => {
let modalHeaderText = (
<FormattedMessage
id='create_category_modal.createCategory'
defaultMessage='Create Category'
/>
);
let editButtonText = (
<FormattedMessage
id='create_category_modal.create'
defaultMessage='Create'
/>
);
let modalHeaderText;
let editButtonText;
let helpText;
if (this.props.categoryId) {
modalHeaderText = (
......@@ -91,13 +82,40 @@ export default class EditCategoryModal extends React.PureComponent<Props, State>
defaultMessage='Rename'
/>
);
} else {
modalHeaderText = (
<FormattedMessage
id='create_category_modal.createCategory'
defaultMessage='Create New Category'
/>
);
editButtonText = (
<FormattedMessage
id='create_category_modal.create'
defaultMessage='Create'
/>
);
helpText = (
<FormattedMessage
id='edit_category_modal.helpText'
defaultMessage='Drag channels into this category to organize your sidebar.'
/>
);
}
return {modalHeaderText, editButtonText};
return {
modalHeaderText,
editButtonText,
helpText,
};
}
render() {
const {modalHeaderText, editButtonText} = this.getText();
const {
modalHeaderText,
editButtonText,
helpText,
} = this.getText();
return (
<GenericModal
......@@ -113,18 +131,15 @@ export default class EditCategoryModal extends React.PureComponent<Props, State>
className='form-control filter-textbox'
type='text'
value={this.state.categoryName}
placeholder={localizeMessage('edit_category_modal.placeholder', 'Choose a category name')}
placeholder={localizeMessage('edit_category_modal.placeholder', 'Name your category')}
clearable={true}
onClear={this.handleClear}
onChange={this.handleChange}
maxLength={22}
/>
<span className='edit-category__helpText'>
<FormattedMessage
id='edit_category_modal.helpText'
defaultMessage='You can drag channels into categories to organize your sidebar.'
/>
</span>
{Boolean(helpText) && <span className='edit-category__helpText'>
{helpText}
</span>}
</GenericModal>
);
}
......
......@@ -61,7 +61,7 @@ class AddChannelDropdown extends React.PureComponent<Props, State> {
id='createCategory'
onClick={this.props.showCreateCategoryModal}
icon={<i className='icon-folder-plus-outline'/>}
text={intl.formatMessage({id: 'sidebar_left.add_channel_dropdown.createCategory', defaultMessage: 'Create Category'})}
text={intl.formatMessage({id: 'sidebar_left.add_channel_dropdown.createCategory', defaultMessage: 'Create New Category'})}
/>
</Menu.Group>
</React.Fragment>
......
......@@ -296,7 +296,7 @@ exports[`components/sidebar/sidebar_category should match snapshot when sorting
</div>
</button>
<button
aria-label="Sorted by recency"
aria-label="Sorted by most recent"
className="SidebarChannelGroupHeader_sortButton"
onClick={[Function]}
>
......@@ -310,7 +310,7 @@ exports[`components/sidebar/sidebar_category should match snapshot when sorting
id="new-group-tooltip"
placement="right"
>
Sorted by recency
Sorted by most recent
</Tooltip>
}
placement="top"
......@@ -421,7 +421,7 @@ exports[`components/sidebar/sidebar_category should match snapshot when the cate
</div>
</button>
<button
aria-label="Sorted by recency"
aria-label="Sorted by most recent"
className="SidebarChannelGroupHeader_sortButton"
onClick={[Function]}
>
......@@ -435,7 +435,7 @@ exports[`components/sidebar/sidebar_category should match snapshot when the cate
id="new-group-tooltip"
placement="right"
>
Sorted by recency
Sorted by most recent
</Tooltip>
}
placement="top"
......
......@@ -264,7 +264,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
sortHelpLabel = localizeMessage('sidebar.sortedByAlphabetical', 'Sorted alphabetically');
} else {
sortingIcon = (<i className='icon-clock-outline'/>);
sortHelpLabel = localizeMessage('sidebar.sortedByRecency', 'Sorted by recency');
sortHelpLabel = localizeMessage('sidebar.sortedByRecency', 'Sorted by most recent');
}
const sortTooltip = (
......
......@@ -44,7 +44,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_menu should match
id="create-category1"
onClick={[Function]}
show={true}
text="Create Category"
text="Create New Category"
/>
</MenuGroup>
</Connect(SidebarMenu)>
......@@ -71,7 +71,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_menu should match
id="create-category1"
onClick={[Function]}
show={true}
text="Create Category"
text="Create New Category"
/>
</MenuGroup>
</Connect(SidebarMenu)>
......
......@@ -110,7 +110,7 @@ class SidebarCategoryMenu extends React.PureComponent<Props, State> {
id={`create-${category.id}`}
onClick={this.createCategory}
icon={<i className='icon-folder-plus-outline'/>}
text={intl.formatMessage({id: 'sidebar_left.sidebar_category_menu.createCategory', defaultMessage: 'Create Category'})}
text={intl.formatMessage({id: 'sidebar_left.sidebar_category_menu.createCategory', defaultMessage: 'Create New Category'})}
/>
</Menu.Group>
</React.Fragment>
......
......@@ -61,7 +61,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -171,7 +171,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -258,7 +258,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -355,7 +355,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -465,7 +465,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -575,7 +575,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......@@ -696,7 +696,7 @@ exports[`components/sidebar/sidebar_channel/sidebar_channel_menu should match sn
className="icon-folder-move-outline"
/>,
"id": "moveToNewCategory-channel_id",
"text": "Move to New Category",
"text": "New Category",
},
]
}
......
......@@ -236,7 +236,7 @@ export class SidebarChannelMenu extends React.PureComponent<Props, State> {
id: `moveToNewCategory-${channel.id}`,
icon: (<i className='icon-folder-move-outline'/>),
direction: 'right' as any,
text: intl.formatMessage({id: 'sidebar_left.sidebar_channel_menu.moveToNewCategory', defaultMessage: 'Move to New Category'}),
text: intl.formatMessage({id: 'sidebar_left.sidebar_channel_menu.moveToNewCategory', defaultMessage: 'New Category'}),
action: this.moveToNewCategory,
},
);
......
......@@ -2271,7 +2271,7 @@
"convert_channel.title": "Convert {display_name} to a Private Channel?",
"copy_url_context_menu.getChannelLink": "Copy Link",
"create_category_modal.create": "Create",
"create_category_modal.createCategory": "Create Category",
"create_category_modal.createCategory": "Create New Category",
"create_comment.addComment": "Add a comment...",
"create_comment.comment": "Add Comment",
"create_comment.commentTitle": "Comment",
......@@ -2321,7 +2321,7 @@
"default_channel.purpose": "Post messages here that you want everyone to see. Everyone automatically becomes a permanent member of this channel when they join the team.",
"delete_category_modal.delete": "Delete",
"delete_category_modal.deleteCategory": "Delete this category?",
"delete_category_modal.helpText": "Channels in **{category_name}** move back to the Channels and Direct Messages categories. You are not removed from any channels.",
"delete_category_modal.helpText": "Channels in **{category_name}** will move back to the Channels and Direct messages categories. You're not removed from any channels.",
"delete_channel.cancel": "Cancel",
"delete_channel.confirm": "Confirm ARCHIVE Channel",
"delete_channel.del": "Archive",
......@@ -2344,8 +2344,8 @@
"discard_changes_modal.leave": "Yes, Discard",
"discard_changes_modal.message": "You have unsaved changes, are you sure you want to discard them?",
"discard_changes_modal.title": "Discard Changes?",
"edit_category_modal.helpText": "You can drag channels into categories to organize your sidebar.",
"edit_category_modal.placeholder": "Choose a category name",
"edit_category_modal.helpText": "Drag channels into this category to organize your sidebar.",
"edit_category_modal.placeholder": "Name your category",
"edit_channel_header_modal.cancel": "Cancel",
"edit_channel_header_modal.description": "Edit the text appearing next to the channel name in the channel header.",
"edit_channel_header_modal.error": "This channel header is too long, please enter a shorter one",
......@@ -3355,7 +3355,7 @@
"sidebar_header.tutorial.title": "Main Menu",
"sidebar_left.add_channel_dropdown.browseChannels": "Browse Channels",
"sidebar_left.add_channel_dropdown.browseOrCreateChannels": "Browse or create channels",
"sidebar_left.add_channel_dropdown.createCategory": "Create Category",
"sidebar_left.add_channel_dropdown.createCategory": "Create New Category",
"sidebar_left.add_channel_dropdown.createNewChannel": "Create New Channel",
"sidebar_left.add_channel_dropdown.dropdownAriaLabel": "Add Channel Dropdown",
"sidebar_left.channel_filter.allChannels": "All channels",
......@@ -3368,7 +3368,7 @@
"sidebar_left.channel_navigator.goBackLabel": "Back",
"sidebar_left.channel_navigator.goForwardLabel": "Forward",
"sidebar_left.channel_navigator.jumpTo": "Jump to...",
"sidebar_left.sidebar_category_menu.createCategory": "Create Category",
"sidebar_left.sidebar_category_menu.createCategory": "Create New Category",
"sidebar_left.sidebar_category_menu.deleteCategory": "Delete Category",
"sidebar_left.sidebar_category_menu.dropdownAriaLabel": "Edit category menu",
"sidebar_left.sidebar_category_menu.editCategory": "Category options",
......@@ -3384,7 +3384,7 @@
"sidebar_left.sidebar_channel_menu.leaveConversation": "Close Conversation",
"sidebar_left.sidebar_channel_menu.markAsRead": "Mark as Read",
"sidebar_left.sidebar_channel_menu.moveTo": "Move to",
"sidebar_left.sidebar_channel_menu.moveToNewCategory": "Move to New Category",
"sidebar_left.sidebar_channel_menu.moveToNewCategory": "New Category",
"sidebar_left.sidebar_channel_menu.muteChannel": "Mute Channel",
"sidebar_left.sidebar_channel_menu.muteConversation": "Mute Conversation",
"sidebar_left.sidebar_channel_menu.unfavoriteChannel": "Unfavorite",
......@@ -3409,7 +3409,7 @@
"sidebar.morePublicDmAria": "See more public channels and direct messages",
"sidebar.removeList": "Remove from this list",
"sidebar.sortedByAlphabetical": "Sorted alphabetically",
"sidebar.sortedByRecency": "Sorted by recency",
"sidebar.sortedByRecency": "Sorted by most recent",
"sidebar.team_select": "{siteName} - Join a team",
"sidebar.tutorialScreen1.body": "**Channels** organize conversations across different topics. They're open to everyone on your team. To send private communications use **Direct Messages** for a single person or **Private Channels** for multiple people.",
"sidebar.tutorialScreen1.title": "Channels",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment