[MM-60832] Replace FormattedMarkdownMessage in 'webapp/channels/src/components/admin_console/custom_terms_of_service_settings/custom_terms_of_service_settings.tsx' with FormattedMessage (#28690)

Этот коммит содержится в:
Niharika Goulikar
2024-10-20 23:37:08 +05:30
коммит произвёл GitHub
родитель afbdfd9281
Коммит 6939623e11
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@@ -3,6 +3,7 @@
import React from 'react';
import {FormattedMessage, defineMessages} from 'react-intl';
import {Link} from 'react-router-dom';
import type {AdminConfig, ClientLicense} from '@mattermost/types/config';
import type {TermsOfService} from '@mattermost/types/terms_of_service';
@@ -14,7 +15,6 @@ import type {BaseProps, BaseState} from 'components/admin_console/admin_settings
import BooleanSetting from 'components/admin_console/boolean_setting';
import SettingsGroup from 'components/admin_console/settings_group';
import TextSetting from 'components/admin_console/text_setting';
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
import LoadingScreen from 'components/loading_screen';
import {Constants} from 'utils/constants';
@@ -53,7 +53,7 @@ export const messages = defineMessages({
termsOfServiceTextHelp: {id: 'admin.support.termsOfServiceTextHelp', defaultMessage: 'Text that will appear in your custom Terms of Service. Supports Markdown-formatted text.'},
termsOfServiceReAcceptanceTitle: {id: 'admin.support.termsOfServiceReAcceptanceTitle', defaultMessage: 'Re-Acceptance Period:'},
termsOfServiceReAcceptanceHelp: {id: 'admin.support.termsOfServiceReAcceptanceHelp', defaultMessage: 'The number of days before Terms of Service acceptance expires, and the terms must be re-accepted.'},
enableTermsOfServiceHelp: {id: 'admin.support.enableTermsOfServiceHelp', defaultMessage: 'When true, new users must accept the terms of service before accessing any Mattermost teams on desktop, web or mobile. Existing users must accept them after login or a page refresh. To update terms of service link displayed in account creation and login pages, go to [Site Configuration > Customization](../site_config/customization).'},
enableTermsOfServiceHelp: {id: 'admin.support.enableTermsOfServiceHelp', defaultMessage: 'When true, new users must accept the terms of service before accessing any Mattermost teams on desktop, web or mobile. Existing users must accept them after login or a page refresh. To update terms of service link displayed in account creation and login pages, go to <a>Site Configuration > Customization</a>'},
});
export const searchableStrings = [
@@ -201,7 +201,14 @@ export default class CustomTermsOfServiceSettings extends AdminSettings<Props, S
key={'customTermsOfServiceEnabled'}
id={'SupportSettings.CustomTermsOfServiceEnabled'}
label={<FormattedMessage {...messages.enableTermsOfServiceTitle}/>}
helpText={<FormattedMarkdownMessage {...messages.enableTermsOfServiceHelp}/>}
helpText={
<FormattedMessage
{...messages.enableTermsOfServiceHelp}
values={{
a: (chunks: string) => <Link to='/admin_console/site_config/customization'>{chunks}</Link>,
}}
/>
}
value={Boolean(this.state.termsEnabled)}
onChange={this.handleTermsEnabledChange}
setByEnv={this.isSetByEnv('SupportSettings.CustomTermsOfServiceEnabled')}

Просмотреть файл

@@ -2504,7 +2504,7 @@
"admin.support.aboutTitle": "About Link:",
"admin.support.enableAskCommunityDesc": "When true, \"Ask the community\" link appears on the Mattermost user interface and Help Menu, which allows users to join the Mattermost Community to ask questions and help others troubleshoot issues. When false, the link is hidden from users.",
"admin.support.enableAskCommunityTitle": "Enable Ask Community Link:",
"admin.support.enableTermsOfServiceHelp": "When true, new users must accept the terms of service before accessing any Mattermost teams on desktop, web or mobile. Existing users must accept them after login or a page refresh.\n \nTo update terms of service link displayed in account creation and login pages, go to [Site Configuration > Customization](../site_config/customization).",
"admin.support.enableTermsOfServiceHelp": "When true, new users must accept the terms of service before accessing any Mattermost teams on desktop, web or mobile. Existing users must accept them after login or a page refresh. To update terms of service link displayed in account creation and login pages, go to <a>Site Configuration > Customization</a>",
"admin.support.enableTermsOfServiceTitle": "Enable Custom Terms of Service:",
"admin.support.forgotPasswordDesc": "The URL for the Forgot Password link on the Mattermost login page. If this field is empty the Forgot Password link takes users to the Password Reset page.",
"admin.support.forgotPasswordTitle": "Forgot Password Custom Link:",