mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-60788] Replace FormattedMarkdownMessage in custom_enable_disable_guest_accounts_setting, delete_channel_modal, signup.tsx & create_comment.tsx (#28438)
This commit is contained in:
parent
7895000ab7
commit
276b56d7a1
@ -47,17 +47,13 @@ exports[`components/AdminConsole/CustomEnableDisableGuestAccountsSetting renders
|
||||
class="help-text"
|
||||
data-testid="MySettinghelp-text"
|
||||
>
|
||||
<span>
|
||||
When true, external guest can be invited to channels within teams. Please see
|
||||
<a
|
||||
href="../user_management/permissions/system_scheme"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Permissions Schemes
|
||||
</a>
|
||||
for which roles can invite guests.
|
||||
</span>
|
||||
When true, external guest can be invited to channels within teams. Please see
|
||||
<a
|
||||
href="/admin_console/user_management/permissions/system_scheme"
|
||||
>
|
||||
Permissions Schemes
|
||||
</a>
|
||||
for which roles can invite guests.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -111,17 +107,13 @@ exports[`components/AdminConsole/CustomEnableDisableGuestAccountsSetting renders
|
||||
class="help-text"
|
||||
data-testid="MySettinghelp-text"
|
||||
>
|
||||
<span>
|
||||
When true, external guest can be invited to channels within teams. Please see
|
||||
<a
|
||||
href="../user_management/permissions/system_scheme"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Permissions Schemes
|
||||
</a>
|
||||
for which roles can invite guests.
|
||||
</span>
|
||||
When true, external guest can be invited to channels within teams. Please see
|
||||
<a
|
||||
href="/admin_console/user_management/permissions/system_scheme"
|
||||
>
|
||||
Permissions Schemes
|
||||
</a>
|
||||
for which roles can invite guests.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
import React, {useCallback} from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import ConfirmModal from 'components/confirm_modal';
|
||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
||||
|
||||
import BooleanSetting from './boolean_setting';
|
||||
|
||||
@ -54,9 +54,12 @@ const CustomEnableDisableGuestAccountsSetting = ({
|
||||
);
|
||||
|
||||
const helpText = (
|
||||
<FormattedMarkdownMessage
|
||||
id='admin.guest_access.enableDescription'
|
||||
defaultMessage='When true, external guest can be invited to channels within teams. Please see [Permissions Schemes](../user_management/permissions/system_scheme) for which roles can invite guests.'
|
||||
<FormattedMessage
|
||||
id='admin.guest_access.helpText'
|
||||
defaultMessage='When true, external guest can be invited to channels within teams. Please see <a>Permissions Schemes</a> for which roles can invite guests.'
|
||||
values={{
|
||||
a: (chunks: string) => <Link to='/admin_console/user_management/permissions/system_scheme'>{chunks}</Link>,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -54,15 +54,24 @@ exports[`components/delete_channel_modal should match snapshot for delete_channe
|
||||
<div
|
||||
className="alert alert-danger"
|
||||
>
|
||||
<FormattedMarkdownMessage
|
||||
defaultMessage="This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again. \\\\n \\\\nAre you sure you wish to archive the {display_name} channel?"
|
||||
id="delete_channel.question"
|
||||
values={
|
||||
Object {
|
||||
"display_name": "testing",
|
||||
<p>
|
||||
<MemoizedFormattedMessage
|
||||
defaultMessage="This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again."
|
||||
id="deleteChannelModal.cannotViewArchivedChannelsWarning"
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<MemoizedFormattedMessage
|
||||
defaultMessage="Are you sure you wish to archive the <strong>{display_name}</strong> channel?"
|
||||
id="deleteChannelModal.confirmArchive"
|
||||
values={
|
||||
Object {
|
||||
"display_name": "testing",
|
||||
"strong": [Function],
|
||||
}
|
||||
}
|
||||
}
|
||||
/>
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
</ModalBody>
|
||||
<ModalFooter
|
||||
|
@ -7,8 +7,6 @@ import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import type {Channel} from '@mattermost/types/channels';
|
||||
|
||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
||||
|
||||
import {getHistory} from 'utils/browser_history';
|
||||
import Constants from 'utils/constants';
|
||||
|
||||
@ -77,21 +75,45 @@ export default class DeleteChannelModal extends React.PureComponent<Props, State
|
||||
<Modal.Body>
|
||||
<div className='alert alert-danger'>
|
||||
{!canViewArchivedChannels &&
|
||||
<FormattedMarkdownMessage
|
||||
id='delete_channel.question'
|
||||
defaultMessage='This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again. \n \nAre you sure you wish to archive the {display_name} channel?'
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
}}
|
||||
/>}
|
||||
<>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='deleteChannelModal.cannotViewArchivedChannelsWarning'
|
||||
defaultMessage='This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again.'
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='deleteChannelModal.confirmArchive'
|
||||
defaultMessage='Are you sure you wish to archive the <strong>{display_name}</strong> channel?'
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
strong: (chunks: string) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</>
|
||||
}
|
||||
{canViewArchivedChannels &&
|
||||
<FormattedMarkdownMessage
|
||||
id='delete_channel.viewArchived.question'
|
||||
defaultMessage={'This will archive the channel from the team. Channel contents will still be accessible by channel members.\n \nAre you sure you wish to archive the **{display_name}** channel?'}
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
}}
|
||||
/>}
|
||||
<>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='deleteChannelModal.canViewArchivedChannelsWarning'
|
||||
defaultMessage='This will archive the channel from the team. Channel contents will still be accessible by channel members.'
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='deleteChannelModal.confirmArchive'
|
||||
defaultMessage='Are you sure you wish to archive the <strong>{display_name}</strong> channel?'
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
strong: (chunks: string) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
|
@ -231,14 +231,14 @@ exports[`components/signup/Signup should match snapshot for all signup options e
|
||||
<p
|
||||
className="signup-body-card-agreement"
|
||||
>
|
||||
<FormattedMarkdownMessage
|
||||
defaultMessage="By proceeding to create your account and use {siteName}, you agree to our [Terms of Use]({TermsOfServiceLink}) and [Privacy Policy]({PrivacyPolicyLink}). If you do not agree, you cannot use {siteName}."
|
||||
id="create_team.agreement"
|
||||
<MemoizedFormattedMessage
|
||||
defaultMessage="By proceeding to create your account and use {siteName}, you agree to our <termsOfUseLink>Terms of Use</termsOfUseLink> and <privacyPolicyLink>Privacy Policy</privacyPolicyLink>. If you do not agree, you cannot use {siteName}."
|
||||
id="signup.agreement"
|
||||
values={
|
||||
Object {
|
||||
"PrivacyPolicyLink": "!undefined",
|
||||
"TermsOfServiceLink": "!undefined",
|
||||
"privacyPolicyLink": [Function],
|
||||
"siteName": "Mattermost",
|
||||
"termsOfUseLink": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
@ -450,14 +450,14 @@ exports[`components/signup/Signup should match snapshot for all signup options e
|
||||
<p
|
||||
className="signup-body-card-agreement"
|
||||
>
|
||||
<FormattedMarkdownMessage
|
||||
defaultMessage="By proceeding to create your account and use {siteName}, you agree to our [Terms of Use]({TermsOfServiceLink}) and [Privacy Policy]({PrivacyPolicyLink}). If you do not agree, you cannot use {siteName}."
|
||||
id="create_team.agreement"
|
||||
<MemoizedFormattedMessage
|
||||
defaultMessage="By proceeding to create your account and use {siteName}, you agree to our <termsOfUseLink>Terms of Use</termsOfUseLink> and <privacyPolicyLink>Privacy Policy</privacyPolicyLink>. If you do not agree, you cannot use {siteName}."
|
||||
id="signup.agreement"
|
||||
values={
|
||||
Object {
|
||||
"PrivacyPolicyLink": "!undefined",
|
||||
"TermsOfServiceLink": "!undefined",
|
||||
"privacyPolicyLink": [Function],
|
||||
"siteName": "Mattermost",
|
||||
"termsOfUseLink": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -5,7 +5,7 @@ import classNames from 'classnames';
|
||||
import throttle from 'lodash/throttle';
|
||||
import React, {useState, useEffect, useRef, useCallback} from 'react';
|
||||
import type {FocusEvent} from 'react';
|
||||
import {useIntl} from 'react-intl';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import {useSelector, useDispatch} from 'react-redux';
|
||||
import {useLocation, useHistory, Route} from 'react-router-dom';
|
||||
|
||||
@ -36,7 +36,6 @@ import DesktopAuthToken from 'components/desktop_auth_token';
|
||||
import ExternalLink from 'components/external_link';
|
||||
import ExternalLoginButton from 'components/external_login_button/external_login_button';
|
||||
import type {ExternalLoginButtonType} from 'components/external_login_button/external_login_button';
|
||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
||||
import AlternateLinkLayout from 'components/header_footer_route/content_layouts/alternate_link';
|
||||
import ColumnLayout from 'components/header_footer_route/content_layouts/column';
|
||||
import type {CustomizeHeaderType} from 'components/header_footer_route/header_footer_route';
|
||||
@ -893,13 +892,27 @@ const Signup = ({onCustomizeHeader}: SignupProps) => {
|
||||
)}
|
||||
{enableSignUpWithEmail && !serverError && (
|
||||
<p className='signup-body-card-agreement'>
|
||||
<FormattedMarkdownMessage
|
||||
id='create_team.agreement'
|
||||
defaultMessage='By proceeding to create your account and use {siteName}, you agree to our [Terms of Use]({TermsOfServiceLink}) and [Privacy Policy]({PrivacyPolicyLink}). If you do not agree, you cannot use {siteName}.'
|
||||
<FormattedMessage
|
||||
id='signup.agreement'
|
||||
defaultMessage='By proceeding to create your account and use {siteName}, you agree to our <termsOfUseLink>Terms of Use</termsOfUseLink> and <privacyPolicyLink>Privacy Policy</privacyPolicyLink>. If you do not agree, you cannot use {siteName}.'
|
||||
values={{
|
||||
siteName: SiteName,
|
||||
TermsOfServiceLink: `!${TermsOfServiceLink}`,
|
||||
PrivacyPolicyLink: `!${PrivacyPolicyLink}`,
|
||||
termsOfUseLink: (chunks: string) => (
|
||||
<ExternalLink
|
||||
href={TermsOfServiceLink as string}
|
||||
location='signup-terms-of-use'
|
||||
>
|
||||
{chunks}
|
||||
</ExternalLink>
|
||||
),
|
||||
privacyPolicyLink: (chunks: string) => (
|
||||
<ExternalLink
|
||||
href={PrivacyPolicyLink as string}
|
||||
location='signup-privacy-policy'
|
||||
>
|
||||
{chunks}
|
||||
</ExternalLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React, {memo, forwardRef, useMemo} from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {useSelector} from 'react-redux';
|
||||
|
||||
import {ArchiveOutlineIcon} from '@mattermost/compass-icons/components';
|
||||
@ -11,7 +12,6 @@ import {makeGetChannel} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getPost, getLimitedViews} from 'mattermost-redux/selectors/entities/posts';
|
||||
|
||||
import AdvancedCreateComment from 'components/advanced_create_comment';
|
||||
import FormattedMarkdownMessage from 'components/formatted_markdown_message';
|
||||
import BasicSeparator from 'components/widgets/separator/basic-separator';
|
||||
|
||||
import Constants from 'utils/constants';
|
||||
@ -53,9 +53,12 @@ const CreateComment = forwardRef<HTMLDivElement, Props>(({
|
||||
<div
|
||||
className='post-create-message'
|
||||
>
|
||||
<FormattedMarkdownMessage
|
||||
id='create_post.deactivated'
|
||||
defaultMessage='You are viewing an archived channel with a **deactivated user**. New messages cannot be posted.'
|
||||
<FormattedMessage
|
||||
id='createComment.threadFromDeactivatedUserMessage'
|
||||
defaultMessage='You are viewing an archived channel with a <strong>deactivated user</strong>. New messages cannot be posted.'
|
||||
values={{
|
||||
strong: (chunks: string) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@ -74,9 +77,12 @@ const CreateComment = forwardRef<HTMLDivElement, Props>(({
|
||||
size={20}
|
||||
color={'rgba(var(--center-channel-color-rgb), 0.75)'}
|
||||
/>
|
||||
<FormattedMarkdownMessage
|
||||
id='threadFromArchivedChannelMessage'
|
||||
defaultMessage='You are viewing a thread from an **archived channel**. New messages cannot be posted.'
|
||||
<FormattedMessage
|
||||
id='createComment.threadFromArchivedChannelMessage'
|
||||
defaultMessage='You are viewing a thread from an <strong>archived channel</strong>. New messages cannot be posted.'
|
||||
values={{
|
||||
strong: (chunks: string) => <strong>{chunks}</strong>,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1119,8 +1119,8 @@
|
||||
"admin.guest_access.disableConfirmMessage": "Disabling guest access will revoke all current Guest Account sessions. Guests will no longer be able to login and new guests cannot be invited into Mattermost. Guest users will be marked as inactive in user lists. Enabling this feature will not reinstate previous guest accounts. Are you sure you wish to remove these users?",
|
||||
"admin.guest_access.disableConfirmTitle": "Save and Disable Guest Access?",
|
||||
"admin.guest_access.disableConfirmWarning": "All current guest account sessions will be revoked, and marked as inactive",
|
||||
"admin.guest_access.enableDescription": "When true, external guest can be invited to channels within teams. Please see [Permissions Schemes](../user_management/permissions/system_scheme) for which roles can invite guests.",
|
||||
"admin.guest_access.enableTitle": "Enable Guest Access: ",
|
||||
"admin.guest_access.helpText": "When true, external guest can be invited to channels within teams. Please see <a>Permissions Schemes</a> for which roles can invite guests.",
|
||||
"admin.guest_access.hideTags": "Hide guest tag",
|
||||
"admin.guest_access.hideTagsDescription": "When true, the \"guest\" tag will not be shown next to the name of all guest users in the Mattermost chat interface.",
|
||||
"admin.guest_access.mfaDescription": "When true, <link>multi-factor authentication</link> for guests is required for login. New guest users will be required to configure MFA on signup. Logged in guest users without MFA configured are redirected to the MFA setup page until configuration is complete.\n \nIf your system has guest users with login methods other than AD/LDAP and email, MFA must be enforced with the authentication provider outside of Mattermost.",
|
||||
@ -3455,7 +3455,6 @@
|
||||
"create_post.send_message": "Send a message",
|
||||
"create_post.shortcutsNotSupported": "Keyboard shortcuts are not supported on your device.",
|
||||
"create_post.write": "Write to {channelDisplayName}",
|
||||
"create_team.agreement": "By proceeding to create your account and use {siteName}, you agree to our [Terms of Use]({TermsOfServiceLink}) and [Privacy Policy]({PrivacyPolicyLink}). If you do not agree, you cannot use {siteName}.",
|
||||
"create_team.createTeamRestricted.message": "Your workspace plan has reached the limit on the number of teams. Create unlimited teams with a free 30-day trial. Contact your System Administrator.",
|
||||
"create_team.createTeamRestricted.title": "Professional feature",
|
||||
"create_team.display_name.charLength": "Name must be {min} or more characters up to a maximum of {max}. You can add a longer team description later.",
|
||||
@ -3476,6 +3475,8 @@
|
||||
"create_team.team_url.teamUrl": "Team URL",
|
||||
"create_team.team_url.unavailable": "This URL is taken or unavailable. Please try another.",
|
||||
"create_team.team_url.webAddress": "Choose the web address of your new team:",
|
||||
"createComment.threadFromArchivedChannelMessage": "You are viewing a thread from an <b>archived channel</b>. New messages cannot be posted.",
|
||||
"createComment.threadFromDeactivatedUserMessage": "You are viewing an archived channel with a <b>deactivated user</b>. New messages cannot be posted.",
|
||||
"custom_emoji.header": "Custom Emoji",
|
||||
"custom_status.expiry_dropdown.choose_date_and_time": "Choose date and time",
|
||||
"custom_status.expiry_dropdown.clear_after": "Clear after",
|
||||
@ -3519,8 +3520,6 @@
|
||||
"delete_channel.cancel": "Cancel",
|
||||
"delete_channel.confirm": "Confirm ARCHIVE Channel",
|
||||
"delete_channel.del": "Archive",
|
||||
"delete_channel.question": "This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again. \n \nAre you sure you wish to archive the {display_name} channel?",
|
||||
"delete_channel.viewArchived.question": "This will archive the channel from the team. Channel contents will still be accessible by channel members.\n \nAre you sure you wish to archive the **{display_name}** channel?",
|
||||
"delete_post.cancel": "Cancel",
|
||||
"delete_post.confirm_comment": "Confirm Comment Delete",
|
||||
"delete_post.confirm_post": "Confirm Post Delete",
|
||||
@ -3532,6 +3531,9 @@
|
||||
"delete_post.shared_channel_warning.title": "Shared Channel",
|
||||
"delete_post.warning": "This message has {count, number} {count, plural, one {comment} other {comments}} on it.",
|
||||
"delete_success_modal.button_text": "Go to mattermost.com",
|
||||
"deleteChannelModal.cannotViewArchivedChannelsWarning": "This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again.",
|
||||
"deleteChannelModal.canViewArchivedChannelsWarning": "This will archive the channel from the team. Channel contents will still be accessible by channel members.",
|
||||
"deleteChannelModal.confirmArchive": "Are you sure you wish to archive the <b>{display_name}</b> channel?",
|
||||
"demote_to_user_modal.demote": "Demote",
|
||||
"demote_to_user_modal.desc": "This action demotes the user {username} to a guest. It will restrict the user's ability to join public channels and interact with users outside of the channels they are currently members of. Are you sure you want to demote user {username} to guest?",
|
||||
"demote_to_user_modal.title": "Demote User {username} to Guest",
|
||||
@ -5112,6 +5114,7 @@
|
||||
"signup_user_completed.userHelp": "You can use lowercase letters, numbers, periods, dashes, and underscores.",
|
||||
"signup_user_completed.usernameLength": "Usernames have to begin with a lowercase letter and be {min}-{max} characters long. You can use lowercase letters, numbers, periods, dashes, and underscores.",
|
||||
"signup_user_completed.validEmail": "Please enter a valid email address",
|
||||
"signup.agreement": "By proceeding to create your account and use {siteName}, you agree to our <a1>Terms of Use</a1> and <a2>Privacy Policy</a2>. If you do not agree, you cannot use {siteName}.",
|
||||
"signup.ldap": "AD/LDAP Credentials",
|
||||
"single_image_view.copied_link_tooltip": "Copied",
|
||||
"single_image_view.copy_link_tooltip": "Copy link",
|
||||
@ -5249,7 +5252,6 @@
|
||||
"textbox.preview": "Preview",
|
||||
"textbox.quote": ">quote",
|
||||
"textbox.strike": "strike",
|
||||
"threadFromArchivedChannelMessage": "You are viewing a thread from an **archived channel**. New messages cannot be posted.",
|
||||
"threading.filters.unreads": "Unreads",
|
||||
"threading.following": "Following",
|
||||
"threading.footer.lastReplyAt": "Last reply {formatted}",
|
||||
|
Loading…
Reference in New Issue
Block a user