Change localizeMessage to take a MessageDescriptor as a parameter (#28141)
* Change localizeAndFormatMessage to take a MessageDescriptor * Change localizeMessage to take a MessageDescriptor as a parameter * Update mmjstool to support new localizeMessage signature * Change mmjstool commit back to master branch
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8e2dc45841
Коммит
e080f9f5ed
@@ -105,6 +105,7 @@
|
||||
"@hot-loader/react-dom": "17.0.2",
|
||||
"@mattermost/calls-common": "0.27.0",
|
||||
"@mattermost/eslint-plugin": "*",
|
||||
"@mattermost/mmjstool": "github:mattermost/mattermost-utilities#7b63833d208d482ba4a1c12230bb3e68dd9c5e5e",
|
||||
"@redux-devtools/extension": "3.2.3",
|
||||
"@stylistic/stylelint-plugin": "2.1.0",
|
||||
"@testing-library/jest-dom": "5.16.4",
|
||||
@@ -162,7 +163,6 @@
|
||||
"jest-environment-jsdom": "29.7.0",
|
||||
"jest-junit": "16.0.0",
|
||||
"jest-watch-typeahead": "2.2.2",
|
||||
"mmjstool": "github:mattermost/mattermost-utilities#73e61d2ede0ebf802492df4cfbac481d35efed54",
|
||||
"nock": "13.2.8",
|
||||
"prettier": "2.3.2",
|
||||
"react-router-enzyme-context": "1.2.0",
|
||||
|
||||
@@ -78,7 +78,7 @@ export function executeCommand(message: string, args: CommandArgs): ActionFuncAs
|
||||
return {data: {frontendHandled: true}};
|
||||
case '/shortcuts':
|
||||
if (UserAgent.isMobile()) {
|
||||
const error = {message: localizeMessage('create_post.shortcutsNotSupported', 'Keyboard shortcuts are not supported on your device')};
|
||||
const error = {message: localizeMessage({id: 'create_post.shortcutsNotSupported', defaultMessage: 'Keyboard shortcuts are not supported on your device'})};
|
||||
return {error};
|
||||
}
|
||||
|
||||
@@ -132,12 +132,12 @@ export function executeCommand(message: string, args: CommandArgs): ActionFuncAs
|
||||
case '/marketplace':
|
||||
// check if user has permissions to access the read plugins
|
||||
if (!haveICurrentTeamPermission(state, Permissions.SYSCONSOLE_WRITE_PLUGINS)) {
|
||||
return {error: {message: localizeMessage('marketplace_command.no_permission', 'You do not have the appropriate permissions to access the marketplace.')}};
|
||||
return {error: {message: localizeMessage({id: 'marketplace_command.no_permission', defaultMessage: 'You do not have the appropriate permissions to access the marketplace.'})}};
|
||||
}
|
||||
|
||||
// check config to see if marketplace is enabled
|
||||
if (!isMarketplaceEnabled(state)) {
|
||||
return {error: {message: localizeMessage('marketplace_command.disabled', 'The marketplace is disabled. Please contact your System Administrator for details.')}};
|
||||
return {error: {message: localizeMessage({id: 'marketplace_command.disabled', defaultMessage: 'The marketplace is disabled. Please contact your System Administrator for details.'})}};
|
||||
}
|
||||
|
||||
dispatch(openModal({modalId: ModalIdentifiers.PLUGIN_MARKETPLACE, dialogType: MarketplaceModal, dialogProps: {openedFrom: 'command'}}));
|
||||
|
||||
@@ -98,9 +98,9 @@ export function uploadFile({file, name, type, rootId, channelId, clientId, onPro
|
||||
try {
|
||||
const errorResponse = JSON.parse(xhr.response);
|
||||
errorMessage =
|
||||
(errorResponse?.id && errorResponse?.message) ? localizeMessage(errorResponse.id, errorResponse.message) : localizeMessage('file_upload.generic_error', 'There was a problem uploading your files.');
|
||||
(errorResponse?.id && errorResponse?.message) ? localizeMessage({id: errorResponse.id, defaultMessage: errorResponse.message}) : localizeMessage({id: 'file_upload.generic_error', defaultMessage: 'There was a problem uploading your files.'});
|
||||
} catch (e) {
|
||||
errorMessage = localizeMessage('file_upload.generic_error', 'There was a problem uploading your files.');
|
||||
errorMessage = localizeMessage({id: 'file_upload.generic_error', defaultMessage: 'There was a problem uploading your files.'});
|
||||
}
|
||||
|
||||
dispatch({
|
||||
@@ -133,7 +133,7 @@ export function uploadFile({file, name, type, rootId, channelId, clientId, onPro
|
||||
dispatch(batchActions([uploadFailureAction, getLogErrorAction(errorResponse)]));
|
||||
onError(errorResponse, clientId, channelId, rootId);
|
||||
} else {
|
||||
const errorMessage = xhr.status === 0 || !xhr.status ? localizeMessage('file_upload.generic_error', 'There was a problem uploading your files.') : localizeMessage('channel_loader.unknown_error', 'We received an unexpected status code from the server.') + ' (' + xhr.status + ')';
|
||||
const errorMessage = xhr.status === 0 || !xhr.status ? localizeMessage({id: 'file_upload.generic_error', defaultMessage: 'There was a problem uploading your files.'}) : localizeMessage({id: 'channel_loader.unknown_error', defaultMessage: 'We received an unexpected status code from the server.'}) + ' (' + xhr.status + ')';
|
||||
|
||||
dispatch({
|
||||
type: FileTypes.UPLOAD_FILES_FAILURE,
|
||||
|
||||
@@ -20,7 +20,6 @@ import {isThreadOpen} from 'selectors/views/threads';
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import Constants, {NotificationLevels, UserStatuses, IgnoreChannelMentions} from 'utils/constants';
|
||||
import DesktopApp from 'utils/desktop_api';
|
||||
import {t} from 'utils/i18n';
|
||||
import {stripMarkdown, formatWithRenderer} from 'utils/markdown';
|
||||
import MentionableRenderer from 'utils/markdown/mentionable_renderer';
|
||||
import * as NotificationSounds from 'utils/notification_sounds';
|
||||
@@ -200,10 +199,10 @@ export function sendDesktopNotification(post, msgProps) {
|
||||
} else if (msgProps.sender_name) {
|
||||
username = msgProps.sender_name;
|
||||
} else {
|
||||
username = Utils.localizeMessage('channel_loader.someone', 'Someone');
|
||||
username = Utils.localizeMessage({id: 'channel_loader.someone', defaultMessage: 'Someone'});
|
||||
}
|
||||
|
||||
let title = Utils.localizeMessage('channel_loader.posted', 'Posted');
|
||||
let title = Utils.localizeMessage({id: 'channel_loader.posted', defaultMessage: 'Posted'});
|
||||
if (!channel) {
|
||||
title = msgProps.channel_display_name;
|
||||
channel = {
|
||||
@@ -211,21 +210,21 @@ export function sendDesktopNotification(post, msgProps) {
|
||||
type: msgProps.channel_type,
|
||||
};
|
||||
} else if (channel.type === Constants.DM_CHANNEL) {
|
||||
title = Utils.localizeMessage('notification.dm', 'Direct Message');
|
||||
title = Utils.localizeMessage({id: 'notification.dm', defaultMessage: 'Direct Message'});
|
||||
} else {
|
||||
title = channel.display_name;
|
||||
}
|
||||
|
||||
if (title === '') {
|
||||
if (msgProps.channel_type === Constants.DM_CHANNEL) {
|
||||
title = Utils.localizeMessage('notification.dm', 'Direct Message');
|
||||
title = Utils.localizeMessage({id: 'notification.dm', defaultMessage: 'Direct Message'});
|
||||
} else {
|
||||
title = msgProps.channel_display_name;
|
||||
}
|
||||
}
|
||||
|
||||
if (isCrtReply) {
|
||||
title = Utils.localizeAndFormatMessage(t('notification.crt'), 'Reply in {title}', {title});
|
||||
title = Utils.localizeAndFormatMessage({id: 'notification.crt', defaultMessage: 'Reply in {title}'}, {title});
|
||||
}
|
||||
|
||||
let notifyText = post.message;
|
||||
@@ -247,13 +246,13 @@ export function sendDesktopNotification(post, msgProps) {
|
||||
let body = `@${username}`;
|
||||
if (strippedMarkdownNotifyText.length === 0) {
|
||||
if (msgProps.image) {
|
||||
body += Utils.localizeMessage('channel_loader.uploadedImage', ' uploaded an image');
|
||||
body += Utils.localizeMessage({id: 'channel_loader.uploadedImage', defaultMessage: ' uploaded an image'});
|
||||
} else if (msgProps.otherFile) {
|
||||
body += Utils.localizeMessage('channel_loader.uploadedFile', ' uploaded a file');
|
||||
body += Utils.localizeMessage({id: 'channel_loader.uploadedFile', defaultMessage: ' uploaded a file'});
|
||||
} else if (image) {
|
||||
body += Utils.localizeMessage('channel_loader.postedImage', ' posted an image');
|
||||
body += Utils.localizeMessage({id: 'channel_loader.postedImage', defaultMessage: ' posted an image'});
|
||||
} else {
|
||||
body += Utils.localizeMessage('channel_loader.something', ' did something new');
|
||||
body += Utils.localizeMessage({id: 'channel_loader.something', defaultMessage: ' did something new'});
|
||||
}
|
||||
} else {
|
||||
body += `: ${strippedMarkdownNotifyText}`;
|
||||
|
||||
@@ -267,7 +267,7 @@ export function makeOnEditLatestPost(rootId: string): () => ActionFunc<boolean>
|
||||
return dispatch(PostActions.setEditingPost(
|
||||
lastPost.id,
|
||||
'reply_textbox',
|
||||
Utils.localizeMessage('create_comment.commentTitle', 'Comment'),
|
||||
Utils.localizeMessage({id: 'create_comment.commentTitle', defaultMessage: 'Comment'}),
|
||||
true,
|
||||
));
|
||||
};
|
||||
|
||||
@@ -388,7 +388,7 @@ export class ActionMenuClass extends React.PureComponent<Props, State> {
|
||||
key='more-actions-button'
|
||||
ref={this.buttonRef}
|
||||
id={`${this.props.location}_actions_button_${this.props.post.id}`}
|
||||
aria-label={Utils.localizeMessage('post_info.actions.tooltip.actions', 'Actions').toLowerCase()}
|
||||
aria-label={Utils.localizeMessage({id: 'post_info.actions.tooltip.actions', defaultMessage: 'Actions'}).toLowerCase()}
|
||||
className={classNames('post-menu__item', {
|
||||
'post-menu__item--active': this.props.isMenuOpen,
|
||||
})}
|
||||
@@ -402,7 +402,7 @@ export class ActionMenuClass extends React.PureComponent<Props, State> {
|
||||
id={`${this.props.location}_actions_dropdown_${this.props.post.id}`}
|
||||
openLeft={true}
|
||||
openUp={this.state.openUp}
|
||||
ariaLabel={Utils.localizeMessage('post_info.menuAriaLabel', 'Post extra options')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'post_info.menuAriaLabel', defaultMessage: 'Post extra options'})}
|
||||
key={`${this.props.location}_actions_dropdown_${this.props.post.id}`}
|
||||
>
|
||||
{menuItems}
|
||||
|
||||
@@ -242,8 +242,8 @@ export class AddGroupsToChannelModal extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitLoadingText = localizeMessage('multiselect.adding', 'Adding...');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
const buttonSubmitLoadingText = localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'});
|
||||
|
||||
let addError = null;
|
||||
if (this.state.addError) {
|
||||
@@ -305,7 +305,7 @@ export class AddGroupsToChannelModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.state.saving}
|
||||
loading={this.state.loadingGroups}
|
||||
placeholderText={localizeMessage('multiselect.addGroupsPlaceholder', 'Search and add groups')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.addGroupsPlaceholder', defaultMessage: 'Search and add groups'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -248,8 +248,8 @@ export class AddGroupsToTeamModal extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitLoadingText = localizeMessage('multiselect.adding', 'Adding...');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
const buttonSubmitLoadingText = localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'});
|
||||
|
||||
let addError = null;
|
||||
if (this.state.addError) {
|
||||
@@ -319,7 +319,7 @@ export class AddGroupsToTeamModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.state.saving}
|
||||
loading={this.state.loadingGroups}
|
||||
placeholderText={localizeMessage('multiselect.addGroupsPlaceholder', 'Search and add groups')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.addGroupsPlaceholder', defaultMessage: 'Search and add groups'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -196,8 +196,8 @@ export class AddUserToGroupMultiSelect extends React.PureComponent<Props, State>
|
||||
};
|
||||
|
||||
public render = (): JSX.Element => {
|
||||
const buttonSubmitText = this.props.buttonSubmitText || localizeMessage('multiselect.createGroup', 'Create Group');
|
||||
const buttonSubmitLoadingText = this.props.buttonSubmitLoadingText || localizeMessage('multiselect.creating', 'Creating...');
|
||||
const buttonSubmitText = this.props.buttonSubmitText || localizeMessage({id: 'multiselect.createGroup', defaultMessage: 'Create Group'});
|
||||
const buttonSubmitLoadingText = this.props.buttonSubmitLoadingText || localizeMessage({id: 'multiselect.creating', defaultMessage: 'Creating...'});
|
||||
|
||||
let users = filterProfilesStartingWithTerm(this.props.profiles, this.state.term).filter((user) => {
|
||||
return user.delete_at === 0 &&
|
||||
@@ -214,7 +214,7 @@ export class AddUserToGroupMultiSelect extends React.PureComponent<Props, State>
|
||||
|
||||
if (this.state.values.length >= MAX_SELECTABLE_VALUES) {
|
||||
maxValues = MAX_SELECTABLE_VALUES;
|
||||
numRemainingText = localizeMessage('multiselect.maxGroupMembers', 'No more than 256 members can be added to a group at once.');
|
||||
numRemainingText = localizeMessage({id: 'multiselect.maxGroupMembers', defaultMessage: 'No more than 256 members can be added to a group at once.'});
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -237,7 +237,7 @@ export class AddUserToGroupMultiSelect extends React.PureComponent<Props, State>
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.props.saving}
|
||||
loading={this.state.loadingUsers}
|
||||
placeholderText={localizeMessage('multiselect.placeholder', 'Search for people')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.placeholder', defaultMessage: 'Search for people'})}
|
||||
valueWithImage={true}
|
||||
focusOnLoad={this.props.focusOnLoad}
|
||||
savingEnabled={this.props.savingEnabled}
|
||||
|
||||
@@ -136,8 +136,8 @@ const AddUsersToGroupModal = (props: Props) => {
|
||||
deleteUserCallback={deleteUserCallback}
|
||||
groupId={props.groupId}
|
||||
searchOptions={searchOptions}
|
||||
buttonSubmitText={localizeMessage('multiselect.addPeopleToGroup', 'Add People')}
|
||||
buttonSubmitLoadingText={localizeMessage('multiselect.adding', 'Adding...')}
|
||||
buttonSubmitText={localizeMessage({id: 'multiselect.addPeopleToGroup', defaultMessage: 'Add People'})}
|
||||
buttonSubmitLoadingText={localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'})}
|
||||
backButtonClick={goBack}
|
||||
backButtonClass={'multiselect-back'}
|
||||
saving={saving}
|
||||
|
||||
@@ -192,8 +192,8 @@ export class AddUsersToTeamModal extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitLoadingText = localizeMessage('multiselect.adding', 'Adding...');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
const buttonSubmitLoadingText = localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'});
|
||||
|
||||
let addError = null;
|
||||
if (this.state.addError) {
|
||||
@@ -259,7 +259,7 @@ export class AddUsersToTeamModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.state.saving}
|
||||
loading={this.state.loading}
|
||||
placeholderText={localizeMessage('multiselect.placeholder', 'Search and add members')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.placeholder', defaultMessage: 'Search and add members'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -150,7 +150,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='text'
|
||||
value={address}
|
||||
onChange={updateState(setAddress)}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.address', 'Address')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.address', defaultMessage: 'Address'})}
|
||||
required={true}
|
||||
/>
|
||||
</div>
|
||||
@@ -160,7 +160,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='text'
|
||||
value={address2}
|
||||
onChange={updateState(setAddress2)}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.address_2', 'Address 2')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.address_2', defaultMessage: 'Address 2'})}
|
||||
/>
|
||||
</div>
|
||||
<div className='form-row'>
|
||||
@@ -169,7 +169,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='text'
|
||||
value={city}
|
||||
onChange={updateState(setCity)}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.city', 'City')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.city', defaultMessage: 'City'})}
|
||||
required={true}
|
||||
/>
|
||||
</div>
|
||||
@@ -190,7 +190,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='text'
|
||||
value={postalCode}
|
||||
onChange={updateState(setPostalCode)}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.zipcode', 'Zip/Postal Code')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.zipcode', defaultMessage: 'Zip/Postal Code'})}
|
||||
required={true}
|
||||
/>
|
||||
</div>
|
||||
@@ -228,7 +228,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='text'
|
||||
value={companyName}
|
||||
onChange={updateState(setCompanyName)}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.companyName', 'Company name')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.companyName', defaultMessage: 'Company name'})}
|
||||
required={true}
|
||||
/>
|
||||
</div>
|
||||
@@ -238,7 +238,7 @@ const CompanyInfoEdit: React.FC<Props> = () => {
|
||||
type='number'
|
||||
value={numEmployees}
|
||||
onChange={updateNumEmployees}
|
||||
placeholder={Utils.localizeMessage('admin.billing.company_info.numEmployees', 'Number of employees (optional)')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.billing.company_info.numEmployees', defaultMessage: 'Number of employees (optional)'})}
|
||||
/>
|
||||
</div>
|
||||
<div className='section-title'>
|
||||
|
||||
@@ -98,15 +98,15 @@ export default class ClusterTable extends PureComponent<Props> {
|
||||
let status = null;
|
||||
|
||||
if (clusterInfo.hostname === '') {
|
||||
clusterInfo.hostname = Utils.localizeMessage('admin.cluster.unknown', 'unknown');
|
||||
clusterInfo.hostname = Utils.localizeMessage({id: 'admin.cluster.unknown', defaultMessage: 'unknown'});
|
||||
}
|
||||
|
||||
if (clusterInfo.version === '') {
|
||||
clusterInfo.version = Utils.localizeMessage('admin.cluster.unknown', 'unknown');
|
||||
clusterInfo.version = Utils.localizeMessage({id: 'admin.cluster.unknown', defaultMessage: 'unknown'});
|
||||
}
|
||||
|
||||
if (clusterInfo.config_hash === '') {
|
||||
clusterInfo.config_hash = Utils.localizeMessage('admin.cluster.unknown', 'unknown');
|
||||
clusterInfo.config_hash = Utils.localizeMessage({id: 'admin.cluster.unknown', defaultMessage: 'unknown'});
|
||||
}
|
||||
|
||||
if (singleItem) {
|
||||
|
||||
@@ -61,7 +61,7 @@ class DataGridSearch extends React.PureComponent<Props, State> {
|
||||
|
||||
let {placeholder} = this.props;
|
||||
if (!placeholder) {
|
||||
placeholder = Utils.localizeMessage('search_bar.search', 'Search');
|
||||
placeholder = Utils.localizeMessage({id: 'search_bar.search', defaultMessage: 'Search'});
|
||||
}
|
||||
|
||||
let filter;
|
||||
@@ -81,7 +81,7 @@ class DataGridSearch extends React.PureComponent<Props, State> {
|
||||
|
||||
<input
|
||||
type='text'
|
||||
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
||||
placeholder={Utils.localizeMessage({id: 'search_bar.search', defaultMessage: 'Search'})}
|
||||
onChange={this.handleSearch}
|
||||
value={this.props.term}
|
||||
data-testid='searchInput'
|
||||
|
||||
@@ -235,7 +235,7 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
let postDuration = parseInt(messageRetentionInputValue, 10);
|
||||
|
||||
if (postDuration <= 0) {
|
||||
this.setState({formErrorText: Utils.localizeMessage('admin.data_retention.custom_policy.form.durationInput.error', 'Error parsing message retention.'), saving: false});
|
||||
this.setState({formErrorText: Utils.localizeMessage({id: 'admin.data_retention.custom_policy.form.durationInput.error', defaultMessage: 'Error parsing message retention.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
if (messageRetentionDropdownValue.value === FOREVER) {
|
||||
@@ -245,7 +245,7 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
}
|
||||
|
||||
if (!policyName?.trim()) {
|
||||
this.setState({inputErrorText: Utils.localizeMessage('admin.data_retention.custom_policy.form.input.error', 'Policy name can\'t be blank.'), saving: false});
|
||||
this.setState({inputErrorText: Utils.localizeMessage({id: 'admin.data_retention.custom_policy.form.input.error', defaultMessage: 'Policy name can\'t be blank.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
};
|
||||
|
||||
if (((policy?.team_count + teamsToAdd.length) - teamsToRemove.length) === 0 && ((policy?.channel_count + channelsToAdd.length) - channelsToRemove.length) === 0) {
|
||||
this.setState({formErrorText: Utils.localizeMessage('admin.data_retention.custom_policy.form.teamsError', 'You must add a team or a channel to the policy.'), saving: false});
|
||||
this.setState({formErrorText: Utils.localizeMessage({id: 'admin.data_retention.custom_policy.form.teamsError', defaultMessage: 'You must add a team or a channel to the policy.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
}
|
||||
} else {
|
||||
if (teamsToAdd.length < 1 && channelsToAdd.length < 1) {
|
||||
this.setState({formErrorText: Utils.localizeMessage('admin.data_retention.custom_policy.form.teamsError', 'You must add a team or a channel to the policy.'), saving: false});
|
||||
this.setState({formErrorText: Utils.localizeMessage({id: 'admin.data_retention.custom_policy.form.teamsError', defaultMessage: 'You must add a team or a channel to the policy.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
const newPolicy = {
|
||||
@@ -359,7 +359,7 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
this.setState({policyName: e.target.value, saveNeeded: true});
|
||||
this.props.actions.setNavigationBlocked(true);
|
||||
}}
|
||||
placeholder={Utils.localizeMessage('admin.data_retention.custom_policy.form.input', 'Policy name')}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.data_retention.custom_policy.form.input', defaultMessage: 'Policy name'})}
|
||||
customMessage={{type: ItemStatus.ERROR, value: this.state.inputErrorText}}
|
||||
/>
|
||||
<DropdownInputHybrid
|
||||
@@ -379,8 +379,8 @@ export default class CustomPolicyForm extends React.PureComponent<Props, State>
|
||||
exceptionToInput={[FOREVER]}
|
||||
defaultValue={keepForeverOption()}
|
||||
options={[daysOption(), yearsOption(), keepForeverOption()]}
|
||||
legend={Utils.localizeMessage('admin.data_retention.form.channelAndDirectMessageRetention', 'Channel & direct message retention')}
|
||||
placeholder={Utils.localizeMessage('admin.data_retention.form.channelAndDirectMessageRetention', 'Channel & direct message retention')}
|
||||
legend={Utils.localizeMessage({id: 'admin.data_retention.form.channelAndDirectMessageRetention', defaultMessage: 'Channel & direct message retention'})}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.data_retention.form.channelAndDirectMessageRetention', defaultMessage: 'Channel & direct message retention'})}
|
||||
inputType={'number'}
|
||||
name={'message_retention'}
|
||||
dropdownClassNamePrefix={'message_retention'}
|
||||
|
||||
@@ -9,7 +9,7 @@ export const FOREVER = 'FOREVER';
|
||||
export const YEARS = 'YEARS';
|
||||
export const DAYS = 'DAYS';
|
||||
export const HOURS = 'HOURS';
|
||||
export const keepForeverOption = () => ({value: FOREVER, label: <div><i className='icon icon-infinity option-icon'/><span className='option_forever'>{Utils.localizeMessage('admin.data_retention.form.keepForever', 'Keep forever')}</span></div>});
|
||||
export const yearsOption = () => ({value: YEARS, label: <span className='option_years'>{Utils.localizeMessage('admin.data_retention.form.years', 'Years')}</span>});
|
||||
export const daysOption = () => ({value: DAYS, label: <span className='option_days'>{Utils.localizeMessage('admin.data_retention.form.days', 'Days')}</span>});
|
||||
export const hoursOption = () => ({value: HOURS, label: <span className='option_hours'>{Utils.localizeMessage('admin.data_retention.form.hours', 'Hours')}</span>});
|
||||
export const keepForeverOption = () => ({value: FOREVER, label: <div><i className='icon icon-infinity option-icon'/><span className='option_forever'>{Utils.localizeMessage({id: 'admin.data_retention.form.keepForever', defaultMessage: 'Keep forever'})}</span></div>});
|
||||
export const yearsOption = () => ({value: YEARS, label: <span className='option_years'>{Utils.localizeMessage({id: 'admin.data_retention.form.years', defaultMessage: 'Years'})}</span>});
|
||||
export const daysOption = () => ({value: DAYS, label: <span className='option_days'>{Utils.localizeMessage({id: 'admin.data_retention.form.days', defaultMessage: 'Days'})}</span>});
|
||||
export const hoursOption = () => ({value: HOURS, label: <span className='option_hours'>{Utils.localizeMessage({id: 'admin.data_retention.form.hours', defaultMessage: 'Hours'})}</span>});
|
||||
|
||||
@@ -103,7 +103,7 @@ export default class GlobalPolicyForm extends React.PureComponent<Props, State>
|
||||
this.setState({saving: true});
|
||||
|
||||
if ((messageRetentionDropdownValue.value !== FOREVER && parseInt(messageRetentionInputValue, 10) < 1) || (fileRetentionDropdownValue.value !== FOREVER && parseInt(fileRetentionInputValue, 10) < 1)) {
|
||||
this.setState({formErrorText: Utils.localizeMessage('admin.data_retention.global_policy.form.numberError', 'You must add a number greater than or equal to 1.'), saving: false});
|
||||
this.setState({formErrorText: Utils.localizeMessage({id: 'admin.data_retention.global_policy.form.numberError', defaultMessage: 'You must add a number greater than or equal to 1.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ export default class GlobalPolicyForm extends React.PureComponent<Props, State>
|
||||
<div
|
||||
className='global_policy'
|
||||
>
|
||||
<p>{Utils.localizeMessage('admin.data_retention.form.text', 'Applies to all teams and channels, but does not apply to custom retention policies.')}</p>
|
||||
<p>{Utils.localizeMessage({id: 'admin.data_retention.form.text', defaultMessage: 'Applies to all teams and channels, but does not apply to custom retention policies.'})}</p>
|
||||
<div id='global_direct_message_dropdown'>
|
||||
<DropdownInputHybrid
|
||||
onDropdownChange={(value) => {
|
||||
@@ -205,8 +205,8 @@ export default class GlobalPolicyForm extends React.PureComponent<Props, State>
|
||||
disabled={this.isMessageRetentionSetByEnv()}
|
||||
defaultValue={keepForeverOption()}
|
||||
options={[hoursOption(), daysOption(), yearsOption(), keepForeverOption()]}
|
||||
legend={Utils.localizeMessage('admin.data_retention.form.channelAndDirectMessageRetention', 'Channel & direct message retention')}
|
||||
placeholder={Utils.localizeMessage('admin.data_retention.form.channelAndDirectMessageRetention', 'Channel & direct message retention')}
|
||||
legend={Utils.localizeMessage({id: 'admin.data_retention.form.channelAndDirectMessageRetention', defaultMessage: 'Channel & direct message retention'})}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.data_retention.form.channelAndDirectMessageRetention', defaultMessage: 'Channel & direct message retention'})}
|
||||
name={'channel_message_retention'}
|
||||
inputType={'number'}
|
||||
dropdownClassNamePrefix={'channel_message_retention_dropdown'}
|
||||
@@ -233,8 +233,8 @@ export default class GlobalPolicyForm extends React.PureComponent<Props, State>
|
||||
disabled={this.isFileRetentionSetByEnv()}
|
||||
defaultValue={keepForeverOption()}
|
||||
options={[hoursOption(), daysOption(), yearsOption(), keepForeverOption()]}
|
||||
legend={Utils.localizeMessage('admin.data_retention.form.fileRetention', 'File retention')}
|
||||
placeholder={Utils.localizeMessage('admin.data_retention.form.fileRetention', 'File retention')}
|
||||
legend={Utils.localizeMessage({id: 'admin.data_retention.form.fileRetention', defaultMessage: 'File retention'})}
|
||||
placeholder={Utils.localizeMessage({id: 'admin.data_retention.form.fileRetention', defaultMessage: 'File retention'})}
|
||||
name={'file_retention'}
|
||||
inputType={'number'}
|
||||
dropdownClassNamePrefix={'file_retention_dropdown'}
|
||||
|
||||
@@ -199,7 +199,7 @@ export default class TeamList extends React.PureComponent<Props, State> {
|
||||
}}
|
||||
href='#'
|
||||
>
|
||||
{Utils.localizeMessage('admin.data_retention.custom_policy.teams.remove', 'Remove')}
|
||||
{Utils.localizeMessage({id: 'admin.data_retention.custom_policy.teams.remove', defaultMessage: 'Remove'})}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -147,10 +147,10 @@ export default class FeatureDiscovery extends React.PureComponent<Props, State>
|
||||
// by default we assume is not cloud, so the cta button is Start Trial (which will request a trial license)
|
||||
let ctaPrimaryButton = (
|
||||
<StartTrialBtn
|
||||
message={Utils.localizeMessage(
|
||||
'admin.ldap_feature_discovery.call_to_action.primary',
|
||||
'Start trial',
|
||||
)}
|
||||
message={Utils.localizeMessage({
|
||||
id: 'admin.ldap_feature_discovery.call_to_action.primary',
|
||||
defaultMessage: 'Start trial',
|
||||
})}
|
||||
telemetryId={`start_self_hosted_trial_from_${this.props.featureName}`}
|
||||
btnClass='btn btn-primary'
|
||||
renderAsButton={true}
|
||||
|
||||
@@ -99,10 +99,10 @@ State
|
||||
<Menu
|
||||
openLeft={true}
|
||||
openUp={true}
|
||||
ariaLabel={localizeMessage(
|
||||
'admin.team_channel_settings.group_row.memberRole',
|
||||
'Member Role',
|
||||
)}
|
||||
ariaLabel={localizeMessage({
|
||||
id: 'admin.team_channel_settings.group_row.memberRole',
|
||||
defaultMessage: 'Member Role',
|
||||
})}
|
||||
id={`${name}_change_role_options`}
|
||||
>
|
||||
<Menu.ItemAction
|
||||
|
||||
@@ -471,7 +471,7 @@ export default class GroupsList extends React.PureComponent<Props, State> {
|
||||
<div className='group-list-search'>
|
||||
<input
|
||||
type='text'
|
||||
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
||||
placeholder={Utils.localizeMessage({id: 'search_bar.search', defaultMessage: 'Search'})}
|
||||
onKeyUp={(e: any) => this.handleGroupSearchKeyUp(e)}
|
||||
onChange={(e) => this.setState({searchString: e.target.value})}
|
||||
value={this.state.searchString}
|
||||
|
||||
@@ -205,7 +205,7 @@ const UploadLicenseModal = (props: Props): JSX.Element | null => {
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={Boolean(isUploading)}
|
||||
text={localizeMessage('admin.license.modal.uploading', 'Uploading')}
|
||||
text={localizeMessage({id: 'admin.license.modal.uploading', defaultMessage: 'Uploading'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.license.modal.upload'
|
||||
|
||||
@@ -127,10 +127,10 @@ const TeamEditionRightPanel: React.FC<TeamEditionRightPanelProps> = ({
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={restarting}
|
||||
text={localizeMessage(
|
||||
'admin.license.enterprise.restarting',
|
||||
'Restarting',
|
||||
)}
|
||||
text={localizeMessage({
|
||||
id: 'admin.license.enterprise.restarting',
|
||||
defaultMessage: 'Restarting',
|
||||
})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.license.enterprise.restart'
|
||||
|
||||
@@ -62,13 +62,13 @@ const ManageTeamsDropdown = (props: Props) => {
|
||||
const {team} = props;
|
||||
let title;
|
||||
if (isSysAdmin) {
|
||||
title = localizeMessage('admin.user_item.sysAdmin', 'System Admin');
|
||||
title = localizeMessage({id: 'admin.user_item.sysAdmin', defaultMessage: 'System Admin'});
|
||||
} else if (isTeamAdmin) {
|
||||
title = localizeMessage('admin.user_item.teamAdmin', 'Team Admin');
|
||||
title = localizeMessage({id: 'admin.user_item.teamAdmin', defaultMessage: 'Team Admin'});
|
||||
} else if (isGuestUser) {
|
||||
title = localizeMessage('admin.user_item.guest', 'Guest');
|
||||
title = localizeMessage({id: 'admin.user_item.guest', defaultMessage: 'Guest'});
|
||||
} else {
|
||||
title = localizeMessage('admin.user_item.teamMember', 'Team Member');
|
||||
title = localizeMessage({id: 'admin.user_item.teamMember', defaultMessage: 'Team Member'});
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -79,22 +79,22 @@ const ManageTeamsDropdown = (props: Props) => {
|
||||
</a>
|
||||
<Menu
|
||||
openLeft={true}
|
||||
ariaLabel={localizeMessage('team_members_dropdown.menuAriaLabel', 'Change the role of a team member')}
|
||||
ariaLabel={localizeMessage({id: 'team_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of a team member'})}
|
||||
>
|
||||
<Menu.ItemAction
|
||||
show={!isTeamAdmin && !isGuestUser}
|
||||
onClick={makeTeamAdmin}
|
||||
text={localizeMessage('admin.user_item.makeTeamAdmin', 'Make Team Admin')}
|
||||
text={localizeMessage({id: 'admin.user_item.makeTeamAdmin', defaultMessage: 'Make Team Admin'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
show={isTeamAdmin}
|
||||
onClick={makeMember}
|
||||
text={localizeMessage('admin.user_item.makeMember', 'Make Team Member')}
|
||||
text={localizeMessage({id: 'admin.user_item.makeMember', defaultMessage: 'Make Team Member'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
show={!team.group_constrained}
|
||||
onClick={removeFromTeam}
|
||||
text={localizeMessage('team_members_dropdown.leave_team', 'Remove from Team')}
|
||||
text={localizeMessage({id: 'team_members_dropdown.leave_team', defaultMessage: 'Remove from Team'})}
|
||||
/>
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class PermissionsSchemeSummary extends React.PureComponent<Props
|
||||
const confirmButton = (
|
||||
<LoadingWrapper
|
||||
loading={this.state.deleting}
|
||||
text={Utils.localizeMessage('admin.permissions.permissionsSchemeSummary.deleting', 'Deleting...')}
|
||||
text={Utils.localizeMessage({id: 'admin.permissions.permissionsSchemeSummary.deleting', defaultMessage: 'Deleting...'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.permissions.permissionsSchemeSummary.deleteConfirmButton'
|
||||
|
||||
@@ -194,8 +194,8 @@ export class AddUsersToRoleModal extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitLoadingText = localizeMessage('multiselect.adding', 'Adding...');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
const buttonSubmitLoadingText = localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'});
|
||||
|
||||
let addError = null;
|
||||
if (this.state.addError) {
|
||||
@@ -268,7 +268,7 @@ export class AddUsersToRoleModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.state.saving}
|
||||
loading={this.state.loading}
|
||||
placeholderText={localizeMessage('multiselect.placeholder', 'Search and add members')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.placeholder', defaultMessage: 'Search and add members'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class SystemRolePermissionDropdown extends React.PureComponent<Pr
|
||||
break;
|
||||
}
|
||||
|
||||
const ariaLabel = Utils.localizeMessage('admin.permissions.system_role_permissions.change_access', 'Change role access on a system console section');
|
||||
const ariaLabel = Utils.localizeMessage({id: 'admin.permissions.system_role_permissions.change_access', defaultMessage: 'Change role access on a system console section'});
|
||||
return (
|
||||
<MenuWrapper
|
||||
isDisabled={isDisabled}
|
||||
|
||||
@@ -67,11 +67,11 @@ export default class GroupRow extends React.PureComponent<GroupRowProps> {
|
||||
displayRoleToBe = () => {
|
||||
const {group, type} = this.props;
|
||||
if (!group.scheme_admin && type === 'channel') {
|
||||
return localizeMessage('admin.team_channel_settings.group_row.channelAdmin', 'Channel Admin');
|
||||
return localizeMessage({id: 'admin.team_channel_settings.group_row.channelAdmin', defaultMessage: 'Channel Admin'});
|
||||
} else if (!group.scheme_admin && type === 'team') {
|
||||
return localizeMessage('admin.team_channel_settings.group_row.teamAdmin', 'Team Admin');
|
||||
return localizeMessage({id: 'admin.team_channel_settings.group_row.teamAdmin', defaultMessage: 'Team Admin'});
|
||||
}
|
||||
return localizeMessage('admin.team_channel_settings.group_row.member', 'Member');
|
||||
return localizeMessage({id: 'admin.team_channel_settings.group_row.member', defaultMessage: 'Member'});
|
||||
};
|
||||
|
||||
render = () => {
|
||||
@@ -119,7 +119,7 @@ export default class GroupRow extends React.PureComponent<GroupRowProps> {
|
||||
id='role-to-be-menu'
|
||||
openLeft={true}
|
||||
openUp={false}
|
||||
ariaLabel={localizeMessage('admin.team_channel_settings.group_row.memberRole', 'Member Role')}
|
||||
ariaLabel={localizeMessage({id: 'admin.team_channel_settings.group_row.memberRole', defaultMessage: 'Member Role'})}
|
||||
>
|
||||
<Menu.ItemAction
|
||||
id='role-to-be'
|
||||
|
||||
@@ -35,14 +35,14 @@ export default class UserGridRoleDropdown extends React.PureComponent<Props> {
|
||||
private getDropDownOptions = () => {
|
||||
if (this.props.scope === 'team') {
|
||||
return {
|
||||
makeAdmin: Utils.localizeMessage('team_members_dropdown.makeAdmin', 'Make Team Admin'),
|
||||
makeMember: Utils.localizeMessage('team_members_dropdown.makeMember', 'Make Team Member'),
|
||||
makeAdmin: Utils.localizeMessage({id: 'team_members_dropdown.makeAdmin', defaultMessage: 'Make Team Admin'}),
|
||||
makeMember: Utils.localizeMessage({id: 'team_members_dropdown.makeMember', defaultMessage: 'Make Team Member'}),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
makeAdmin: Utils.localizeMessage('channel_members_dropdown.make_channel_admin', 'Make Channel Admin'),
|
||||
makeMember: Utils.localizeMessage('channel_members_dropdown.make_channel_member', 'Make Channel Member'),
|
||||
makeAdmin: Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_admin', defaultMessage: 'Make Channel Admin'}),
|
||||
makeMember: Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_member', defaultMessage: 'Make Channel Member'}),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -79,18 +79,18 @@ export default class UserGridRoleDropdown extends React.PureComponent<Props> {
|
||||
private getLocalizedRole = (role: Role) => {
|
||||
switch (role) {
|
||||
case 'system_admin':
|
||||
return Utils.localizeMessage('admin.user_grid.system_admin', 'System Admin');
|
||||
return Utils.localizeMessage({id: 'admin.user_grid.system_admin', defaultMessage: 'System Admin'});
|
||||
case 'team_admin':
|
||||
return Utils.localizeMessage('admin.user_grid.team_admin', 'Team Admin');
|
||||
return Utils.localizeMessage({id: 'admin.user_grid.team_admin', defaultMessage: 'Team Admin'});
|
||||
case 'channel_admin':
|
||||
return Utils.localizeMessage('admin.user_grid.channel_admin', 'Channel Admin');
|
||||
return Utils.localizeMessage({id: 'admin.user_grid.channel_admin', defaultMessage: 'Channel Admin'});
|
||||
case 'shared_member':
|
||||
return Utils.localizeMessage('admin.user_grid.shared_member', 'Shared Member');
|
||||
return Utils.localizeMessage({id: 'admin.user_grid.shared_member', defaultMessage: 'Shared Member'});
|
||||
case 'team_user':
|
||||
case 'channel_user':
|
||||
return Utils.localizeMessage('admin.group_teams_and_channels_row.member', 'Member');
|
||||
return Utils.localizeMessage({id: 'admin.group_teams_and_channels_row.member', defaultMessage: 'Member'});
|
||||
default:
|
||||
return Utils.localizeMessage('admin.user_grid.guest', 'Guest');
|
||||
return Utils.localizeMessage({id: 'admin.user_grid.guest', defaultMessage: 'Guest'});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -113,9 +113,9 @@ export default class UserGridRoleDropdown extends React.PureComponent<Props> {
|
||||
private getAriaLabel = () => {
|
||||
const {scope} = this.props;
|
||||
if (scope === 'team') {
|
||||
return Utils.localizeMessage('team_members_dropdown.menuAriaLabel', 'Change the role of a team member');
|
||||
return Utils.localizeMessage({id: 'team_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of a team member'});
|
||||
}
|
||||
return Utils.localizeMessage('channel_members_dropdown.menuAriaLabel', 'Change the role of channel member');
|
||||
return Utils.localizeMessage({id: 'channel_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of channel member'});
|
||||
};
|
||||
|
||||
public render = (): React.ReactNode => {
|
||||
|
||||
@@ -6,8 +6,8 @@ import * as Utils from 'utils/utils';
|
||||
export function formatChannelDoughtnutData(totalPublic: any, totalPrivate: any) {
|
||||
const channelTypeData = {
|
||||
labels: [
|
||||
Utils.localizeMessage('analytics.system.publicChannels', 'Public Channels'),
|
||||
Utils.localizeMessage('analytics.system.privateGroups', 'Private Channels'),
|
||||
Utils.localizeMessage({id: 'analytics.system.publicChannels', defaultMessage: 'Public Channels'}),
|
||||
Utils.localizeMessage({id: 'analytics.system.privateGroups', defaultMessage: 'Private Channels'}),
|
||||
],
|
||||
datasets: [{
|
||||
data: [totalPublic, totalPrivate],
|
||||
@@ -22,9 +22,9 @@ export function formatChannelDoughtnutData(totalPublic: any, totalPrivate: any)
|
||||
export function formatPostDoughtnutData(filePosts: any, hashtagPosts: any, totalPosts: any) {
|
||||
const postTypeData = {
|
||||
labels: [
|
||||
Utils.localizeMessage('analytics.system.totalFilePosts', 'Posts with Files'),
|
||||
Utils.localizeMessage('analytics.system.totalHashtagPosts', 'Posts with Hashtags'),
|
||||
Utils.localizeMessage('analytics.system.textPosts', 'Posts with Text-only'),
|
||||
Utils.localizeMessage({id: 'analytics.system.totalFilePosts', defaultMessage: 'Posts with Files'}),
|
||||
Utils.localizeMessage({id: 'analytics.system.totalHashtagPosts', defaultMessage: 'Posts with Hashtags'}),
|
||||
Utils.localizeMessage({id: 'analytics.system.textPosts', defaultMessage: 'Posts with Text-only'}),
|
||||
],
|
||||
datasets: [{
|
||||
data: [filePosts, hashtagPosts, (totalPosts - filePosts - hashtagPosts)],
|
||||
|
||||
@@ -518,10 +518,10 @@ export class AppsForm extends React.PureComponent<Props, State> {
|
||||
autoFocus={!fields || fields.length === 0}
|
||||
className='btn btn-primary save-button'
|
||||
spinning={Boolean(this.state.submitting)}
|
||||
spinningText={localizeMessage(
|
||||
'interactive_dialog.submitting',
|
||||
'Submitting...',
|
||||
)}
|
||||
spinningText={localizeMessage({
|
||||
id: 'interactive_dialog.submitting',
|
||||
defaultMessage: 'Submitting...',
|
||||
})}
|
||||
>
|
||||
{submitText}
|
||||
</SpinnerButton>
|
||||
|
||||
@@ -51,7 +51,7 @@ const getPaging = (remainingProps: Props, childCount: number, hasFilter: boolean
|
||||
return {startCount, endCount, total, isFirstPage, isLastPage};
|
||||
};
|
||||
|
||||
const BackstageList = ({searchPlaceholder = localizeMessage('backstage_list.search', 'Search'), ...remainingProps}: Props) => {
|
||||
const BackstageList = ({searchPlaceholder = localizeMessage({id: 'backstage_list.search', defaultMessage: 'Search'}), ...remainingProps}: Props) => {
|
||||
const {formatMessage} = useIntl();
|
||||
|
||||
const [filter, setFilter] = useState('');
|
||||
|
||||
@@ -314,7 +314,7 @@ export default class BrowseChannels extends React.PureComponent<Props, State> {
|
||||
id='createNewChannelButton'
|
||||
className={buttonClassName}
|
||||
onClick={this.handleNewChannel}
|
||||
aria-label={localizeMessage('more_channels.create', 'Create New Channel')}
|
||||
aria-label={localizeMessage({id: 'more_channels.create', defaultMessage: 'Create New Channel'})}
|
||||
>
|
||||
{icon}
|
||||
<FormattedMessage
|
||||
|
||||
@@ -73,9 +73,9 @@ class ChannelGroupsManageModal extends React.PureComponent<Props> {
|
||||
public renderRow = (item: Group, listModal: any) => {
|
||||
let title;
|
||||
if (item.scheme_admin) {
|
||||
title = Utils.localizeMessage('channel_members_dropdown.channel_admins', 'Channel Admins');
|
||||
title = Utils.localizeMessage({id: 'channel_members_dropdown.channel_admins', defaultMessage: 'Channel Admins'});
|
||||
} else {
|
||||
title = Utils.localizeMessage('channel_members_dropdown.channel_members', 'Channel Members');
|
||||
title = Utils.localizeMessage({id: 'channel_members_dropdown.channel_members', defaultMessage: 'Channel Members'});
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -116,21 +116,21 @@ class ChannelGroupsManageModal extends React.PureComponent<Props> {
|
||||
</button>
|
||||
<Menu
|
||||
openLeft={true}
|
||||
ariaLabel={Utils.localizeMessage('channel_members_dropdown.menuAriaLabel', 'Change the role of channel member')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'channel_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of channel member'})}
|
||||
>
|
||||
<Menu.ItemAction
|
||||
show={!item.scheme_admin}
|
||||
onClick={() => this.setChannelMemberStatus(item, listModal, true)}
|
||||
text={Utils.localizeMessage('channel_members_dropdown.make_channel_admins', 'Make Channel Admins')}
|
||||
text={Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_admins', defaultMessage: 'Make Channel Admins'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
show={Boolean(item.scheme_admin)}
|
||||
onClick={() => this.setChannelMemberStatus(item, listModal, false)}
|
||||
text={Utils.localizeMessage('channel_members_dropdown.make_channel_members', 'Make Channel Members')}
|
||||
text={Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_members', defaultMessage: 'Make Channel Members'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
onClick={() => this.onClickRemoveGroup(item, listModal)}
|
||||
text={Utils.localizeMessage('group_list_modal.removeGroupButton', 'Remove Group')}
|
||||
text={Utils.localizeMessage({id: 'group_list_modal.removeGroupButton', defaultMessage: 'Remove Group'})}
|
||||
/>
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
|
||||
@@ -11,7 +11,7 @@ import {localizeMessage} from 'utils/utils';
|
||||
const ChannelHeaderDropdown = () => (
|
||||
<Menu
|
||||
id='channelHeaderDropdownMenu'
|
||||
ariaLabel={localizeMessage('channel_header.menuAriaLabel', 'Channel Menu').toLowerCase()}
|
||||
ariaLabel={localizeMessage({id: 'channel_header.menuAriaLabel', defaultMessage: 'Channel Menu'}).toLowerCase()}
|
||||
>
|
||||
<ChannelHeaderDropdownItems isMobile={false}/>
|
||||
</Menu>
|
||||
|
||||
@@ -135,7 +135,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
channel,
|
||||
currentUser: user,
|
||||
}}
|
||||
text={localizeMessage('navbar.preferences', 'Notification Preferences')}
|
||||
text={localizeMessage({id: 'navbar.preferences', defaultMessage: 'Notification Preferences'})}
|
||||
/>
|
||||
<MenuItemToggleMuteChannel
|
||||
id='channelToggleMuteChannel'
|
||||
@@ -157,7 +157,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.CHANNEL_INVITE}
|
||||
dialogType={ChannelInviteModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('navbar.addMembers', 'Add Members')}
|
||||
text={localizeMessage({id: 'navbar.addMembers', defaultMessage: 'Add Members'})}
|
||||
/>
|
||||
<Menu.ItemToggleModalRedux
|
||||
id='channelAddMembers'
|
||||
@@ -165,14 +165,14 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.CREATE_DM_CHANNEL}
|
||||
dialogType={MoreDirectChannels}
|
||||
dialogProps={{isExistingChannel: true}}
|
||||
text={localizeMessage('navbar.addMembers', 'Add Members')}
|
||||
text={localizeMessage({id: 'navbar.addMembers', defaultMessage: 'Add Members'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
<MenuItemOpenMembersRHS
|
||||
id='channelViewMembers'
|
||||
channel={channel}
|
||||
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL && (isArchived || isDefault)}
|
||||
text={localizeMessage('channel_header.viewMembers', 'View Members')}
|
||||
text={localizeMessage({id: 'channel_header.viewMembers', defaultMessage: 'View Members'})}
|
||||
/>
|
||||
<ChannelPermissionGate
|
||||
channelId={channel.id}
|
||||
@@ -184,7 +184,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL && !isArchived && !isDefault && isGroupConstrained && isLicensedForLDAPGroups}
|
||||
modalId={ModalIdentifiers.ADD_GROUPS_TO_CHANNEL}
|
||||
dialogType={AddGroupsToChannelModal}
|
||||
text={localizeMessage('navbar.addGroups', 'Add Groups')}
|
||||
text={localizeMessage({id: 'navbar.addGroups', defaultMessage: 'Add Groups'})}
|
||||
/>
|
||||
<Menu.ItemToggleModalRedux
|
||||
id='channelManageGroups'
|
||||
@@ -192,13 +192,13 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.MANAGE_CHANNEL_GROUPS}
|
||||
dialogType={ChannelGroupsManageModal}
|
||||
dialogProps={{channelID: channel.id}}
|
||||
text={localizeMessage('navbar_dropdown.manageGroups', 'Manage Groups')}
|
||||
text={localizeMessage({id: 'navbar_dropdown.manageGroups', defaultMessage: 'Manage Groups'})}
|
||||
/>
|
||||
<MenuItemOpenMembersRHS
|
||||
id='channelManageMembers'
|
||||
channel={channel}
|
||||
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL && !isArchived && !isDefault}
|
||||
text={localizeMessage('channel_header.manageMembers', 'Manage Members')}
|
||||
text={localizeMessage({id: 'channel_header.manageMembers', defaultMessage: 'Manage Members'})}
|
||||
editMembers={!isArchived}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
@@ -212,7 +212,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
id='channelViewMembers'
|
||||
channel={channel}
|
||||
show={channel.type !== Constants.DM_CHANNEL && channel.type !== Constants.GM_CHANNEL && !isArchived && !isDefault}
|
||||
text={localizeMessage('channel_header.viewMembers', 'View Members')}
|
||||
text={localizeMessage({id: 'channel_header.viewMembers', defaultMessage: 'View Members'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
</Menu.Group>
|
||||
@@ -224,7 +224,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.EDIT_CHANNEL_HEADER}
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('channel_header.setConversationHeader', 'Edit Conversation Header')}
|
||||
text={localizeMessage({id: 'channel_header.setConversationHeader', defaultMessage: 'Edit Conversation Header'})}
|
||||
/>
|
||||
|
||||
<Menu.ItemToggleModalRedux
|
||||
@@ -233,7 +233,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.CONVERT_GM_TO_CHANNEL}
|
||||
dialogType={ConvertGmToChannelModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('sidebar_left.sidebar_channel_menu_convert_to_channel', 'Convert to Private Channel')}
|
||||
text={localizeMessage({id: 'sidebar_left.sidebar_channel_menu_convert_to_channel', defaultMessage: 'Convert to Private Channel'})}
|
||||
/>
|
||||
</Menu.Group>
|
||||
|
||||
@@ -249,7 +249,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.EDIT_CHANNEL_HEADER}
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('channel_header.setHeader', 'Edit Channel Header')}
|
||||
text={localizeMessage({id: 'channel_header.setHeader', defaultMessage: 'Edit Channel Header'})}
|
||||
/>
|
||||
<Menu.ItemToggleModalRedux
|
||||
id='channelEditPurpose'
|
||||
@@ -257,7 +257,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.EDIT_CHANNEL_PURPOSE}
|
||||
dialogType={EditChannelPurposeModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('channel_header.setPurpose', 'Edit Channel Purpose')}
|
||||
text={localizeMessage({id: 'channel_header.setPurpose', defaultMessage: 'Edit Channel Purpose'})}
|
||||
/>
|
||||
<Menu.ItemToggleModalRedux
|
||||
id='channelRename'
|
||||
@@ -265,7 +265,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
modalId={ModalIdentifiers.RENAME_CHANNEL}
|
||||
dialogType={RenameChannelModal}
|
||||
dialogProps={{channel}}
|
||||
text={localizeMessage('channel_header.rename', 'Rename Channel')}
|
||||
text={localizeMessage({id: 'channel_header.rename', defaultMessage: 'Rename Channel'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
<ChannelPermissionGate
|
||||
@@ -282,7 +282,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
channelId: channel.id,
|
||||
channelDisplayName: channel.display_name,
|
||||
}}
|
||||
text={localizeMessage('channel_header.convert', 'Convert to Private Channel')}
|
||||
text={localizeMessage({id: 'channel_header.convert', defaultMessage: 'Convert to Private Channel'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
<MenuItemLeaveChannel
|
||||
@@ -306,7 +306,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
channel,
|
||||
penultimateViewedChannelName,
|
||||
}}
|
||||
text={localizeMessage('channel_header.delete', 'Archive Channel')}
|
||||
text={localizeMessage({id: 'channel_header.delete', defaultMessage: 'Archive Channel'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
{isMobile &&
|
||||
@@ -340,7 +340,7 @@ export default class ChannelHeaderDropdown extends React.PureComponent<Props> {
|
||||
dialogProps={{
|
||||
channel,
|
||||
}}
|
||||
text={localizeMessage('channel_header.unarchive', 'Unarchive Channel')}
|
||||
text={localizeMessage({id: 'channel_header.unarchive', defaultMessage: 'Unarchive Channel'})}
|
||||
/>
|
||||
</ChannelPermissionGate>
|
||||
</Menu.Group>
|
||||
|
||||
@@ -96,9 +96,9 @@ export default class CloseMessage extends React.PureComponent<Props> {
|
||||
|
||||
let text;
|
||||
if (channel.type === Constants.DM_CHANNEL) {
|
||||
text = localizeMessage('center_panel.direct.closeDirectMessage', 'Close Direct Message');
|
||||
text = localizeMessage({id: 'center_panel.direct.closeDirectMessage', defaultMessage: 'Close Direct Message'});
|
||||
} else if (channel.type === Constants.GM_CHANNEL) {
|
||||
text = localizeMessage('center_panel.direct.closeGroupMessage', 'Close Group Message');
|
||||
text = localizeMessage({id: 'center_panel.direct.closeGroupMessage', defaultMessage: 'Close Group Message'});
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -30,7 +30,7 @@ const ToggleInfo = ({show, channel, rhsOpen, actions}: Props) => {
|
||||
actions.showChannelInfo(channel.id);
|
||||
};
|
||||
|
||||
const text = rhsOpen ? localizeMessage('channelHeader.hideInfo', 'Close Info') : localizeMessage('channelHeader.viewInfo', 'View Info');
|
||||
const text = rhsOpen ? localizeMessage({id: 'channelHeader.hideInfo', defaultMessage: 'Close Info'}) : localizeMessage({id: 'channelHeader.viewInfo', defaultMessage: 'View Info'});
|
||||
|
||||
return (
|
||||
<Menu.ItemAction
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
const NavbarInfoButton: React.FunctionComponent<Props> = ({channel, actions}: Props): JSX.Element => (
|
||||
<button
|
||||
className='navbar-toggle navbar-right__icon navbar-info-button pull-right'
|
||||
aria-label={localizeMessage('accessibility.button.Info', 'Info')}
|
||||
aria-label={localizeMessage({id: 'accessibility.button.Info', defaultMessage: 'Info'})}
|
||||
onClick={() => actions.showChannelInfo(channel.id)}
|
||||
>
|
||||
<InfoIcon
|
||||
|
||||
@@ -25,7 +25,7 @@ const ShowSearchButton = ({actions}: Props) => {
|
||||
type='button'
|
||||
className='navbar-toggle navbar-right__icon navbar-search pull-right'
|
||||
onClick={handleClick}
|
||||
aria-label={localizeMessage('accessibility.button.Search', 'Search')}
|
||||
aria-label={localizeMessage({id: 'accessibility.button.Search', defaultMessage: 'Search'})}
|
||||
>
|
||||
<SearchIcon
|
||||
className='icon icon__search'
|
||||
|
||||
@@ -454,8 +454,8 @@ export class ChannelInviteModal extends React.PureComponent<Props, State> {
|
||||
inviteError = (<label className='has-error control-label'>{this.state.inviteError}</label>);
|
||||
}
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitLoadingText = localizeMessage('multiselect.adding', 'Adding...');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
const buttonSubmitLoadingText = localizeMessage({id: 'multiselect.adding', defaultMessage: 'Adding...'});
|
||||
|
||||
const closeMembersInviteModal = () => {
|
||||
this.props.actions.closeModal(ModalIdentifiers.CHANNEL_INVITE);
|
||||
@@ -517,9 +517,9 @@ export class ChannelInviteModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitLoadingText={buttonSubmitLoadingText}
|
||||
saving={this.state.saving}
|
||||
loading={this.state.loadingUsers}
|
||||
placeholderText={this.props.isGroupsEnabled ? localizeMessage('multiselect.placeholder.peopleOrGroups', 'Search for people or groups') : localizeMessage('multiselect.placeholder', 'Search for people')}
|
||||
placeholderText={this.props.isGroupsEnabled ? localizeMessage({id: 'multiselect.placeholder.peopleOrGroups', defaultMessage: 'Search for people or groups'}) : localizeMessage({id: 'multiselect.placeholder', defaultMessage: 'Search for people'})}
|
||||
valueWithImage={true}
|
||||
backButtonText={localizeMessage('multiselect.cancel', 'Cancel')}
|
||||
backButtonText={localizeMessage({id: 'multiselect.cancel', defaultMessage: 'Cancel'})}
|
||||
backButtonClick={closeMembersInviteModal}
|
||||
backButtonClass={'btn-tertiary tertiary-button'}
|
||||
customNoOptionsMessage={this.props.emailInvitationsEnabled ? customNoOptionsMessage : null}
|
||||
|
||||
@@ -159,7 +159,7 @@ export default function ChannelMembersDropdown({
|
||||
const canMakeUserChannelMember = canChangeMemberRoles && isChannelAdmin;
|
||||
const canMakeUserChannelAdmin = canChangeMemberRoles && isMember;
|
||||
const canRemoveUserFromChannel = canRemoveMember && (!channel.group_constrained || user.is_bot) && (!isDefaultChannel || isGuest);
|
||||
const removeFromChannelText = user.id === currentUserId ? Utils.localizeMessage('channel_header.leave', 'Leave Channel') : Utils.localizeMessage('channel_members_dropdown.remove_from_channel', 'Remove from Channel');
|
||||
const removeFromChannelText = user.id === currentUserId ? Utils.localizeMessage({id: 'channel_header.leave', defaultMessage: 'Leave Channel'}) : Utils.localizeMessage({id: 'channel_members_dropdown.remove_from_channel', defaultMessage: 'Remove from Channel'});
|
||||
const removeFromChannelTestId = user.id === currentUserId ? 'leaveChannel' : 'removeFromChannel';
|
||||
|
||||
if (canMakeUserChannelMember || canMakeUserChannelAdmin || canRemoveUserFromChannel) {
|
||||
@@ -177,7 +177,7 @@ export default function ChannelMembersDropdown({
|
||||
id={`${user.username}-make-channel-admin`}
|
||||
show={canMakeUserChannelAdmin}
|
||||
onClick={handleMakeChannelAdmin}
|
||||
text={Utils.localizeMessage('channel_members_dropdown.make_channel_admin', 'Make Channel Admin')}
|
||||
text={Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_admin', defaultMessage: 'Make Channel Admin'})}
|
||||
/>
|
||||
);
|
||||
const makeMemberMenu = (
|
||||
@@ -185,7 +185,7 @@ export default function ChannelMembersDropdown({
|
||||
id={`${user.username}-make-channel-member`}
|
||||
show={canMakeUserChannelMember}
|
||||
onClick={handleMakeChannelMember}
|
||||
text={Utils.localizeMessage('channel_members_dropdown.make_channel_member', 'Make Channel Member')}
|
||||
text={Utils.localizeMessage({id: 'channel_members_dropdown.make_channel_member', defaultMessage: 'Make Channel Member'})}
|
||||
/>
|
||||
);
|
||||
return (
|
||||
@@ -201,7 +201,7 @@ export default function ChannelMembersDropdown({
|
||||
<Menu
|
||||
openLeft={true}
|
||||
openUp={totalUsers > ROWS_FROM_BOTTOM_TO_OPEN_UP && totalUsers - index <= ROWS_FROM_BOTTOM_TO_OPEN_UP}
|
||||
ariaLabel={Utils.localizeMessage('channel_members_dropdown.menuAriaLabel', 'Change the role of channel member')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'channel_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of channel member'})}
|
||||
>
|
||||
{canMakeUserChannelMember ? makeMemberMenu : null}
|
||||
{canMakeUserChannelAdmin ? makeAdminMenu : null}
|
||||
|
||||
@@ -37,11 +37,11 @@ function validateDisplayName(displayNameParam: string) {
|
||||
const displayName = displayNameParam.trim();
|
||||
|
||||
if (displayName.length < Constants.MIN_CHANNELNAME_LENGTH) {
|
||||
errors.push(localizeMessage('channel_modal.name.longer', 'Channel names must have at least 2 characters.'));
|
||||
errors.push(localizeMessage({id: 'channel_modal.name.longer', defaultMessage: 'Channel names must have at least 2 characters.'}));
|
||||
}
|
||||
|
||||
if (displayName.length > Constants.MAX_CHANNELNAME_LENGTH) {
|
||||
errors.push(localizeMessage('channel_modal.name.shorter', 'Channel names must have maximum 64 characters.'));
|
||||
errors.push(localizeMessage({id: 'channel_modal.name.shorter', defaultMessage: 'Channel names must have maximum 64 characters.'}));
|
||||
}
|
||||
|
||||
return errors;
|
||||
|
||||
@@ -208,7 +208,7 @@ export class ChannelSelectorModal extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
|
||||
let options = this.state.channels.map((i): ChannelWithTeamDataValue => ({...i, label: i.display_name, value: i.id}));
|
||||
if (this.props.alreadySelected) {
|
||||
@@ -261,7 +261,7 @@ export class ChannelSelectorModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitText={buttonSubmitText}
|
||||
saving={false}
|
||||
loading={this.state.loadingChannels}
|
||||
placeholderText={localizeMessage('multiselect.addChannelsPlaceholder', 'Search and add channels')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.addChannelsPlaceholder', defaultMessage: 'Search and add channels'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
@@ -46,7 +46,7 @@ const LDAPToEmail = (props: Props) => {
|
||||
|
||||
const ldapPassword = ldapPasswordInput.current?.value;
|
||||
if (!ldapPassword) {
|
||||
setLdapPasswordError(localizeMessage('claim.ldap_to_email.ldapPasswordError', 'Please enter your AD/LDAP password.'));
|
||||
setLdapPasswordError(localizeMessage({id: 'claim.ldap_to_email.ldapPasswordError', defaultMessage: 'Please enter your AD/LDAP password.'}));
|
||||
setPasswordError('');
|
||||
setConfirmError('');
|
||||
setServerError('');
|
||||
@@ -55,7 +55,7 @@ const LDAPToEmail = (props: Props) => {
|
||||
|
||||
const password = passwordInput.current?.value;
|
||||
if (!password) {
|
||||
setPasswordError(localizeMessage('claim.ldap_to_email.pwdError', 'Please enter your password.'));
|
||||
setPasswordError(localizeMessage({id: 'claim.ldap_to_email.pwdError', defaultMessage: 'Please enter your password.'}));
|
||||
setConfirmError('');
|
||||
setLdapPasswordError('');
|
||||
setServerError('');
|
||||
@@ -75,7 +75,7 @@ const LDAPToEmail = (props: Props) => {
|
||||
|
||||
const confirmPassword = passwordConfirmInput.current?.value;
|
||||
if (!confirmPassword || password !== confirmPassword) {
|
||||
setConfirmError(localizeMessage('claim.ldap_to_email.pwdNotMatch', 'Passwords do not match.'));
|
||||
setConfirmError(localizeMessage({id: 'claim.ldap_to_email.pwdNotMatch', defaultMessage: 'Passwords do not match.'}));
|
||||
setPasswordError('');
|
||||
setLdapPasswordError('');
|
||||
setServerError('');
|
||||
|
||||
@@ -36,7 +36,7 @@ const OAuthToEmail = (props: Props) => {
|
||||
|
||||
const password = passwordInput.current?.value;
|
||||
if (!password) {
|
||||
setError(localizeMessage('claim.oauth_to_email.enterPwd', 'Please enter a password.'));
|
||||
setError(localizeMessage({id: 'claim.oauth_to_email.enterPwd', defaultMessage: 'Please enter a password.'}));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ const OAuthToEmail = (props: Props) => {
|
||||
|
||||
const confirmPassword = passwordConfirmInput.current?.value;
|
||||
if (!confirmPassword || password !== confirmPassword) {
|
||||
setError(localizeMessage('claim.oauth_to_email.pwdNotMatch', 'Passwords do not match.'));
|
||||
setError(localizeMessage({id: 'claim.oauth_to_email.pwdNotMatch', defaultMessage: 'Passwords do not match.'}));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
const displayName = this.state.name;
|
||||
|
||||
if (!displayName || !displayName.trim()) {
|
||||
this.setState({nameInputErrorText: Utils.localizeMessage('user_groups_modal.nameIsEmpty', 'Name is a required field.'), saving: false});
|
||||
this.setState({nameInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.nameIsEmpty', defaultMessage: 'Name is a required field.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -120,18 +120,18 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
if (mention.length < 1) {
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage('user_groups_modal.mentionIsEmpty', 'Mention is a required field.'), saving: false});
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.mentionIsEmpty', defaultMessage: 'Mention is a required field.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
if (Constants.SPECIAL_MENTIONS.includes(mention.toLowerCase())) {
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage('user_groups_modal.mentionReservedWord', 'Mention contains a reserved word.'), saving: false});
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.mentionReservedWord', defaultMessage: 'Mention contains a reserved word.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
const mentionRegEx = new RegExp(/^[a-z0-9.\-_]+$/);
|
||||
if (!mentionRegEx.test(mention)) {
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage('user_groups_modal.mentionInvalidError', 'Invalid character in mention.'), saving: false});
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.mentionInvalidError', defaultMessage: 'Invalid character in mention.'}), saving: false});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -149,9 +149,9 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
|
||||
if (data?.error) {
|
||||
if (data.error?.server_error_id === 'app.custom_group.unique_name') {
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage('user_groups_modal.mentionNotUnique', 'Mention needs to be unique.')});
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.mentionNotUnique', defaultMessage: 'Mention needs to be unique.'})});
|
||||
} else if (data.error?.server_error_id === 'app.group.username_conflict') {
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage('user_groups_modal.mentionUsernameConflict', 'A username already exists with this name. Mention must be unique.')});
|
||||
this.setState({mentionInputErrorText: Utils.localizeMessage({id: 'user_groups_modal.mentionUsernameConflict', defaultMessage: 'A username already exists with this name. Mention must be unique.'})});
|
||||
} else {
|
||||
this.setState({showUnknownError: true});
|
||||
}
|
||||
@@ -217,7 +217,7 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
<div className='group-name-input-wrapper'>
|
||||
<Input
|
||||
type='text'
|
||||
placeholder={Utils.localizeMessage('user_groups_modal.name', 'Name')}
|
||||
placeholder={Utils.localizeMessage({id: 'user_groups_modal.name', defaultMessage: 'Name'})}
|
||||
onChange={this.updateNameState}
|
||||
value={this.state.name}
|
||||
data-testid='nameInput'
|
||||
@@ -229,7 +229,7 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
<div className='group-mention-input-wrapper'>
|
||||
<Input
|
||||
type='text'
|
||||
placeholder={Utils.localizeMessage('user_groups_modal.mention', 'Mention')}
|
||||
placeholder={Utils.localizeMessage({id: 'user_groups_modal.mention', defaultMessage: 'Mention'})}
|
||||
onChange={this.updateMentionState}
|
||||
value={this.state.mention}
|
||||
maxLength={64}
|
||||
@@ -251,7 +251,7 @@ export class CreateUserGroupsModal extends React.PureComponent<Props, State> {
|
||||
savingEnabled={this.isSaveEnabled()}
|
||||
addUserCallback={this.addUserCallback}
|
||||
deleteUserCallback={this.deleteUserCallback}
|
||||
backButtonText={localizeMessage('multiselect.cancelButton', 'Cancel')}
|
||||
backButtonText={localizeMessage({id: 'multiselect.cancelButton', defaultMessage: 'Cancel'})}
|
||||
backButtonClick={
|
||||
typeof this.props.backButtonCallback === 'function' ? this.goBack : this.doHide
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ export default class DndCustomTimePicker extends React.PureComponent<Props, Stat
|
||||
<CompassThemeProvider theme={this.props.theme}>
|
||||
<GenericModal
|
||||
compassDesign={true}
|
||||
ariaLabel={localizeMessage('dnd_custom_time_picker_modal.defaultMsg', 'Disable notifications until')}
|
||||
ariaLabel={localizeMessage({id: 'dnd_custom_time_picker_modal.defaultMsg', defaultMessage: 'Disable notifications until'})}
|
||||
onExited={this.props.onExited}
|
||||
modalHeaderText={modalHeaderText}
|
||||
confirmButtonText={confirmButtonText}
|
||||
@@ -260,7 +260,7 @@ export default class DndCustomTimePicker extends React.PureComponent<Props, Stat
|
||||
readOnly={true}
|
||||
id='DndModal__calendar-input'
|
||||
className={classNames('DndModal__calendar-input', {'popper-open': isPopperOpen})}
|
||||
label={localizeMessage('dnd_custom_time_picker_modal.date', 'Date')}
|
||||
label={localizeMessage({id: 'dnd_custom_time_picker_modal.date', defaultMessage: 'Date'})}
|
||||
onClick={() => this.handlePopperOpenState(true)}
|
||||
tabIndex={-1}
|
||||
inputPrefix={inputIcon}
|
||||
|
||||
@@ -297,7 +297,7 @@ export class DotMenuClass extends React.PureComponent<Props, State> {
|
||||
this.props.actions.setEditingPost(
|
||||
this.props.post.id,
|
||||
this.props.location === Locations.CENTER ? 'post_textbox' : 'reply_textbox',
|
||||
this.props.post.root_id ? Utils.localizeMessage('rhs_comment.comment', 'Comment') : Utils.localizeMessage('create_post.post', 'Post'),
|
||||
this.props.post.root_id ? Utils.localizeMessage({id: 'rhs_comment.comment', defaultMessage: 'Comment'}) : Utils.localizeMessage({id: 'create_post.post', defaultMessage: 'Post'}),
|
||||
this.props.location === Locations.RHS_ROOT || this.props.location === Locations.RHS_COMMENT || this.props.location === Locations.SEARCH,
|
||||
);
|
||||
trackDotMenuEvent(e, TELEMETRY_LABELS.EDIT);
|
||||
|
||||
@@ -140,7 +140,7 @@ export default class EditCategoryModal extends React.PureComponent<Props, State>
|
||||
return (
|
||||
<GenericModal
|
||||
id='editCategoryModal'
|
||||
ariaLabel={localizeMessage('rename_category_modal.renameCategory', 'Rename Category')}
|
||||
ariaLabel={localizeMessage({id: 'rename_category_modal.renameCategory', defaultMessage: 'Rename Category'})}
|
||||
modalHeaderText={modalHeaderText}
|
||||
confirmButtonText={editButtonText}
|
||||
compassDesign={true}
|
||||
@@ -156,7 +156,7 @@ 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', 'Name your category')}
|
||||
placeholder={localizeMessage({id: 'edit_category_modal.placeholder', defaultMessage: 'Name your category'})}
|
||||
clearable={true}
|
||||
onClear={this.handleClear}
|
||||
onChange={this.handleChange}
|
||||
|
||||
@@ -389,7 +389,7 @@ export default class AddEmoji extends React.PureComponent<AddEmojiProps, AddEmoj
|
||||
className='btn btn-primary'
|
||||
type='submit'
|
||||
spinning={this.state.saving}
|
||||
spinningText={localizeMessage('add_emoji.saving', 'Saving...')}
|
||||
spinningText={localizeMessage({id: 'add_emoji.saving', defaultMessage: 'Saving...'})}
|
||||
onClick={this.handleSaveButtonClick}
|
||||
>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -93,7 +93,7 @@ const ErrorTitle: React.FC<Props> = ({type, title}: Props) => {
|
||||
} else if (title) {
|
||||
errorTitle = <>{title}</>;
|
||||
} else {
|
||||
errorTitle = <>{Utils.localizeMessage('error.generic.title', 'Error')}</>;
|
||||
errorTitle = <>{Utils.localizeMessage({id: 'error.generic.title', defaultMessage: 'Error'})}</>;
|
||||
}
|
||||
|
||||
return errorTitle;
|
||||
|
||||
@@ -85,12 +85,12 @@ export default class FilenameOverlay extends React.PureComponent<Props> {
|
||||
<div className={iconClass || 'post-image__name'}>
|
||||
<WithTooltip
|
||||
id='file-name__tooltip'
|
||||
title={localizeMessage('view_image_popover.download', 'Download')}
|
||||
title={localizeMessage({id: 'view_image_popover.download', defaultMessage: 'Download'})}
|
||||
placement='top'
|
||||
>
|
||||
<ExternalLink
|
||||
href={getFileDownloadUrl(fileInfo.id)}
|
||||
aria-label={localizeMessage('view_image_popover.download', 'Download').toLowerCase()}
|
||||
aria-label={localizeMessage({id: 'view_image_popover.download', defaultMessage: 'Download'}).toLowerCase()}
|
||||
download={fileName}
|
||||
location='filename_overlay'
|
||||
>
|
||||
|
||||
@@ -23,14 +23,14 @@ const FileInfoPreview = ({
|
||||
|
||||
if (fileInfo.extension !== '') {
|
||||
infoParts.push(
|
||||
Utils.localizeMessage('file_info_preview.type', 'File type ') +
|
||||
Utils.localizeMessage({id: 'file_info_preview.type', defaultMessage: 'File type '}) +
|
||||
fileInfo.extension.toUpperCase(),
|
||||
);
|
||||
}
|
||||
|
||||
if (fileInfo.size) {
|
||||
infoParts.push(
|
||||
Utils.localizeMessage('file_info_preview.size', 'Size ') +
|
||||
Utils.localizeMessage({id: 'file_info_preview.size', defaultMessage: 'Size '}) +
|
||||
Utils.fileSizeToString(fileInfo.size),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ export default class FilePreviewModal extends React.PureComponent<Props, State>
|
||||
}
|
||||
} else {
|
||||
// display a progress indicator when the preview for an image is still loading
|
||||
const loading = Utils.localizeMessage('view_image.loading', 'Loading');
|
||||
const loading = Utils.localizeMessage({id: 'view_image.loading', defaultMessage: 'Loading'});
|
||||
const progress = Math.floor(this.state.progress[this.state.imageIndex]);
|
||||
|
||||
content = (
|
||||
|
||||
@@ -147,7 +147,7 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
{this.props.fileInfo.post_id && (
|
||||
<WithTooltip
|
||||
id='file-name__tooltip'
|
||||
title={localizeMessage('file_search_result_item.more_actions', 'More Actions')}
|
||||
title={localizeMessage({id: 'file_search_result_item.more_actions', defaultMessage: 'More Actions'})}
|
||||
placement={'top'}
|
||||
>
|
||||
<MenuWrapper
|
||||
@@ -166,13 +166,13 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
>
|
||||
<Menu.ItemAction
|
||||
onClick={this.jumpToConv}
|
||||
ariaLabel={localizeMessage('file_search_result_item.open_in_channel', 'Open in channel')}
|
||||
text={localizeMessage('file_search_result_item.open_in_channel', 'Open in channel')}
|
||||
ariaLabel={localizeMessage({id: 'file_search_result_item.open_in_channel', defaultMessage: 'Open in channel'})}
|
||||
text={localizeMessage({id: 'file_search_result_item.open_in_channel', defaultMessage: 'Open in channel'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
onClick={this.copyLink}
|
||||
ariaLabel={localizeMessage('file_search_result_item.copy_link', 'Copy link')}
|
||||
text={localizeMessage('file_search_result_item.copy_link', 'Copy link')}
|
||||
ariaLabel={localizeMessage({id: 'file_search_result_item.copy_link', defaultMessage: 'Copy link'})}
|
||||
text={localizeMessage({id: 'file_search_result_item.copy_link', defaultMessage: 'Copy link'})}
|
||||
/>
|
||||
{this.renderPluginItems()}
|
||||
</Menu>
|
||||
@@ -181,7 +181,7 @@ export default class FileSearchResultItem extends React.PureComponent<Props, Sta
|
||||
)}
|
||||
<WithTooltip
|
||||
id='file-name__tooltip'
|
||||
title={localizeMessage('file_search_result_item.download', 'Download')}
|
||||
title={localizeMessage({id: 'file_search_result_item.download', defaultMessage: 'Download'})}
|
||||
placement={'top'}
|
||||
>
|
||||
<a
|
||||
|
||||
@@ -326,7 +326,7 @@ export class FileUpload extends PureComponent<Props, State> {
|
||||
|
||||
handleDrop = (e: DragEvent<HTMLInputElement>) => {
|
||||
if (!this.props.canUploadFiles) {
|
||||
this.props.onUploadError(localizeMessage('file_upload.disabled', 'File attachments are disabled.'));
|
||||
this.props.onUploadError(localizeMessage({id: 'file_upload.disabled', defaultMessage: 'File attachments are disabled.'}));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ export class FileUpload extends PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
if (files.length === 0) {
|
||||
this.props.onUploadError(localizeMessage('file_upload.drag_folder', 'This attachment cannot be uploaded.'));
|
||||
this.props.onUploadError(localizeMessage({id: 'file_upload.drag_folder', defaultMessage: 'This attachment cannot be uploaded.'}));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ export class FileUpload extends PureComponent<Props, State> {
|
||||
e.preventDefault();
|
||||
|
||||
if (!this.props.canUploadFiles) {
|
||||
this.props.onUploadError(localizeMessage('file_upload.disabled', 'File attachments are disabled.'));
|
||||
this.props.onUploadError(localizeMessage({id: 'file_upload.disabled', defaultMessage: 'File attachments are disabled.'}));
|
||||
return;
|
||||
}
|
||||
const postTextbox = this.props.postType === 'post' && document.activeElement?.id === 'post_textbox';
|
||||
|
||||
@@ -83,7 +83,7 @@ const HistoryButtons = (): JSX.Element => {
|
||||
compact={true}
|
||||
inverted={true}
|
||||
disabled={!canGoBack}
|
||||
aria-label={Utils.localizeMessage('sidebar_left.channel_navigator.goBackLabel', 'Back')}
|
||||
aria-label={Utils.localizeMessage({id: 'sidebar_left.channel_navigator.goBackLabel', defaultMessage: 'Back'})}
|
||||
/>
|
||||
</WithTooltip>
|
||||
<WithTooltip
|
||||
@@ -98,7 +98,7 @@ const HistoryButtons = (): JSX.Element => {
|
||||
compact={true}
|
||||
inverted={true}
|
||||
disabled={!canGoForward}
|
||||
aria-label={Utils.localizeMessage('sidebar_left.channel_navigator.goForwardLabel', 'Forward')}
|
||||
aria-label={Utils.localizeMessage({id: 'sidebar_left.channel_navigator.goForwardLabel', defaultMessage: 'Forward'})}
|
||||
/>
|
||||
</WithTooltip>
|
||||
</HistoryButtonsContainer>
|
||||
|
||||
@@ -570,10 +570,10 @@ export class AbstractCommand extends React.PureComponent<Props, State> {
|
||||
onChange={this.updateMethod}
|
||||
>
|
||||
<option value={REQUEST_POST}>
|
||||
{Utils.localizeMessage('add_command.method.post', 'POST')}
|
||||
{Utils.localizeMessage({id: 'add_command.method.post', defaultMessage: 'POST'})}
|
||||
</option>
|
||||
<option value={REQUEST_GET}>
|
||||
{Utils.localizeMessage('add_command.method.get', 'GET')}
|
||||
{Utils.localizeMessage({id: 'add_command.method.get', defaultMessage: 'GET'})}
|
||||
</option>
|
||||
</select>
|
||||
<div className='form__help'>
|
||||
@@ -691,7 +691,7 @@ export class AbstractCommand extends React.PureComponent<Props, State> {
|
||||
className='btn btn-primary'
|
||||
type='submit'
|
||||
spinning={this.state.saving}
|
||||
spinningText={typeof this.props.loading === 'string' ? this.props.loading : Utils.localizeMessage(this.props.loading?.id ?? '', this.props.loading?.defaultMessage as string)}
|
||||
spinningText={typeof this.props.loading === 'string' ? this.props.loading : Utils.localizeMessage({id: this.props.loading?.id ?? '', defaultMessage: this.props.loading?.defaultMessage as string})}
|
||||
onClick={this.handleSubmit}
|
||||
id='saveCommand'
|
||||
>
|
||||
|
||||
@@ -383,7 +383,7 @@ export default class AbstractIncomingWebhook extends PureComponent<Props, State>
|
||||
className='btn btn-primary'
|
||||
type='submit'
|
||||
spinning={this.state.saving}
|
||||
spinningText={localizeMessage(this.props.loading.id as string, this.props.loading.defaultMessage as string)}
|
||||
spinningText={localizeMessage({id: this.props.loading.id as string, defaultMessage: this.props.loading.defaultMessage as string})}
|
||||
onClick={(e) => this.handleSubmit(e)}
|
||||
id='saveWebhook'
|
||||
>
|
||||
|
||||
@@ -477,7 +477,7 @@ export default class AbstractOAuthApp extends React.PureComponent<Props, State>
|
||||
className='btn btn-primary'
|
||||
type='submit'
|
||||
spinning={this.state.saving}
|
||||
spinningText={localizeMessage(this.props.loading?.id || '', (this.props.loading?.defaultMessage || '') as string)}
|
||||
spinningText={localizeMessage({id: this.props.loading?.id || '', defaultMessage: (this.props.loading?.defaultMessage || '') as string})}
|
||||
onClick={this.handleSubmit}
|
||||
id='saveOauthApp'
|
||||
>
|
||||
|
||||
@@ -462,12 +462,12 @@ export default class AbstractOutgoingWebhook extends React.PureComponent<Props,
|
||||
<option
|
||||
value='0'
|
||||
>
|
||||
{localizeMessage('add_outgoing_webhook.triggerWordsTriggerWhenFullWord', 'First word matches a trigger word exactly')}
|
||||
{localizeMessage({id: 'add_outgoing_webhook.triggerWordsTriggerWhenFullWord', defaultMessage: 'First word matches a trigger word exactly'})}
|
||||
</option>
|
||||
<option
|
||||
value='1'
|
||||
>
|
||||
{localizeMessage('add_outgoing_webhook.triggerWordsTriggerWhenStartsWith', 'First word starts with a trigger word')}
|
||||
{localizeMessage({id: 'add_outgoing_webhook.triggerWordsTriggerWhenStartsWith', defaultMessage: 'First word starts with a trigger word'})}
|
||||
</option>
|
||||
</select>
|
||||
<div className='form__help'>
|
||||
@@ -594,7 +594,7 @@ export default class AbstractOutgoingWebhook extends React.PureComponent<Props,
|
||||
className='btn btn-primary'
|
||||
type='submit'
|
||||
spinning={this.state.saving}
|
||||
spinningText={localizeMessage(this.props.loading.id as string, this.props.loading.defaultMessage as string)}
|
||||
spinningText={localizeMessage({id: this.props.loading.id as string, defaultMessage: this.props.loading.defaultMessage as string})}
|
||||
onClick={this.handleSubmit}
|
||||
id='saveWebhook'
|
||||
>
|
||||
|
||||
@@ -280,7 +280,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
|
||||
data = result.data;
|
||||
error = result.error;
|
||||
} else {
|
||||
error = Utils.localizeMessage('bot.edit_failed', 'Failed to edit bot');
|
||||
error = Utils.localizeMessage({id: 'bot.edit_failed', defaultMessage: 'Failed to edit bot'});
|
||||
}
|
||||
|
||||
if (!error && data) {
|
||||
@@ -334,7 +334,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
|
||||
data = result.data;
|
||||
error = result.error;
|
||||
} else {
|
||||
error = Utils.localizeMessage('bot.create_failed', 'Failed to create bot');
|
||||
error = Utils.localizeMessage({id: 'bot.create_failed', defaultMessage: 'Failed to create bot'});
|
||||
}
|
||||
|
||||
let token = '';
|
||||
@@ -345,7 +345,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
|
||||
await this.props.actions.setDefaultProfileImage(data.user_id);
|
||||
}
|
||||
const tokenResult = await this.props.actions.createUserAccessToken(data.user_id,
|
||||
Utils.localizeMessage('bot.token.default.description', 'Default Token'),
|
||||
Utils.localizeMessage({id: 'bot.token.default.description', defaultMessage: 'Default Token'}),
|
||||
);
|
||||
|
||||
// On error just skip the confirmation because we have a bot without a token.
|
||||
@@ -608,12 +608,12 @@ export default class AddBot extends React.PureComponent<Props, State> {
|
||||
<option
|
||||
value={roleOptionMember}
|
||||
>
|
||||
{Utils.localizeMessage('bot.add.role.member', 'Member')}
|
||||
{Utils.localizeMessage({id: 'bot.add.role.member', defaultMessage: 'Member'})}
|
||||
</option>
|
||||
<option
|
||||
value={roleOptionSystemAdmin}
|
||||
>
|
||||
{Utils.localizeMessage('bot.add.role.admin', 'System Admin')}
|
||||
{Utils.localizeMessage({id: 'bot.add.role.admin', defaultMessage: 'System Admin'})}
|
||||
</option>
|
||||
</select>
|
||||
<div className='form__help'>
|
||||
|
||||
@@ -269,7 +269,7 @@ export default class Bots extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
</React.Fragment>
|
||||
}
|
||||
searchPlaceholder={Utils.localizeMessage('bots.manage.search', 'Search Bot Accounts')}
|
||||
searchPlaceholder={Utils.localizeMessage({id: 'bots.manage.search', defaultMessage: 'Search Bot Accounts'})}
|
||||
loading={this.state.loading}
|
||||
>
|
||||
{this.bots}
|
||||
|
||||
@@ -53,12 +53,12 @@ export default class InstalledCommands extends React.PureComponent<Props> {
|
||||
private commandCompare(a: Command, b: Command) {
|
||||
let nameA = a.display_name;
|
||||
if (!nameA) {
|
||||
nameA = Utils.localizeMessage('installed_commands.unnamed_command', 'Unnamed Slash Command');
|
||||
nameA = Utils.localizeMessage({id: 'installed_commands.unnamed_command', defaultMessage: 'Unnamed Slash Command'});
|
||||
}
|
||||
|
||||
let nameB = b.display_name;
|
||||
if (!nameB) {
|
||||
nameB = Utils.localizeMessage('installed_commands.unnamed_command', 'Unnamed Slash Command');
|
||||
nameB = Utils.localizeMessage({id: 'installed_commands.unnamed_command', defaultMessage: 'Unnamed Slash Command'});
|
||||
}
|
||||
|
||||
return nameA.localeCompare(nameB);
|
||||
@@ -142,7 +142,7 @@ export default class InstalledCommands extends React.PureComponent<Props> {
|
||||
}}
|
||||
/>
|
||||
}
|
||||
searchPlaceholder={Utils.localizeMessage('installed_commands.search', 'Search Slash Commands')}
|
||||
searchPlaceholder={Utils.localizeMessage({id: 'installed_commands.search', defaultMessage: 'Search Slash Commands'})}
|
||||
loading={this.props.loading}
|
||||
>
|
||||
{(filter: string) => {
|
||||
|
||||
@@ -92,7 +92,7 @@ export default class InstalledIncomingWebhooks extends React.PureComponent<Props
|
||||
if (channelA) {
|
||||
displayNameA = channelA.display_name;
|
||||
} else {
|
||||
displayNameA = Utils.localizeMessage('installed_incoming_webhooks.unknown_channel', 'A Private Webhook');
|
||||
displayNameA = Utils.localizeMessage({id: 'installed_incoming_webhooks.unknown_channel', defaultMessage: 'A Private Webhook'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ export default class InstalledIncomingWebhooks extends React.PureComponent<Props
|
||||
}}
|
||||
/>
|
||||
}
|
||||
searchPlaceholder={Utils.localizeMessage('installed_incoming_webhooks.search', 'Search Incoming Webhooks')}
|
||||
searchPlaceholder={Utils.localizeMessage({id: 'installed_incoming_webhooks.search', defaultMessage: 'Search Incoming Webhooks'})}
|
||||
loading={this.state.loading}
|
||||
nextPage={this.nextPage}
|
||||
previousPage={this.previousPage}
|
||||
|
||||
@@ -160,9 +160,9 @@ export default class InstalledOAuthApp extends React.PureComponent<InstalledOAut
|
||||
|
||||
let isTrusted;
|
||||
if (oauthApp.is_trusted) {
|
||||
isTrusted = Utils.localizeMessage('installed_oauth_apps.trusted.yes', 'Yes');
|
||||
isTrusted = Utils.localizeMessage({id: 'installed_oauth_apps.trusted.yes', defaultMessage: 'Yes'});
|
||||
} else {
|
||||
isTrusted = Utils.localizeMessage('installed_oauth_apps.trusted.no', 'No');
|
||||
isTrusted = Utils.localizeMessage({id: 'installed_oauth_apps.trusted.no', defaultMessage: 'No'});
|
||||
}
|
||||
|
||||
let showHide;
|
||||
|
||||
@@ -96,12 +96,12 @@ export default class InstalledOAuthApps extends React.PureComponent<Props, State
|
||||
oauthAppCompare(a: OAuthApp, b: OAuthApp): number {
|
||||
let nameA = a.name.toString();
|
||||
if (!nameA) {
|
||||
nameA = localizeMessage('installed_integrations.unnamed_oauth_app', 'Unnamed OAuth 2.0 Application');
|
||||
nameA = localizeMessage({id: 'installed_integrations.unnamed_oauth_app', defaultMessage: 'Unnamed OAuth 2.0 Application'});
|
||||
}
|
||||
|
||||
let nameB = b.name.toString();
|
||||
if (!nameB) {
|
||||
nameB = localizeMessage('installed_integrations.unnamed_oauth_app', 'Unnamed OAuth 2.0 Application');
|
||||
nameB = localizeMessage({id: 'installed_integrations.unnamed_oauth_app', defaultMessage: 'Unnamed OAuth 2.0 Application'});
|
||||
}
|
||||
|
||||
return nameA.localeCompare(nameB);
|
||||
@@ -133,7 +133,7 @@ export default class InstalledOAuthApps extends React.PureComponent<Props, State
|
||||
if (integrationsEnabled) {
|
||||
props = {
|
||||
addLink: '/' + this.props.team.name + '/integrations/oauth2-apps/add',
|
||||
addText: localizeMessage('installed_oauth_apps.add', 'Add OAuth 2.0 Application'),
|
||||
addText: localizeMessage({id: 'installed_oauth_apps.add', defaultMessage: 'Add OAuth 2.0 Application'}),
|
||||
addButtonId: 'addOauthApp',
|
||||
};
|
||||
}
|
||||
@@ -188,7 +188,7 @@ export default class InstalledOAuthApps extends React.PureComponent<Props, State
|
||||
defaultMessage='No OAuth 2.0 Applications match {searchTerm}'
|
||||
/>
|
||||
}
|
||||
searchPlaceholder={localizeMessage('installed_oauth_apps.search', 'Search OAuth 2.0 Applications')}
|
||||
searchPlaceholder={localizeMessage({id: 'installed_oauth_apps.search', defaultMessage: 'Search OAuth 2.0 Applications'})}
|
||||
loading={this.state.loading}
|
||||
{...props}
|
||||
>
|
||||
|
||||
@@ -121,7 +121,7 @@ export default class InstalledOutgoingWebhooks extends React.PureComponent<Props
|
||||
if (channelA) {
|
||||
displayNameA = channelA.display_name;
|
||||
} else {
|
||||
displayNameA = localizeMessage('installed_outgoing_webhooks.unknown_channel', 'A Private Webhook');
|
||||
displayNameA = localizeMessage({id: 'installed_outgoing_webhooks.unknown_channel', defaultMessage: 'A Private Webhook'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export default class InstalledOutgoingWebhooks extends React.PureComponent<Props
|
||||
if (channelB) {
|
||||
displayNameB = channelB.display_name;
|
||||
} else {
|
||||
displayNameB = localizeMessage('installed_outgoing_webhooks.unknown_channel', 'A Private Webhook');
|
||||
displayNameB = localizeMessage({id: 'installed_outgoing_webhooks.unknown_channel', defaultMessage: 'A Private Webhook'});
|
||||
}
|
||||
}
|
||||
return displayNameA.localeCompare(displayNameB);
|
||||
@@ -220,10 +220,10 @@ export default class InstalledOutgoingWebhooks extends React.PureComponent<Props
|
||||
}}
|
||||
/>
|
||||
}
|
||||
searchPlaceholder={localizeMessage(
|
||||
'installed_outgoing_webhooks.search',
|
||||
'Search Outgoing Webhooks',
|
||||
)}
|
||||
searchPlaceholder={localizeMessage({
|
||||
id: 'installed_outgoing_webhooks.search',
|
||||
defaultMessage: 'Search Outgoing Webhooks',
|
||||
})}
|
||||
loading={this.state.loading}
|
||||
>
|
||||
{(filter: string) => {
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class Integrations extends React.PureComponent <Props> {
|
||||
|
||||
updateTitle = () => {
|
||||
const currentSiteName = this.props.siteName || '';
|
||||
document.title = Utils.localizeMessage('admin.sidebar.integrations', 'Integrations') + ' - ' + this.props.team.display_name + ' ' + currentSiteName;
|
||||
document.title = Utils.localizeMessage({id: 'admin.sidebar.integrations', defaultMessage: 'Integrations'}) + ' - ' + this.props.team.display_name + ' ' + currentSiteName;
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import IntlProvider from 'components/intl_provider/intl_provider';
|
||||
import {getLanguageInfo} from 'i18n/i18n';
|
||||
|
||||
describe('components/IntlProvider', () => {
|
||||
const messageId = 'test.hello_world';
|
||||
const baseProps = {
|
||||
locale: 'en',
|
||||
translations: {
|
||||
@@ -20,7 +21,7 @@ describe('components/IntlProvider', () => {
|
||||
},
|
||||
children: (
|
||||
<FormattedMessage
|
||||
id='test.hello_world'
|
||||
id={messageId}
|
||||
defaultMessage='Hello, World!'
|
||||
/>
|
||||
),
|
||||
|
||||
@@ -97,7 +97,7 @@ class Setup extends React.PureComponent<Props, State> {
|
||||
e.preventDefault();
|
||||
const code = this.input?.current?.value.replace(/\s/g, '');
|
||||
if (!code || code.length === 0) {
|
||||
this.setState({error: Utils.localizeMessage('mfa.setup.codeError', 'Please enter the code from Google Authenticator.')});
|
||||
this.setState({error: Utils.localizeMessage({id: 'mfa.setup.codeError', defaultMessage: 'Please enter the code from Google Authenticator.'})});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class Setup extends React.PureComponent<Props, State> {
|
||||
if (error) {
|
||||
if (error.server_error_id === 'ent.mfa.activate.authenticate.app_error') {
|
||||
this.setState({
|
||||
error: Utils.localizeMessage('mfa.setup.badCode', 'Invalid code. If this issue persists, contact your System Administrator.'),
|
||||
error: Utils.localizeMessage({id: 'mfa.setup.badCode', defaultMessage: 'Invalid code. If this issue persists, contact your System Administrator.'}),
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
|
||||
@@ -526,7 +526,7 @@ export class MultiSelect<T extends Value> extends React.PureComponent<Props<T>,
|
||||
}}
|
||||
className={classNames('btn btn-tertiary', this.props.backButtonClass)}
|
||||
>
|
||||
{this.props.backButtonText || localizeMessage('multiselect.backButton', 'Back')}
|
||||
{this.props.backButtonText || localizeMessage({id: 'multiselect.backButton', defaultMessage: 'Back'})}
|
||||
</button>
|
||||
}
|
||||
<SaveButton
|
||||
|
||||
@@ -86,7 +86,7 @@ export default class MarketplaceItemApp extends React.PureComponent <Marketplace
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={this.props.installing}
|
||||
text={localizeMessage('marketplace_modal.installing', 'Installing...')}
|
||||
text={localizeMessage({id: 'marketplace_modal.installing', defaultMessage: 'Installing...'})}
|
||||
>
|
||||
{actionButton}
|
||||
</LoadingWrapper>
|
||||
|
||||
@@ -328,7 +328,7 @@ export default class MarketplaceItemPlugin extends React.PureComponent <Marketpl
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={this.props.installing}
|
||||
text={localizeMessage('marketplace_modal.installing', 'Installing...')}
|
||||
text={localizeMessage({id: 'marketplace_modal.installing', defaultMessage: 'Installing...'})}
|
||||
>
|
||||
{actionButton}
|
||||
</LoadingWrapper>
|
||||
|
||||
@@ -707,7 +707,7 @@ function createSetHeaderButton(channel: Channel) {
|
||||
return (
|
||||
<ToggleModalButton
|
||||
modalId={ModalIdentifiers.EDIT_CHANNEL_HEADER}
|
||||
ariaLabel={Utils.localizeMessage('intro_messages.setHeader', 'Set header')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'intro_messages.setHeader', defaultMessage: 'Set header'})}
|
||||
className={'action-button'}
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
@@ -755,7 +755,7 @@ function createNotificationPreferencesButton(channel: Channel, currentUser: User
|
||||
return (
|
||||
<ToggleModalButton
|
||||
modalId={ModalIdentifiers.CHANNEL_NOTIFICATIONS}
|
||||
ariaLabel={Utils.localizeMessage('intro_messages.notificationPreferences', 'Notification Preferences')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'intro_messages.notificationPreferences', defaultMessage: 'Notification Preferences'})}
|
||||
className={'action-button'}
|
||||
dialogType={ChannelNotificationsModal}
|
||||
dialogProps={{channel, currentUser}}
|
||||
|
||||
@@ -680,7 +680,7 @@ export default class PostList extends React.PureComponent<Props, State> {
|
||||
data-a11y-focus-child={true}
|
||||
data-a11y-order-reversed={true}
|
||||
data-a11y-loop-navigation={false}
|
||||
aria-label={Utils.localizeMessage('accessibility.sections.centerContent', 'message list main region')}
|
||||
aria-label={Utils.localizeMessage({id: 'accessibility.sections.centerContent', defaultMessage: 'message list main region'})}
|
||||
>
|
||||
{this.props.isMobileView && (
|
||||
<React.Fragment>
|
||||
|
||||
@@ -132,7 +132,7 @@ export default class PostMessageView extends React.PureComponent<Props, State> {
|
||||
let message = post.message;
|
||||
const isEphemeral = isPostEphemeral(post);
|
||||
if (compactDisplay && isEphemeral) {
|
||||
const visibleMessage = Utils.localizeMessage('post_info.message.visible.compact', ' (Only visible to you)');
|
||||
const visibleMessage = Utils.localizeMessage({id: 'post_info.message.visible.compact', defaultMessage: ' (Only visible to you)'});
|
||||
message = message.concat(visibleMessage);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export default class PostReaction extends React.PureComponent<Props, State> {
|
||||
<button
|
||||
data-testid='post-reaction-emoji-icon'
|
||||
id={`${location}_reaction_${postId}`}
|
||||
aria-label={localizeMessage('post_info.tooltip.add_reactions', 'Add Reaction').toLowerCase()}
|
||||
aria-label={localizeMessage({id: 'post_info.tooltip.add_reactions', defaultMessage: 'Add Reaction'}).toLowerCase()}
|
||||
className={classNames('post-menu__item', 'post-menu__item--reactions', {
|
||||
'post-menu__item--active': showEmojiPicker,
|
||||
})}
|
||||
|
||||
@@ -196,9 +196,9 @@ export default class Reaction extends React.PureComponent<Props, State> {
|
||||
const readOnlyClass = (canAddReactions && canRemoveReactions) ? '' : 'Reaction--read-only';
|
||||
|
||||
const emojiNameWithSpaces = this.props.emojiName.replace(/_/g, ' ');
|
||||
let ariaLabelEmoji = `${Utils.localizeMessage('reaction.reactWidth.ariaLabel', 'react with')} ${emojiNameWithSpaces}`;
|
||||
let ariaLabelEmoji = `${Utils.localizeMessage({id: 'reaction.reactWidth.ariaLabel', defaultMessage: 'react with'})} ${emojiNameWithSpaces}`;
|
||||
if (currentUserReacted && canRemoveReactions) {
|
||||
ariaLabelEmoji = `${Utils.localizeMessage('reaction.removeReact.ariaLabel', 'remove reaction')} ${emojiNameWithSpaces}`;
|
||||
ariaLabelEmoji = `${Utils.localizeMessage({id: 'reaction.removeReact.ariaLabel', defaultMessage: 'remove reaction'})} ${emojiNameWithSpaces}`;
|
||||
}
|
||||
|
||||
const emojiIcon = (
|
||||
|
||||
@@ -44,7 +44,7 @@ export const makeGetNamesOfUsers = () => createSelector(
|
||||
}, [] as string[]);
|
||||
|
||||
if (currentUserReacted) {
|
||||
users.unshift(Utils.localizeMessage('reaction.you', 'You'));
|
||||
users.unshift(Utils.localizeMessage({id: 'reaction.you', defaultMessage: 'You'}));
|
||||
}
|
||||
|
||||
return users;
|
||||
|
||||
@@ -174,7 +174,7 @@ export default class ReactionList extends React.PureComponent<Props, State> {
|
||||
placement='top'
|
||||
>
|
||||
<button
|
||||
aria-label={localizeMessage('reaction.add.ariaLabel', 'Add a reaction')}
|
||||
aria-label={localizeMessage({id: 'reaction.add.ariaLabel', defaultMessage: 'Add a reaction'})}
|
||||
className='Reaction'
|
||||
onClick={this.toggleEmojiPicker}
|
||||
>
|
||||
@@ -199,7 +199,7 @@ export default class ReactionList extends React.PureComponent<Props, State> {
|
||||
|
||||
return (
|
||||
<div
|
||||
aria-label={localizeMessage('reaction.container.ariaLabel', 'reactions')}
|
||||
aria-label={localizeMessage({id: 'reaction.container.ariaLabel', defaultMessage: 'reactions'})}
|
||||
className='post-reaction-list'
|
||||
>
|
||||
{reactions}
|
||||
|
||||
@@ -132,10 +132,10 @@ export default class ShowMore extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
let showIcon = 'fa fa-angle-up';
|
||||
let showText = localizeMessage('post_info.message.show_less', 'Show less');
|
||||
let showText = localizeMessage({id: 'post_info.message.show_less', defaultMessage: 'Show less'});
|
||||
if (isCollapsed) {
|
||||
showIcon = 'fa fa-angle-down';
|
||||
showText = localizeMessage('post_info.message.show_more', 'Show more');
|
||||
showText = localizeMessage({id: 'post_info.message.show_more', defaultMessage: 'Show more'});
|
||||
}
|
||||
switch (overflowType) {
|
||||
case 'ellipsis':
|
||||
|
||||
@@ -232,7 +232,7 @@ export default class QuickSwitchModal extends React.PureComponent<Props, State>
|
||||
// @ts-ignore
|
||||
ref={this.setSwitchBoxRef}
|
||||
id='quickSwitchInput'
|
||||
aria-label={Utils.localizeMessage('quick_switch_modal.input', 'quick switch input')}
|
||||
aria-label={Utils.localizeMessage({id: 'quick_switch_modal.input', defaultMessage: 'quick switch input'})}
|
||||
className='form-control focused'
|
||||
onChange={this.onChange}
|
||||
value={this.state.text}
|
||||
|
||||
@@ -263,7 +263,7 @@ const SearchResults: React.FC<Props> = (props: Props): JSX.Element => {
|
||||
contentItems = (
|
||||
<div className='sidebar--right__subheader a11y__section'>
|
||||
<div className='sidebar--right__loading'>
|
||||
<LoadingSpinner text={Utils.localizeMessage('search_header.loading', 'Searching')}/>
|
||||
<LoadingSpinner text={Utils.localizeMessage({id: 'search_header.loading', defaultMessage: 'Searching'})}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -142,7 +142,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
const membershipIndicator = this.isMemberOfChannel(channel.id) ? (
|
||||
<div
|
||||
id='membershipIndicatorContainer'
|
||||
aria-label={localizeMessage('more_channels.membership_indicator', 'Membership Indicator: Joined')}
|
||||
aria-label={localizeMessage({id: 'more_channels.membership_indicator', defaultMessage: 'Membership Indicator: Joined'})}
|
||||
>
|
||||
<CheckIcon size={14}/>
|
||||
<FormattedMessage
|
||||
@@ -153,8 +153,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
) : null;
|
||||
|
||||
const channelPurposeContainerAriaLabel = localizeAndFormatMessage(
|
||||
messages.channelPurpose.id,
|
||||
messages.channelPurpose.defaultMessage,
|
||||
messages.channelPurpose,
|
||||
{memberCount, channelPurpose: channel.purpose || ''},
|
||||
);
|
||||
|
||||
@@ -184,11 +183,11 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
className={joinViewChannelButtonClass}
|
||||
disabled={Boolean(this.state.joiningChannel)}
|
||||
tabIndex={-1}
|
||||
aria-label={this.isMemberOfChannel(channel.id) ? localizeMessage('more_channels.view', 'View') : localizeMessage('joinChannel.JoinButton', 'Join')}
|
||||
aria-label={this.isMemberOfChannel(channel.id) ? localizeMessage({id: 'more_channels.view', defaultMessage: 'View'}) : localizeMessage({id: 'joinChannel.JoinButton', defaultMessage: 'Join'})}
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={this.state.joiningChannel === channel.id}
|
||||
text={localizeMessage('joinChannel.joiningButton', 'Joining...')}
|
||||
text={localizeMessage({id: 'joinChannel.joiningButton', defaultMessage: 'Joining...'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id={this.isMemberOfChannel(channel.id) ? 'more_channels.view' : 'joinChannel.JoinButton'}
|
||||
@@ -357,7 +356,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
listContent = (
|
||||
<div
|
||||
className='no-channel-message'
|
||||
aria-label={this.state.channelSearchValue.length > 0 ? localizeAndFormatMessage(messages.noMore.id, messages.noMore.defaultMessage, {text: this.state.channelSearchValue}) : localizeMessage('widgets.channels_input.empty', 'No channels found')
|
||||
aria-label={this.state.channelSearchValue.length > 0 ? localizeAndFormatMessage(messages.noMore, {text: this.state.channelSearchValue}) : localizeMessage({id: 'widgets.channels_input.empty', defaultMessage: 'No channels found'})
|
||||
}
|
||||
>
|
||||
<MagnifyingGlassSVG/>
|
||||
@@ -379,7 +378,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
className='btn btn-sm btn-tertiary filter-control filter-control__next'
|
||||
onClick={this.nextPage}
|
||||
disabled={this.state.nextDisabled}
|
||||
aria-label={localizeMessage('more_channels.next', 'Next')}
|
||||
aria-label={localizeMessage({id: 'more_channels.next', defaultMessage: 'Next'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='more_channels.next'
|
||||
@@ -394,7 +393,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
<button
|
||||
className='btn btn-sm btn-tertiary filter-control filter-control__prev'
|
||||
onClick={this.previousPage}
|
||||
aria-label={localizeMessage('more_channels.prev', 'Previous')}
|
||||
aria-label={localizeMessage({id: 'more_channels.prev', defaultMessage: 'Previous'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='more_channels.prev'
|
||||
@@ -422,7 +421,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
clearable={true}
|
||||
onClear={this.handleClear}
|
||||
value={this.state.channelSearchValue}
|
||||
aria-label={localizeMessage('filtered_channels_list.search', 'Search Channels')}
|
||||
aria-label={localizeMessage({id: 'filtered_channels_list.search', defaultMessage: 'Search Channels'})}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -446,7 +445,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
}
|
||||
trailingElements={this.props.filter === Filter.All ? checkIcon : null}
|
||||
aria-label={localizeMessage('suggestion.all', 'All channel types')}
|
||||
aria-label={localizeMessage({id: 'suggestion.all', defaultMessage: 'All channel types'})}
|
||||
/>,
|
||||
<Menu.Item
|
||||
key='channelsMoreDropdownPublic'
|
||||
@@ -460,7 +459,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
}
|
||||
trailingElements={this.props.filter === Filter.Public ? checkIcon : null}
|
||||
aria-label={localizeMessage('suggestion.public', 'Public channels')}
|
||||
aria-label={localizeMessage({id: 'suggestion.public', defaultMessage: 'Public channels'})}
|
||||
/>,
|
||||
<Menu.Item
|
||||
key='channelsMoreDropdownPrivate'
|
||||
@@ -474,7 +473,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
}
|
||||
trailingElements={this.props.filter === Filter.Private ? checkIcon : null}
|
||||
aria-label={localizeMessage('suggestion.private', 'Private channels')}
|
||||
aria-label={localizeMessage({id: 'suggestion.private', defaultMessage: 'Private channels'})}
|
||||
/>,
|
||||
];
|
||||
|
||||
@@ -493,7 +492,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
}
|
||||
trailingElements={this.props.filter === Filter.Archived ? checkIcon : null}
|
||||
aria-label={localizeMessage('suggestion.archive', 'Archived channels')}
|
||||
aria-label={localizeMessage({id: 'suggestion.archive', defaultMessage: 'Archived channels'})}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
@@ -514,7 +513,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
}}
|
||||
menu={{
|
||||
id: 'browseChannelsDropdown',
|
||||
'aria-label': localizeMessage('more_channels.title', 'Browse channels'),
|
||||
'aria-label': localizeMessage({id: 'more_channels.title', defaultMessage: 'Browse channels'}),
|
||||
}}
|
||||
>
|
||||
{channelDropdownItems.map((item) => item)}
|
||||
@@ -529,7 +528,7 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
>
|
||||
<button
|
||||
className={hideJoinedButtonClass}
|
||||
aria-label={this.props.rememberHideJoinedChannelsChecked ? localizeMessage('more_channels.hide_joined_checked', 'Hide joined channels checkbox, checked') : localizeMessage('more_channels.hide_joined_not_checked', 'Hide joined channels checkbox, not checked')}
|
||||
aria-label={this.props.rememberHideJoinedChannelsChecked ? localizeMessage({id: 'more_channels.hide_joined_checked', defaultMessage: 'Hide joined channels checkbox, checked'}) : localizeMessage({id: 'more_channels.hide_joined_not_checked', defaultMessage: 'Hide joined channels checkbox, not checked'})}
|
||||
>
|
||||
{this.props.rememberHideJoinedChannelsChecked ? <CheckboxCheckedIcon/> : null}
|
||||
</button>
|
||||
@@ -542,13 +541,13 @@ export class SearchableChannelList extends React.PureComponent<Props, State> {
|
||||
|
||||
let channelCountLabel;
|
||||
if (channels.length === 0) {
|
||||
channelCountLabel = localizeMessage('more_channels.count_zero', '0 Results');
|
||||
channelCountLabel = localizeMessage({id: 'more_channels.count_zero', defaultMessage: '0 Results'});
|
||||
} else if (channels.length === 1) {
|
||||
channelCountLabel = localizeMessage('more_channels.count_one', '1 Result');
|
||||
channelCountLabel = localizeMessage({id: 'more_channels.count_one', defaultMessage: '1 Result'});
|
||||
} else if (channels.length > 1) {
|
||||
channelCountLabel = localizeAndFormatMessage(messages.channelCount.id, messages.channelCount.defaultMessage, {count: channels.length});
|
||||
channelCountLabel = localizeAndFormatMessage(messages.channelCount, {count: channels.length});
|
||||
} else {
|
||||
channelCountLabel = localizeMessage('more_channels.count_zero', '0 Results');
|
||||
channelCountLabel = localizeMessage({id: 'more_channels.count_zero', defaultMessage: '0 Results'});
|
||||
}
|
||||
|
||||
const dropDownContainer = (
|
||||
|
||||
@@ -296,7 +296,7 @@ export default class SettingPicture extends Component<Props, State> {
|
||||
className='btn btn-primary btn-file'
|
||||
disabled={this.props.loadingPicture}
|
||||
onClick={this.handleInputFile}
|
||||
aria-label={localizeMessage('setting_picture.select', 'Select')}
|
||||
aria-label={localizeMessage({id: 'setting_picture.select', defaultMessage: 'Select'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='setting_picture.select'
|
||||
@@ -310,11 +310,11 @@ export default class SettingPicture extends Component<Props, State> {
|
||||
ref={this.confirmButton}
|
||||
className={confirmButtonClass}
|
||||
onClick={this.handleSave}
|
||||
aria-label={this.props.loadingPicture ? localizeMessage('setting_picture.uploading', 'Uploading...') : localizeMessage('setting_picture.save', 'Save')}
|
||||
aria-label={this.props.loadingPicture ? localizeMessage({id: 'setting_picture.uploading', defaultMessage: 'Uploading...'}) : localizeMessage({id: 'setting_picture.save', defaultMessage: 'Save'})}
|
||||
>
|
||||
<LoadingWrapper
|
||||
loading={this.props.loadingPicture}
|
||||
text={localizeMessage('setting_picture.uploading', 'Uploading...')}
|
||||
text={localizeMessage({id: 'setting_picture.uploading', defaultMessage: 'Uploading...'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='setting_picture.save'
|
||||
@@ -358,7 +358,7 @@ export default class SettingPicture extends Component<Props, State> {
|
||||
data-testid='cancelSettingPicture'
|
||||
className='btn btn-tertiary theme ml-2'
|
||||
onClick={this.handleCancel}
|
||||
aria-label={localizeMessage('setting_picture.cancel', 'Cancel')}
|
||||
aria-label={localizeMessage({id: 'setting_picture.cancel', defaultMessage: 'Cancel'})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='setting_picture.cancel'
|
||||
|
||||
@@ -92,7 +92,7 @@ export default class ChannelNavigator extends React.PureComponent<Props> {
|
||||
<button
|
||||
className={'SidebarChannelNavigator_jumpToButton'}
|
||||
onClick={this.openQuickSwitcher}
|
||||
aria-label={Utils.localizeMessage('sidebar_left.channel_navigator.channelSwitcherLabel', 'Channel Switcher')}
|
||||
aria-label={Utils.localizeMessage({id: 'sidebar_left.channel_navigator.channelSwitcherLabel', defaultMessage: 'Channel Switcher'})}
|
||||
aria-haspopup='dialog'
|
||||
data-testid='SidebarChannelNavigatorButton'
|
||||
>
|
||||
|
||||
@@ -227,7 +227,7 @@ export default class Sidebar extends React.PureComponent<Props, State> {
|
||||
return (<div/>);
|
||||
}
|
||||
|
||||
const ariaLabel = localizeMessage('accessibility.sections.lhsNavigator', 'channel navigator region');
|
||||
const ariaLabel = localizeMessage({id: 'accessibility.sections.lhsNavigator', defaultMessage: 'channel navigator region'});
|
||||
|
||||
return (
|
||||
<ResizableLhs
|
||||
|
||||
@@ -267,7 +267,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
||||
|
||||
categoryMenu = <SidebarCategoryMenu category={category}/>;
|
||||
} else if (category.type === CategoryTypes.DIRECT_MESSAGES) {
|
||||
const addHelpLabel = localizeMessage('sidebar.createDirectMessage', 'Create new direct message');
|
||||
const addHelpLabel = localizeMessage({id: 'sidebar.createDirectMessage', defaultMessage: 'Create new direct message'});
|
||||
|
||||
categoryMenu = (
|
||||
<React.Fragment>
|
||||
@@ -310,7 +310,7 @@ export default class SidebarCategory extends React.PureComponent<Props, State> {
|
||||
let displayName = category.display_name;
|
||||
if (category.type !== CategoryTypes.CUSTOM) {
|
||||
const message = categoryNames[category.type as keyof typeof categoryNames];
|
||||
displayName = localizeMessage(message.id, message.defaultMessage);
|
||||
displayName = localizeMessage({id: message.id, defaultMessage: message.defaultMessage});
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -119,13 +119,13 @@ export default class SidebarChannelLink extends React.PureComponent<Props, State
|
||||
}
|
||||
|
||||
if (unreadMentions === 1) {
|
||||
ariaLabel += ` ${unreadMentions} ${localizeMessage('accessibility.sidebar.types.mention', 'mention')}`;
|
||||
ariaLabel += ` ${unreadMentions} ${localizeMessage({id: 'accessibility.sidebar.types.mention', defaultMessage: 'mention'})}`;
|
||||
} else if (unreadMentions > 1) {
|
||||
ariaLabel += ` ${unreadMentions} ${localizeMessage('accessibility.sidebar.types.mentions', 'mentions')}`;
|
||||
ariaLabel += ` ${unreadMentions} ${localizeMessage({id: 'accessibility.sidebar.types.mentions', defaultMessage: 'mentions'})}`;
|
||||
}
|
||||
|
||||
if (this.props.isUnread && unreadMentions === 0) {
|
||||
ariaLabel += ` ${localizeMessage('accessibility.sidebar.types.unread', 'unread')}`;
|
||||
ariaLabel += ` ${localizeMessage({id: 'accessibility.sidebar.types.unread', defaultMessage: 'unread'})}`;
|
||||
}
|
||||
|
||||
return ariaLabel.toLowerCase();
|
||||
|
||||
@@ -547,7 +547,7 @@ export default class SidebarList extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
);
|
||||
|
||||
const ariaLabel = localizeMessage('accessibility.sections.lhsList', 'channel sidebar region');
|
||||
const ariaLabel = localizeMessage({id: 'accessibility.sections.lhsList', defaultMessage: 'channel sidebar region'});
|
||||
|
||||
return (
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
||||
Reflect.deleteProperty(props, 'hideUtilities');
|
||||
Reflect.deleteProperty(props, 'getFilePublicLink');
|
||||
|
||||
let ariaLabelImage = localizeMessage('file_attachment.thumbnail', 'file thumbnail');
|
||||
let ariaLabelImage = localizeMessage({id: 'file_attachment.thumbnail', defaultMessage: 'file thumbnail'});
|
||||
if (fileInfo) {
|
||||
ariaLabelImage += ` ${fileInfo.name}`.toLowerCase();
|
||||
}
|
||||
@@ -256,7 +256,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
||||
className={classNames('style--none', 'size-aware-image__copy_link', {
|
||||
'size-aware-image__copy_link--recently_copied': this.state.linkCopiedRecently,
|
||||
})}
|
||||
aria-label={localizeMessage('single_image_view.copy_link_tooltip', 'Copy link')}
|
||||
aria-label={localizeMessage({id: 'single_image_view.copy_link_tooltip', defaultMessage: 'Copy link'})}
|
||||
onClick={this.copyLinkToAsset}
|
||||
>
|
||||
{this.state.linkCopiedRecently ? (
|
||||
@@ -293,7 +293,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
||||
className='style--none size-aware-image__download'
|
||||
download={true}
|
||||
role={this.isInternalImage ? 'button' : undefined}
|
||||
aria-label={localizeMessage('single_image_view.download_tooltip', 'Download')}
|
||||
aria-label={localizeMessage({id: 'single_image_view.download_tooltip', defaultMessage: 'Download'})}
|
||||
>
|
||||
<DownloadOutlineIcon
|
||||
className={'style--none'}
|
||||
@@ -383,7 +383,7 @@ export default class SizeAwareImage extends React.PureComponent<Props, State> {
|
||||
fileInfo,
|
||||
} = this.props;
|
||||
|
||||
let ariaLabelImage = localizeMessage('file_attachment.thumbnail', 'file thumbnail');
|
||||
let ariaLabelImage = localizeMessage({id: 'file_attachment.thumbnail', defaultMessage: 'file thumbnail'});
|
||||
if (fileInfo) {
|
||||
ariaLabelImage += ` ${fileInfo.name}`.toLowerCase();
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ describe('AppCommandParser', () => {
|
||||
};
|
||||
|
||||
const intl = {
|
||||
formatMessage: (message: {id: string; defaultMessage: string}) => {
|
||||
return message.defaultMessage;
|
||||
formatMessage: (message: {id: string; defaultMessage?: string}) => {
|
||||
return message.defaultMessage ?? '';
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ import type {
|
||||
AutocompleteSuggestion,
|
||||
AutocompleteStaticSelect,
|
||||
Channel,
|
||||
ExtendedAutocompleteSuggestion} from './app_command_parser_dependencies';
|
||||
ExtendedAutocompleteSuggestion,
|
||||
intlShim} from './app_command_parser_dependencies';
|
||||
|
||||
export enum ParseState {
|
||||
Start = 'Start',
|
||||
@@ -95,9 +96,7 @@ interface FormsCache {
|
||||
getSubmittableForm: (location: string, binding: AppBinding) => Promise<{form?: AppForm; error?: string} | undefined>;
|
||||
}
|
||||
|
||||
interface Intl {
|
||||
formatMessage(config: {id: string; defaultMessage: string}, values?: {[name: string]: any}): string;
|
||||
}
|
||||
type Intl = typeof intlShim;
|
||||
|
||||
const getCommandBindings = makeAppBindingsSelector(AppBindingLocations.COMMAND);
|
||||
const getRHSCommandBindings = makeRHSAppBindingSelector(AppBindingLocations.COMMAND);
|
||||
|
||||
@@ -115,8 +115,8 @@ export const displayError = (err: string, channelID: string, rootID?: string) =>
|
||||
|
||||
// Shim of mobile-version intl
|
||||
export const intlShim = {
|
||||
formatMessage: (config: {id: string; defaultMessage: string}, values?: {[name: string]: any}) => {
|
||||
return localizeAndFormatMessage(config.id, config.defaultMessage, values);
|
||||
formatMessage: (config: {id: string; defaultMessage?: string}, values?: {[name: string]: any}) => {
|
||||
return localizeAndFormatMessage(config, values);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ const SwitchChannelSuggestion = React.forwardRef<HTMLDivElement, Props>((props,
|
||||
|
||||
let deactivated = '';
|
||||
if (teammate.delete_at) {
|
||||
deactivated = (' - ' + Utils.localizeMessage('channel_switch_modal.deactivated', 'Deactivated'));
|
||||
deactivated = (' - ' + Utils.localizeMessage({id: 'channel_switch_modal.deactivated', defaultMessage: 'Deactivated'}));
|
||||
}
|
||||
|
||||
if (channel.display_name && !(teammate && teammate.is_bot)) {
|
||||
@@ -228,7 +228,7 @@ const SwitchChannelSuggestion = React.forwardRef<HTMLDivElement, Props>((props,
|
||||
} else {
|
||||
name = teammate.username;
|
||||
if (teammate.id === currentUserId) {
|
||||
name += (' ' + Utils.localizeMessage('suggestion.user.isCurrent', '(you)'));
|
||||
name += (' ' + Utils.localizeMessage({id: 'suggestion.user.isCurrent', defaultMessage: '(you)'}));
|
||||
}
|
||||
description = deactivated;
|
||||
}
|
||||
@@ -545,7 +545,7 @@ export default class SwitchChannelProvider extends Provider {
|
||||
}
|
||||
|
||||
if (user.id === currentUserId && displayName) {
|
||||
displayName += (' ' + Utils.localizeMessage('suggestion.user.isCurrent', '(you)'));
|
||||
displayName += (' ' + Utils.localizeMessage({id: 'suggestion.user.isCurrent', defaultMessage: '(you)'}));
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -111,9 +111,9 @@ class TeamGroupsManageModal extends React.PureComponent<Props, State> {
|
||||
renderRow = (item: Group, listModal: ListModal) => {
|
||||
let title;
|
||||
if (item.scheme_admin) {
|
||||
title = Utils.localizeMessage('team_members_dropdown.teamAdmins', 'Team Admins');
|
||||
title = Utils.localizeMessage({id: 'team_members_dropdown.teamAdmins', defaultMessage: 'Team Admins'});
|
||||
} else {
|
||||
title = Utils.localizeMessage('team_members_dropdown.teamMembers', 'Team Members');
|
||||
title = Utils.localizeMessage({id: 'team_members_dropdown.teamMembers', defaultMessage: 'Team Members'});
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -154,21 +154,21 @@ class TeamGroupsManageModal extends React.PureComponent<Props, State> {
|
||||
</button>
|
||||
<Menu
|
||||
openLeft={true}
|
||||
ariaLabel={Utils.localizeMessage('team_members_dropdown.menuAriaLabel', 'Change the role of a team member')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'team_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of a team member'})}
|
||||
>
|
||||
<Menu.ItemAction
|
||||
show={!item.scheme_admin}
|
||||
onClick={() => this.setTeamMemberStatus(item, listModal, true)}
|
||||
text={Utils.localizeMessage('team_members_dropdown.makeTeamAdmins', 'Make Team Admins')}
|
||||
text={Utils.localizeMessage({id: 'team_members_dropdown.makeTeamAdmins', defaultMessage: 'Make Team Admins'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
show={Boolean(item.scheme_admin)}
|
||||
onClick={() => this.setTeamMemberStatus(item, listModal, false)}
|
||||
text={Utils.localizeMessage('team_members_dropdown.makeTeamMembers', 'Make Team Members')}
|
||||
text={Utils.localizeMessage({id: 'team_members_dropdown.makeTeamMembers', defaultMessage: 'Make Team Members'})}
|
||||
/>
|
||||
<Menu.ItemAction
|
||||
onClick={() => this.onClickRemoveGroup(item, listModal)}
|
||||
text={Utils.localizeMessage('group_list_modal.removeGroupButton', 'Remove Group')}
|
||||
text={Utils.localizeMessage({id: 'group_list_modal.removeGroupButton', defaultMessage: 'Remove Group'})}
|
||||
/>
|
||||
</Menu>
|
||||
</MenuWrapper>
|
||||
|
||||
@@ -253,19 +253,19 @@ export default class TeamMembersDropdown extends React.PureComponent<Props, Stat
|
||||
<Menu.ItemAction
|
||||
id='removeFromTeam'
|
||||
onClick={this.handleRemoveFromTeam}
|
||||
text={Utils.localizeMessage('team_members_dropdown.leave_team', 'Remove From Team')}
|
||||
text={Utils.localizeMessage({id: 'team_members_dropdown.leave_team', defaultMessage: 'Remove From Team'})}
|
||||
/>
|
||||
);
|
||||
const menuMakeAdmin = (
|
||||
<Menu.ItemAction
|
||||
onClick={this.handleMakeAdmin}
|
||||
text={Utils.localizeMessage('team_members_dropdown.makeAdmin', 'Make Team Admin')}
|
||||
text={Utils.localizeMessage({id: 'team_members_dropdown.makeAdmin', defaultMessage: 'Make Team Admin'})}
|
||||
/>
|
||||
);
|
||||
const menuMakeMember = (
|
||||
<Menu.ItemAction
|
||||
onClick={this.handleMakeMember}
|
||||
text={Utils.localizeMessage('team_members_dropdown.makeMember', 'Make Member')}
|
||||
text={Utils.localizeMessage({id: 'team_members_dropdown.makeMember', defaultMessage: 'Make Member'})}
|
||||
/>
|
||||
);
|
||||
return (
|
||||
@@ -283,7 +283,7 @@ export default class TeamMembersDropdown extends React.PureComponent<Props, Stat
|
||||
<Menu
|
||||
openLeft={true}
|
||||
openUp={openUp}
|
||||
ariaLabel={Utils.localizeMessage('team_members_dropdown.menuAriaLabel', 'Change the role of a team member')}
|
||||
ariaLabel={Utils.localizeMessage({id: 'team_members_dropdown.menuAriaLabel', defaultMessage: 'Change the role of a team member'})}
|
||||
>
|
||||
{canRemoveFromTeam ? menuRemove : null}
|
||||
{showMakeAdmin ? menuMakeAdmin : null}
|
||||
|
||||
@@ -243,7 +243,7 @@ export class TeamSelectorModal extends React.PureComponent<Props, State> {
|
||||
/>
|
||||
);
|
||||
|
||||
const buttonSubmitText = localizeMessage('multiselect.add', 'Add');
|
||||
const buttonSubmitText = localizeMessage({id: 'multiselect.add', defaultMessage: 'Add'});
|
||||
|
||||
let teams = [] as Team[];
|
||||
if (this.props.teams) {
|
||||
@@ -313,7 +313,7 @@ export class TeamSelectorModal extends React.PureComponent<Props, State> {
|
||||
buttonSubmitText={buttonSubmitText}
|
||||
saving={false}
|
||||
loading={this.state.loadingTeams}
|
||||
placeholderText={localizeMessage('multiselect.addTeamsPlaceholder', 'Search and add teams')}
|
||||
placeholderText={localizeMessage({id: 'multiselect.addTeamsPlaceholder', defaultMessage: 'Search and add teams'})}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
|
||||
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Ссылка в новой задаче
Block a user