From e8ebbcc980f4ffee126a6ee18333ce1cd9707a2f Mon Sep 17 00:00:00 2001
From: Ivy Gesare <83957195+Gesare5@users.noreply.github.com>
Date: Fri, 11 Oct 2024 12:21:05 +0300
Subject: [PATCH] [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 tag with react-router-dom Link component
---------
Co-authored-by: Mattermost Build
---
.../backstage/components/backstage_list.tsx | 2 +-
.../src/components/integrations/bots/bots.tsx | 20 ++++++++++---------
webapp/channels/src/i18n/en.json | 4 ++--
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/webapp/channels/src/components/backstage/components/backstage_list.tsx b/webapp/channels/src/components/backstage/components/backstage_list.tsx
index 018eae5869..7cd928ab07 100644
--- a/webapp/channels/src/components/backstage/components/backstage_list.tsx
+++ b/webapp/channels/src/components/backstage/components/backstage_list.tsx
@@ -95,7 +95,7 @@ const BackstageList = ({searchPlaceholder = localizeMessage({id: 'backstage_list
id='emptySearchResultsMessage'
key='emptyTextSearch'
>
- {React.cloneElement(remainingProps.emptyTextSearch, {values: {searchTerm: filterLowered}})}
+ {React.cloneElement(remainingProps.emptyTextSearch, {values: {...remainingProps.emptyTextSearch.props.values, searchTerm: filterLowered}})}
)];
}
diff --git a/webapp/channels/src/components/integrations/bots/bots.tsx b/webapp/channels/src/components/integrations/bots/bots.tsx
index a3ec2cc6b4..9a8fb4df2f 100644
--- a/webapp/channels/src/components/integrations/bots/bots.tsx
+++ b/webapp/channels/src/components/integrations/bots/bots.tsx
@@ -3,6 +3,7 @@
import React from 'react';
import {FormattedMessage} from 'react-intl';
+import {Link} from 'react-router-dom';
import type {Bot as BotType} from '@mattermost/types/bots';
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 ExternalLink from 'components/external_link';
-import FormattedMarkdownMessage from 'components/formatted_markdown_message';
import Constants from 'utils/constants';
-import {getSiteURL} from 'utils/url';
import * as Utils from 'utils/utils';
import Bot, {matchesFilter} from './bot';
@@ -236,9 +235,12 @@ export default class Bots extends React.PureComponent {
/>
}
emptyTextSearch={
- {chunks},
+ }}
/>
}
helpText={
@@ -260,11 +262,11 @@ export default class Bots extends React.PureComponent {
),
}}
/>
- System Console.'}
values={{
- siteURL: getSiteURL(),
+ a: (chunks: string) => {chunks},
}}
/>
diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json
index 6205a7b787..21459aa749 100644
--- a/webapp/channels/src/i18n/en.json
+++ b/webapp/channels/src/i18n/en.json
@@ -3080,6 +3080,8 @@
"bots.add.icon": "Bot Icon",
"bots.add.username": "Username",
"bots.disabled": "Disabled",
+ "bots.emptySearch": "No bot accounts match {searchTerm}",
+ "bots.help2": "Enable bot account creation in the System Console.",
"bots.image.upload": "Upload Image",
"bots.manage.add": "Add Bot Account",
"bots.manage.add.add": "Add",
@@ -3095,10 +3097,8 @@
"bots.manage.edit.editing": "Updating...",
"bots.manage.edit.title": "Update",
"bots.manage.empty": "No bot accounts found",
- "bots.manage.emptySearch": "No bot accounts match **{searchTerm}**",
"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.help2": "Enable bot account creation in the [System Console]({siteURL}/admin_console/integrations/bot_accounts).",
"bots.manage.search": "Search Bot Accounts",
"bots.managed_by": "Managed by ",
"bots.token.confirm": "Delete",