mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-60819] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/integrations/bots/bots.tsx' with FormattedMessage (#28577)
* Change: Replace FormattedMarkdownMessage with FormattedMessage in bots.tsx Change: Update en.json Change: Update BackstageList component * Change: Replace <a> tag with react-router-dom Link component --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
bd1743192d
commit
e8ebbcc980
@ -95,7 +95,7 @@ const BackstageList = ({searchPlaceholder = localizeMessage({id: 'backstage_list
|
|||||||
id='emptySearchResultsMessage'
|
id='emptySearchResultsMessage'
|
||||||
key='emptyTextSearch'
|
key='emptyTextSearch'
|
||||||
>
|
>
|
||||||
{React.cloneElement(remainingProps.emptyTextSearch, {values: {searchTerm: filterLowered}})}
|
{React.cloneElement(remainingProps.emptyTextSearch, {values: {...remainingProps.emptyTextSearch.props.values, searchTerm: filterLowered}})}
|
||||||
</div>
|
</div>
|
||||||
)];
|
)];
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
import {Link} from 'react-router-dom';
|
||||||
|
|
||||||
import type {Bot as BotType} from '@mattermost/types/bots';
|
import type {Bot as BotType} from '@mattermost/types/bots';
|
||||||
import type {Team} from '@mattermost/types/teams';
|
import type {Team} from '@mattermost/types/teams';
|
||||||
@ -13,10 +14,8 @@ import type {ActionResult} from 'mattermost-redux/types/actions';
|
|||||||
|
|
||||||
import BackstageList from 'components/backstage/components/backstage_list';
|
import BackstageList from 'components/backstage/components/backstage_list';
|
||||||
import ExternalLink from 'components/external_link';
|
import ExternalLink from 'components/external_link';
|
||||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
|
||||||
|
|
||||||
import Constants from 'utils/constants';
|
import Constants from 'utils/constants';
|
||||||
import {getSiteURL} from 'utils/url';
|
|
||||||
import * as Utils from 'utils/utils';
|
import * as Utils from 'utils/utils';
|
||||||
|
|
||||||
import Bot, {matchesFilter} from './bot';
|
import Bot, {matchesFilter} from './bot';
|
||||||
@ -236,9 +235,12 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
emptyTextSearch={
|
emptyTextSearch={
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='bots.manage.emptySearch'
|
id='bots.emptySearch'
|
||||||
defaultMessage='No bot accounts match **{searchTerm}**'
|
defaultMessage='No bot accounts match <b>{searchTerm}</b>'
|
||||||
|
values={{
|
||||||
|
b: (chunks: string) => <b>{chunks}</b>,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
helpText={
|
helpText={
|
||||||
@ -260,11 +262,11 @@ export default class Bots extends React.PureComponent<Props, State> {
|
|||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<FormattedMarkdownMessage
|
<FormattedMessage
|
||||||
id='bots.manage.help2'
|
id='bots.help2'
|
||||||
defaultMessage={'Enable bot account creation in the [System Console]({siteURL}/admin_console/integrations/bot_accounts).'}
|
defaultMessage={'Enable bot account creation in the <a>System Console</a>.'}
|
||||||
values={{
|
values={{
|
||||||
siteURL: getSiteURL(),
|
a: (chunks: string) => <Link to='/admin_console/integrations/bot_accounts'>{chunks}</Link>,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
@ -3080,6 +3080,8 @@
|
|||||||
"bots.add.icon": "Bot Icon",
|
"bots.add.icon": "Bot Icon",
|
||||||
"bots.add.username": "Username",
|
"bots.add.username": "Username",
|
||||||
"bots.disabled": "Disabled",
|
"bots.disabled": "Disabled",
|
||||||
|
"bots.emptySearch": "No bot accounts match <b>{searchTerm}</b>",
|
||||||
|
"bots.help2": "Enable bot account creation in the <a>System Console</a>.",
|
||||||
"bots.image.upload": "Upload Image",
|
"bots.image.upload": "Upload Image",
|
||||||
"bots.manage.add": "Add Bot Account",
|
"bots.manage.add": "Add Bot Account",
|
||||||
"bots.manage.add.add": "Add",
|
"bots.manage.add.add": "Add",
|
||||||
@ -3095,10 +3097,8 @@
|
|||||||
"bots.manage.edit.editing": "Updating...",
|
"bots.manage.edit.editing": "Updating...",
|
||||||
"bots.manage.edit.title": "Update",
|
"bots.manage.edit.title": "Update",
|
||||||
"bots.manage.empty": "No bot accounts found",
|
"bots.manage.empty": "No bot accounts found",
|
||||||
"bots.manage.emptySearch": "No bot accounts match **{searchTerm}**",
|
|
||||||
"bots.manage.header": "Bot Accounts",
|
"bots.manage.header": "Bot Accounts",
|
||||||
"bots.manage.help1": "Use {botAccounts} to integrate with Mattermost through plugins or the API. Bot accounts are available to everyone on your server. ",
|
"bots.manage.help1": "Use {botAccounts} to integrate with Mattermost through plugins or the API. Bot accounts are available to everyone on your server. ",
|
||||||
"bots.manage.help2": "Enable bot account creation in the [System Console]({siteURL}/admin_console/integrations/bot_accounts).",
|
|
||||||
"bots.manage.search": "Search Bot Accounts",
|
"bots.manage.search": "Search Bot Accounts",
|
||||||
"bots.managed_by": "Managed by ",
|
"bots.managed_by": "Managed by ",
|
||||||
"bots.token.confirm": "Delete",
|
"bots.token.confirm": "Delete",
|
||||||
|
Loading…
Reference in New Issue
Block a user