MM-51977 : Remove inconsistencies of the duplicate IDs with different defaultMessages (#22965)

* eslint format lib to root

* eslint fixes

* no id rule removed

* same rectintl

* try 1

* eslint format lib to root

* eslint fixes

* no id rule removed

* same rectintl

* react intl in root

* type fix

* add back version to components

* missing translations added

* remove type casting

* a

* type fix formatjs

* snaps updated

* Update package-lock.json

* Update package-lock.json

* rem

* snapshot updates

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
M-ZubairAhmed
2023-04-18 01:04:45 +05:30
committed by GitHub
parent 3f022e728f
commit adff327b9c
49 changed files with 565 additions and 139 deletions

View File

@@ -175,7 +175,7 @@ export function executeCommand(message: string, args: CommandArgs): ActionFunc {
const errorResponse = res.error;
return createErrorMessage(errorResponse.text || intlShim.formatMessage({
id: 'apps.error.unknown',
defaultMessage: 'Unknown error.',
defaultMessage: 'Unknown error occurred.',
}));
}
@@ -201,7 +201,7 @@ export function executeCommand(message: string, args: CommandArgs): ActionFunc {
));
}
} catch (err: any) {
return createErrorMessage(err.message || localizeMessage('apps.error.unknown', 'Unknown error.'));
return createErrorMessage(err.message || localizeMessage('apps.error.unknown', 'Unknown error occurred.'));
}
}
}

View File

@@ -34,7 +34,7 @@ exports[`components/SettingItemMin should match snapshot with active Save button
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -139,7 +139,7 @@ exports[`components/SettingItemMin should match snapshot with active Save button
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -254,7 +254,7 @@ exports[`components/SettingItemMin should match snapshot, on loading picture 1`]
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -381,7 +381,7 @@ exports[`components/SettingItemMin should match snapshot, profile picture on fil
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -496,7 +496,7 @@ exports[`components/SettingItemMin should match snapshot, profile picture on sou
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -623,7 +623,7 @@ exports[`components/SettingItemMin should match snapshot, team icon on file 1`]
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -792,7 +792,7 @@ exports[`components/SettingItemMin should match snapshot, team icon on source 1`
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,
@@ -961,7 +961,7 @@ exports[`components/SettingItemMin should match snapshot, user icon on source 1`
>
<MemoizedFormattedMessage
defaultMessage="Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}"
id="setting_picture.help.profile"
id="setting_picture.help.profile.example"
values={
Object {
"max": 52428800,

View File

@@ -222,7 +222,7 @@ exports[`components/activity_and_insights/insights/top_channels should match sna
title={
<Memo(MemoizedFormattedMessage)
defaultMessage="Top Channels"
id="analytics.system.totalBotPosts"
id="analytics.system.topChannels"
/>
}
>
@@ -237,7 +237,7 @@ exports[`components/activity_and_insights/insights/top_channels should match sna
>
<FormattedMessage
defaultMessage="Top Channels"
id="analytics.system.totalBotPosts"
id="analytics.system.topChannels"
>
<span>
Top Channels

View File

@@ -115,7 +115,7 @@ const TopChannelsLineChart = ({topChannels, timeFrame, channelLineChartData, tim
<LineChart
title={
<FormattedMessage
id='analytics.system.totalBotPosts'
id='analytics.system.topChannels'
defaultMessage='Top Channels'
/>
}

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {useEffect, useState} from 'react';
import React, {useEffect, useState, ReactNode} from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {useDispatch, useSelector} from 'react-redux';
@@ -106,7 +106,7 @@ const TrialBanner = ({
const dispatch = useDispatch();
const btnText = (status: TrialLoadStatus): string => {
const btnText = (status: TrialLoadStatus) => {
switch (status) {
case TrialLoadStatus.Started:
return formatMessage({id: 'start_trial.modal.gettingTrial', defaultMessage: 'Getting Trial...'});
@@ -115,7 +115,22 @@ const TrialBanner = ({
case TrialLoadStatus.Failed:
return formatMessage({id: 'start_trial.modal.failed', defaultMessage: 'Failed'});
case TrialLoadStatus.Embargoed:
return formatMessage({id: 'admin.license.trial-request.embargoed'});
return formatMessage<ReactNode>(
{
id: 'admin.license.trial-request.embargoed',
defaultMessage: 'We were unable to process the request due to limitations for embargoed countries. <link>Learn more in our documentation</link>, or reach out to legal@mattermost.com for questions around export limitations.',
},
{
link: (text: string) => (
<ExternalLink
location='trial_banner'
href={LicenseLinks.EMBARGOED_COUNTRIES}
>
{text}
</ExternalLink>
),
},
);
default:
return formatMessage({id: 'admin.license.trial-request.startTrial', defaultMessage: 'Start trial'});
}

View File

@@ -20,7 +20,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<MemoizedFormattedMessage
defaultMessage="Button Text"
id="test"
id="test2"
/>
</LoadingWrapper>
</button>
@@ -30,7 +30,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<MemoizedFormattedMessage
defaultMessage="Help Text"
id="test"
id="test1"
/>
</div>
</div>
@@ -42,7 +42,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
buttonText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Button Text"
id="test"
id="test2"
/>
}
disabled={false}
@@ -55,7 +55,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
helpText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Help Text"
id="test"
id="test1"
/>
}
includeDetailedError={true}
@@ -103,7 +103,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Button Text"
id="test"
id="test2"
>
<span>
Button Text
@@ -154,7 +154,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Help Text"
id="test"
id="test1"
>
<span>
Help Text
@@ -171,7 +171,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
buttonText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Button Text"
id="test"
id="test2"
/>
}
disabled={false}
@@ -184,7 +184,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
helpText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Help Text"
id="test"
id="test1"
/>
}
includeDetailedError={false}
@@ -240,7 +240,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Button Text"
id="test"
id="test2"
>
<span>
Button Text
@@ -291,7 +291,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Help Text"
id="test"
id="test1"
>
<span>
Help Text
@@ -308,7 +308,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
buttonText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Button Text"
id="test"
id="test2"
/>
}
disabled={false}
@@ -321,7 +321,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
helpText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Help Text"
id="test"
id="test1"
/>
}
includeDetailedError={false}
@@ -369,7 +369,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Button Text"
id="test"
id="test2"
>
<span>
Button Text
@@ -413,7 +413,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Help Text"
id="test"
id="test1"
>
<span>
Help Text
@@ -430,7 +430,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
buttonText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Button Text"
id="test"
id="test2"
/>
}
disabled={false}
@@ -443,7 +443,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
helpText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Help Text"
id="test"
id="test1"
/>
}
includeDetailedError={false}
@@ -499,7 +499,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Button Text"
id="test"
id="test2"
>
<span>
Button Text
@@ -513,7 +513,7 @@ exports[`components/admin_console/request_button/request_button.jsx should match
>
<FormattedMessage
defaultMessage="Help Text"
id="test"
id="test1"
>
<span>
Help Text

View File

@@ -18,13 +18,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={emptyFunction}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -42,13 +42,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionSuccess}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -72,13 +72,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionSuccess}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -102,13 +102,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionSuccess}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -129,13 +129,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionSuccess}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -164,13 +164,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionFailure}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}
@@ -191,13 +191,13 @@ describe('components/admin_console/request_button/request_button.jsx', () => {
requestAction={requestActionFailure}
helpText={
<FormattedMessage
id='test'
id='test1'
defaultMessage='Help Text'
/>
}
buttonText={
<FormattedMessage
id='test'
id='test2'
defaultMessage='Button Text'
/>
}

View File

@@ -95,7 +95,7 @@ export default class LogList extends React.PureComponent<Props, State> {
);
const level: JSX.Element = (
<FormattedMessage
id='admin.log.logLevel'
id='admin.log.Level'
defaultMessage='Level'
/>
);

View File

@@ -137,7 +137,7 @@ class CloudTrialAnnouncementBar extends React.PureComponent<Props> {
let trialMoreThan7DaysMsg = (
<FormattedMessage
id='admin.billing.subscription.cloudTrial.moreThan3Days'
id='admin.billing.subscription.cloudTrial.daysLeft'
defaultMessage='Your trial has started! There are {daysLeftOnTrial} days left'
values={{daysLeftOnTrial}}
/>

View File

@@ -234,7 +234,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
const errorResponse = res.error;
const errMsg = errorResponse.text || intl.formatMessage({
id: 'apps.error.unknown',
defaultMessage: 'Unknown error.',
defaultMessage: 'Unknown error occurred.',
});
this.setState({
fieldErrors: {
@@ -256,7 +256,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
case AppCallResponseTypes.NAVIGATE: {
const errMsg = intl.formatMessage({
id: 'apps.error.responses.unexpected_type',
defaultMessage: 'App response type was not expected. Response type: {type}.',
defaultMessage: 'App response type was not expected. Response type: {type}',
}, {
type: callResp.type,
},
@@ -338,7 +338,7 @@ export class AppsForm extends React.PureComponent<Props, State> {
case AppCallResponseTypes.NAVIGATE:
this.updateErrors([], undefined, this.props.intl.formatMessage({
id: 'apps.error.responses.unexpected_type',
defaultMessage: 'App response type was not expected. Response type: {type}.',
defaultMessage: 'App response type was not expected. Response type: {type}',
}, {
type: callResponse.type,
}));

View File

@@ -48,7 +48,7 @@ class AppsFormContainer extends React.PureComponent<Props, State> {
};
const {form} = this.state;
if (!form) {
const errMsg = this.props.intl.formatMessage({id: 'apps.error.form.no_form', defaultMessage: '`form` is not defined'});
const errMsg = this.props.intl.formatMessage({id: 'apps.error.form.no_form', defaultMessage: '`form` is not defined.'});
return {error: makeCallErrorResponse(makeErrorMsg(errMsg))};
}
if (!form.submit) {
@@ -97,7 +97,7 @@ class AppsFormContainer extends React.PureComponent<Props, State> {
refreshOnSelect = async (field: AppField, values: AppFormValues): Promise<DoAppCallResult<FormResponseData>> => {
const makeErrMsg = (message: string) => this.props.intl.formatMessage(
{
id: 'apps.error.form.refresh',
id: 'apps.error.form.update',
defaultMessage: 'There has been an error updating the modal. Contact the app developer. Details: {details}',
},
{details: message},
@@ -144,7 +144,7 @@ class AppsFormContainer extends React.PureComponent<Props, State> {
case AppCallResponseTypes.NAVIGATE:
return {error: makeCallErrorResponse(makeErrMsg(this.props.intl.formatMessage({
id: 'apps.error.responses.unexpected_type',
defaultMessage: 'App response type was not expected. Response type: {type}.',
defaultMessage: 'App response type was not expected. Response type: {type}',
}, {
type: callResp.type,
},

View File

@@ -145,7 +145,7 @@ class ChannelGroupsManageModal extends React.PureComponent<Props> {
const {formatMessage} = this.props.intl;
return (
<ListModal
titleText={formatMessage({id: 'groups', defaultMessage: '{channel} Groups'}, {channel: this.props.channel.display_name})}
titleText={formatMessage({id: 'channel_groups', defaultMessage: '{channel} Groups'}, {channel: this.props.channel.display_name})}
searchPlaceholderText={formatMessage({id: 'manage_channel_groups_modal.search_placeholder', defaultMessage: 'Search groups'})}
renderRow={this.renderRow}
loadItems={this.loadItems}

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {useEffect, useState} from 'react';
import React, {useEffect, useState, ReactNode} from 'react';
import {useIntl} from 'react-intl';
import {useDispatch} from 'react-redux';
@@ -14,8 +14,9 @@ import {trackEvent} from 'actions/telemetry_actions';
import {openModal, closeModal} from 'actions/views/modals';
import TrialBenefitsModal from 'components/trial_benefits_modal/trial_benefits_modal';
import ExternalLink from 'components/external_link';
import {ModalIdentifiers, TELEMETRY_CATEGORIES} from 'utils/constants';
import {ModalIdentifiers, TELEMETRY_CATEGORIES, LicenseLinks} from 'utils/constants';
import RequestBusinessEmailModal from './request_business_email_modal';
import './cloud_start_trial_btn.scss';
@@ -129,7 +130,7 @@ const CloudStartTrialButton = ({
}));
};
const btnText = (status: TrialLoadStatus): string => {
const btnText = (status: TrialLoadStatus) => {
switch (status) {
case TrialLoadStatus.Started:
return formatMessage({id: 'start_cloud_trial.modal.gettingTrial', defaultMessage: 'Getting Trial...'});
@@ -138,7 +139,22 @@ const CloudStartTrialButton = ({
case TrialLoadStatus.Failed:
return formatMessage({id: 'start_cloud_trial.modal.failed', defaultMessage: 'Failed'});
case TrialLoadStatus.Embargoed:
return formatMessage({id: 'admin.license.trial-request.embargoed'});
return formatMessage<ReactNode>(
{
id: 'admin.license.trial-request.embargoed',
defaultMessage: 'We were unable to process the request due to limitations for embargoed countries. <link>Learn more in our documentation</link>, or reach out to legal@mattermost.com for questions around export limitations.',
},
{
link: (text: string) => (
<ExternalLink
location='trial_banner'
href={LicenseLinks.EMBARGOED_COUNTRIES}
>
{text}
</ExternalLink>
),
},
);
default:
return message;
}

View File

@@ -497,7 +497,7 @@ export class DotMenuClass extends React.PureComponent<Props, State> {
class: classNames('post-menu__item', {
'post-menu__item--active': this.props.isMenuOpen,
}),
'aria-label': formatMessage({id: 'post_info.dot_menu.tooltip.more_actions', defaultMessage: 'Actions'}),
'aria-label': formatMessage({id: 'post_info.dot_menu.tooltip.actions', defaultMessage: 'Actions'}),
children: <DotsHorizontalIcon size={16}/>,
}}
menu={{
@@ -510,7 +510,7 @@ export class DotMenuClass extends React.PureComponent<Props, State> {
}}
menuButtonTooltip={{
id: `PostDotMenu-ButtonTooltip-${this.props.post.id}`,
text: formatMessage({id: 'post_info.dot_menu.tooltip.more_actions', defaultMessage: 'More'}),
text: formatMessage({id: 'post_info.dot_menu.tooltip.more', defaultMessage: 'More'}),
class: 'hidden-xs',
}}
>

View File

@@ -786,7 +786,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
<Memo(Tag)
icon="alert-circle-outline"
size="xs"
text="IMPORTANT"
text="Important"
uppercase={true}
variant="info"
>
@@ -818,7 +818,7 @@ exports[`components/drafts/panel/panel_body should match snapshot for priority 1
<span
className="TagText-bWgUzx kzWPbz"
>
IMPORTANT
Important
</span>
</TagText>
</div>

View File

@@ -18,7 +18,7 @@ function EmojiPickerPreview({emoji}: Props) {
return (
<div className='emoji-picker__preview emoji-picker__preview-placeholder'>
<FormattedMessage
id='emoji_picker.emojiPicker'
id='emoji_picker.emojiPicker.previewPlaceholder'
defaultMessage='Select an Emoji'
/>
</div>

View File

@@ -79,7 +79,7 @@ export default class ErrorPage extends React.PureComponent<Props> {
backButton = (
<Link to='/'>
<FormattedMessage
id='error.generic.link'
id='error.generic.siteLink'
defaultMessage='Back to {siteName}'
values={{
siteName: this.props.siteName,
@@ -123,7 +123,7 @@ export default class ErrorPage extends React.PureComponent<Props> {
backButton = (
<Link to='/'>
<FormattedMessage
id='error.generic.link'
id='error.generic.siteLink'
defaultMessage='Back to {siteName}'
values={{
siteName: this.props.siteName,

View File

@@ -14,7 +14,7 @@ exports[`components/file_preview_modal/file_preview_modal_main_nav/FilePreviewMo
>
<Memo(MemoizedFormattedMessage)
defaultMessage="Close"
id="generic.previous"
id="generic.close"
/>
</Tooltip>
}

View File

@@ -26,7 +26,7 @@ const FilePreviewModalMainNav: React.FC<Props> = (props: Props) => {
overlay={
<Tooltip id='close-icon-tooltip'>
<FormattedMessage
id='generic.previous'
id='generic.close'
defaultMessage='Close'
/>
</Tooltip>

View File

@@ -44,6 +44,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with about link 1
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="About"
id="web.footer.about"
/>
</ExternalLink>
@@ -98,6 +99,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with all links 1`
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="About"
id="web.footer.about"
/>
</ExternalLink>
@@ -109,6 +111,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with all links 1`
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Privacy Policy"
id="web.footer.privacy"
/>
</ExternalLink>
@@ -120,6 +123,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with all links 1`
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Terms"
id="web.footer.terms"
/>
</ExternalLink>
@@ -131,6 +135,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with all links 1`
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Help"
id="web.footer.help"
/>
</ExternalLink>
@@ -231,6 +236,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with help link 1`
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Help"
id="web.footer.help"
/>
</ExternalLink>
@@ -285,6 +291,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with privacy poli
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Privacy Policy"
id="web.footer.privacy"
/>
</ExternalLink>
@@ -339,6 +346,7 @@ exports[`components/HeaderFooterTemplate should match snapshot with term of serv
location="header_footer_template"
>
<MemoizedFormattedMessage
defaultMessage="Terms"
id="web.footer.terms"
/>
</ExternalLink>

View File

@@ -57,7 +57,10 @@ export default class NotLoggedIn extends React.PureComponent<Props> {
location='header_footer_template'
href={this.props.config.AboutLink}
>
<FormattedMessage id='web.footer.about'/>
<FormattedMessage
id='web.footer.about'
defaultMessage='About'
/>
</ExternalLink>,
);
}
@@ -71,7 +74,10 @@ export default class NotLoggedIn extends React.PureComponent<Props> {
location='header_footer_template'
href={this.props.config.PrivacyPolicyLink}
>
<FormattedMessage id='web.footer.privacy'/>
<FormattedMessage
id='web.footer.privacy'
defaultMessage='Privacy Policy'
/>
</ExternalLink>,
);
}
@@ -85,7 +91,10 @@ export default class NotLoggedIn extends React.PureComponent<Props> {
location='header_footer_template'
href={this.props.config.TermsOfServiceLink}
>
<FormattedMessage id='web.footer.terms'/>
<FormattedMessage
id='web.footer.terms'
defaultMessage='Terms'
/>
</ExternalLink>,
);
}
@@ -99,7 +108,10 @@ export default class NotLoggedIn extends React.PureComponent<Props> {
location='header_footer_template'
href={this.props.config.HelpLink}
>
<FormattedMessage id='web.footer.help'/>
<FormattedMessage
id='web.footer.help'
defaultMessage='Help'
/>
</ExternalLink>,
);
}

View File

@@ -10,7 +10,7 @@ exports[`components/integrations/AbstractIncomingWebhook should call action func
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -271,7 +271,7 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot 1
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -532,7 +532,7 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -796,7 +796,7 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -1024,7 +1024,7 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -1252,7 +1252,7 @@ exports[`components/integrations/AbstractIncomingWebhook should match snapshot,
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage

View File

@@ -10,7 +10,7 @@ exports[`components/integrations/AbstractOutgoingWebhook should match snapshot 1
>
<MemoizedFormattedMessage
defaultMessage="Outgoing Webhooks"
id="installed_outgoing_webhooks.header"
id="add_outgoing_webhook.header"
/>
</Link>
<MemoizedFormattedMessage

View File

@@ -34,7 +34,7 @@ exports[`components/integrations/InstalledOutgoingWebhook should match snapshot
onClick={[Function]}
>
<MemoizedFormattedMessage
defaultMessage="Regen Token"
defaultMessage="Regenerate Token"
id="installed_integrations.regenToken"
/>
</button>

View File

@@ -184,7 +184,7 @@ export default class AbstractIncomingWebhook extends PureComponent<Props, State>
<BackstageHeader>
<Link to={`/${this.props.team.name}/integrations/incoming_webhooks`}>
<FormattedMessage
id='installed_incoming_webhooks.header'
id='incoming_webhooks.header'
defaultMessage='Incoming Webhooks'
/>
</Link>

View File

@@ -249,7 +249,7 @@ export default class AbstractOutgoingWebhook extends React.PureComponent {
<BackstageHeader>
<Link to={`/${this.props.team.name}/integrations/outgoing_webhooks`}>
<FormattedMessage
id='installed_outgoing_webhooks.header'
id='add_outgoing_webhook.header'
defaultMessage='Outgoing Webhooks'
/>
</Link>

View File

@@ -0,0 +1,362 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`components/integrations/bots/AddBot blank 1`] = `
<div
className="backstage-content"
>
<BackstageHeader>
<Link
to="/DN/integrations/bots"
>
<MemoizedFormattedMessage
defaultMessage="Bot Accounts"
id="bots.manage.header"
/>
</Link>
<MemoizedFormattedMessage
defaultMessage="Add"
id="bots.manage.add.add"
/>
</BackstageHeader>
<div
className="backstage-form"
>
<form
className="form-horizontal"
onSubmit={[Function]}
>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="username"
>
<MemoizedFormattedMessage
defaultMessage="Username"
id="bots.add.username"
/>
</label>
<div
className="col-md-5 col-sm-8"
>
<input
className="form-control"
id="username"
maxLength={22}
onChange={[Function]}
type="text"
value=""
/>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="You can use lowercase letters, numbers, periods, dashes, and underscores."
id="bot.add.username.help"
/>
</div>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="boticon"
>
<MemoizedFormattedMessage
defaultMessage="Bot Icon"
id="bots.add.icon"
/>
</label>
<div
className="col-md-5 col-sm-8"
>
<div
className="bot-img-container"
>
<img
alt="bot image"
className="bot-img"
src={null}
style={
Object {
"transform": "",
"transformOrigin": "",
}
}
/>
</div>
<div
className="btn btn-sm btn-primary btn-file sel-btn"
>
<MemoizedFormattedMessage
defaultMessage="Upload Image"
id="bots.image.upload"
/>
<input
accept=".jpeg,.jpg,.png,.bmp"
onChange={[Function]}
type="file"
/>
</div>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="displayName"
>
<MemoizedFormattedMessage
defaultMessage="Display Name"
id="bots.add.displayName"
/>
</label>
<div
className="col-md-5 col-sm-8"
>
<input
className="form-control"
id="displayName"
maxLength={64}
onChange={[Function]}
type="text"
value=""
/>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="(Optional) You can choose to display your bot's full name rather than its username."
id="bot.add.display_name.help"
/>
</div>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="description"
>
<MemoizedFormattedMessage
defaultMessage="Description"
id="bot.add.description"
/>
</label>
<div
className="col-md-5 col-sm-8"
>
<input
className="form-control"
id="description"
maxLength={1024}
onChange={[Function]}
type="text"
value=""
/>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="(Optional) Let others know what this bot does."
id="bot.add.description.help"
/>
</div>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="role"
>
<MemoizedFormattedMessage
defaultMessage="Role"
id="bot.add.role"
/>
</label>
<div
className="col-md-5 col-sm-8"
>
<select
className="form-control"
disabled={false}
onChange={[Function]}
value="Member"
>
<option
value="Member"
>
Member
</option>
<option
value="System Admin"
>
System Admin
</option>
</select>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="Choose what role the bot should have."
id="bot.add.role.help"
/>
</div>
</div>
</div>
<div
className="row bot-profile__section"
>
<div
className="col-md-5 col-sm-8 col-sm-offset-4"
>
<MemoizedFormattedMessage
defaultMessage="Select additional permissions for the account. <link>Read more about roles and permissions</link>."
id="admin.manage_roles.botAdditionalRoles"
values={
Object {
"link": [Function],
}
}
/>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="postAll"
>
<MemoizedFormattedMessage
defaultMessage="post:all"
id="bot.add.post_all"
/>
</label>
<div
className="col-md-5 col-sm-8 checkbox"
>
<div
className="checkbox no-padding"
>
<label
htmlFor="postAll"
>
<input
checked={false}
disabled={false}
id="postAll"
onChange={[Function]}
type="checkbox"
/>
<MemoizedFormattedMessage
defaultMessage="Enabled"
id="bot.add.post_all.enabled"
/>
</label>
</div>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="Bot will have access to post to all Mattermost channels including direct messages."
id="bot.add.post_all.help"
/>
</div>
</div>
</div>
<div
className="form-group"
>
<label
className="control-label col-sm-4"
htmlFor="postChannels"
>
<MemoizedFormattedMessage
defaultMessage="post:channels"
id="bot.add.post_channels"
/>
</label>
<div
className="col-md-5 col-sm-8 checkbox"
>
<div
className="checkbox no-padding"
>
<label
htmlFor="postChannels"
>
<input
checked={false}
disabled={false}
id="postChannels"
onChange={[Function]}
type="checkbox"
/>
<MemoizedFormattedMessage
defaultMessage="Enabled"
id="bot.add.post_channels.enabled"
/>
</label>
</div>
<div
className="form__help"
>
<MemoizedFormattedMessage
defaultMessage="Bot will have access to post to all Mattermost public channels."
id="bot.add.post_channels.help"
/>
</div>
</div>
</div>
<div
className="backstage-form__footer"
>
<FormError
error={null}
errors={
Array [
"",
]
}
type="backstage"
/>
<Link
className="btn btn-link btn-sm"
to="/DN/integrations/bots"
>
<MemoizedFormattedMessage
defaultMessage="Cancel"
id="bots.manage.add.cancel"
/>
</Link>
<SpinnerButton
className="btn btn-primary"
id="saveBot"
onClick={[Function]}
spinning={false}
spinningText={
<Memo(MemoizedFormattedMessage)
defaultMessage="Creating..."
id="bots.manage.add.creating"
/>
}
type="submit"
>
<MemoizedFormattedMessage
defaultMessage="Create Bot Account"
id="bots.manage.add.create"
/>
</SpinnerButton>
</div>
</form>
</div>
</div>
`;

View File

@@ -3,9 +3,7 @@
import React from 'react';
import {shallow} from 'enzyme';
import {FormattedMessage} from 'react-intl';
// import TestHelper from 'mattermost-redux/test/test_helper';
import {TestHelper} from 'utils/test_helper';
import AddBot from './add_bot';
@@ -49,11 +47,7 @@ describe('components/integrations/bots/AddBot', () => {
value={''}
/>,
)).toEqual(true);
expect(wrapper.containsMatchingElement(
<FormattedMessage
id='admin.manage_roles.additionalRoles'
/>,
)).toEqual(true);
expect(wrapper).toMatchSnapshot();
});
it('edit bot', () => {

View File

@@ -322,7 +322,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
error: (
<FormattedMessage
id='bots.manage.add.invalid_username'
defaultMessage='Usernames must begin with a lowercase letter and be 3-22 characters long. You can use lowercase letters, numbers, periods, dashes, and underscores.'
defaultMessage='Usernames have to begin with a lowercase letter and be 3-22 characters long. You can use lowercase letters, numbers, periods, dashes, and underscores.'
/>
),
};
@@ -383,7 +383,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
render() {
let subtitle = (
<FormattedMessage
id='bots.manage.add'
id='bots.manage.add.add'
defaultMessage='Add'
/>
);
@@ -630,7 +630,7 @@ export default class AddBot extends React.PureComponent<Props, State> {
<div className='row bot-profile__section'>
<div className='col-md-5 col-sm-8 col-sm-offset-4'>
<FormattedMessage
id='admin.manage_roles.additionalRoles'
id='admin.manage_roles.botAdditionalRoles'
defaultMessage='Select additional permissions for the account. <link>Read more about roles and permissions</link>.'
values={{
link: (msg: React.ReactNode) => (

View File

@@ -12,7 +12,7 @@ exports[`components/integrations/ConfirmIntegration should match snapshot, comma
>
<MemoizedFormattedMessage
defaultMessage="Slash Commands"
id="installed_commands.header"
id="slash_commands.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -90,7 +90,7 @@ exports[`components/integrations/ConfirmIntegration should match snapshot, incom
>
<MemoizedFormattedMessage
defaultMessage="Incoming Webhooks"
id="installed_incoming_webhooks.header"
id="incoming_webhooks.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -168,7 +168,7 @@ exports[`components/integrations/ConfirmIntegration should match snapshot, oauth
>
<MemoizedFormattedMessage
defaultMessage="OAuth 2.0 Applications"
id="installed_oauth_apps.header"
id="installed_oauth2_apps.header"
/>
</Link>
<MemoizedFormattedMessage
@@ -286,7 +286,7 @@ exports[`components/integrations/ConfirmIntegration should match snapshot, outgo
>
<MemoizedFormattedMessage
defaultMessage="Outgoing Webhooks"
id="installed_outgoing_webhooks.header"
id="add_outgoing_webhook.header"
/>
</Link>
<MemoizedFormattedMessage

View File

@@ -63,7 +63,7 @@ const ConfirmIntegration = ({team, location, commands, oauthApps, incomingHooks,
headerText = (
<FormattedMessage
id={'installed_commands.header'}
id={'slash_commands.header'}
defaultMessage='Slash Commands'
/>
);
@@ -100,7 +100,7 @@ const ConfirmIntegration = ({team, location, commands, oauthApps, incomingHooks,
headerText = (
<FormattedMessage
id={'installed_incoming_webhooks.header'}
id={'incoming_webhooks.header'}
defaultMessage='Incoming Webhooks'
/>
);
@@ -137,7 +137,7 @@ const ConfirmIntegration = ({team, location, commands, oauthApps, incomingHooks,
headerText = (
<FormattedMessage
id={'installed_outgoing_webhooks.header'}
id={'add_outgoing_webhook.header'}
defaultMessage='Outgoing Webhooks'
/>
);
@@ -175,7 +175,7 @@ const ConfirmIntegration = ({team, location, commands, oauthApps, incomingHooks,
headerText = (
<FormattedMessage
id={'installed_oauth_apps.header'}
id={'installed_oauth2_apps.header'}
defaultMessage='OAuth 2.0 Applications'
/>
);

View File

@@ -20,7 +20,7 @@ exports[`components/integrations/InstalledOAuthApps should match snapshot 1`] =
header={
<Memo(MemoizedFormattedMessage)
defaultMessage="OAuth 2.0 Applications"
id="installed_oauth_apps.header"
id="installed_oauth2_apps.header"
/>
}
helpText={

View File

@@ -134,7 +134,7 @@ export default class InstalledOAuthApps extends React.PureComponent<Props, State
<BackstageList
header={
<FormattedMessage
id='installed_oauth_apps.header'
id='installed_oauth2_apps.header'
defaultMessage='OAuth 2.0 Applications'
/>
}

View File

@@ -167,7 +167,7 @@ export default class InstalledOutgoingWebhook extends React.PureComponent<Props>
>
<FormattedMessage
id='installed_integrations.regenToken'
defaultMessage='Regen Token'
defaultMessage='Regenerate Token'
/>
</button>
{' - '}

View File

@@ -26,7 +26,7 @@ export default function PriorityLabel({
{...rest}
variant='danger'
icon={'alert-outline'}
text={formatMessage({id: 'post_priority.priority.urgent', defaultMessage: 'URGENT'})}
text={formatMessage({id: 'post_priority.priority.urgent', defaultMessage: 'Urgent'})}
uppercase={true}
/>
);
@@ -38,7 +38,7 @@ export default function PriorityLabel({
{...rest}
variant='info'
icon={'alert-circle-outline'}
text={formatMessage({id: 'post_priority.priority.important', defaultMessage: 'IMPORTANT'})}
text={formatMessage({id: 'post_priority.priority.important', defaultMessage: 'Important'})}
uppercase={true}
/>
);

View File

@@ -79,7 +79,7 @@ exports[`components/ProfilePopover should disable start call button when user is
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -424,7 +424,7 @@ exports[`components/ProfilePopover should hide add-to-channel option if not on t
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -690,7 +690,7 @@ exports[`components/ProfilePopover should match snapshot 1`] = `
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -1039,7 +1039,7 @@ exports[`components/ProfilePopover should match snapshot for shared user 1`] = `
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -1406,7 +1406,7 @@ exports[`components/ProfilePopover should match snapshot when calls are disabled
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -1728,7 +1728,7 @@ exports[`components/ProfilePopover should match snapshot with custom status 1`]
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -2122,7 +2122,7 @@ exports[`components/ProfilePopover should match snapshot with custom status expi
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -2471,7 +2471,7 @@ exports[`components/ProfilePopover should match snapshot with custom status not
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -2757,7 +2757,7 @@ exports[`components/ProfilePopover should match snapshot with last active displa
>
<MemoizedFormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))
@@ -3753,7 +3753,7 @@ exports[`components/ProfilePopover should show the start call button when isCall
>
<FormattedMessage
defaultMessage="Last online {timestamp}"
id="channel_header.lastActive"
id="channel_header.lastOnline"
values={
Object {
"timestamp": <Memo(Connect(injectIntl(Timestamp)))

View File

@@ -463,7 +463,7 @@ class ProfilePopover extends React.PureComponent<ProfilePopoverProps, ProfilePop
key='user-popover-last-active'
>
<FormattedMessage
id='channel_header.lastActive'
id='channel_header.lastOnline'
defaultMessage='Last online {timestamp}'
values={{
timestamp: (

View File

@@ -17,7 +17,7 @@ import './success_page.scss';
export default function SuccessPage(props: Props) {
const title = (
<FormattedMessage
id={'admin.billing.subscription.upgradedSuccess'}
id={'admin.billing.subscription.subscribedSuccess'}
defaultMessage={'You\'re now subscribed to {productName}'}
values={{productName: props.planName}}
/>

View File

@@ -10,7 +10,7 @@ import SettingPicture from 'components/setting_picture';
const helpText: ReactNode = (
<FormattedMessage
id={'setting_picture.help.profile'}
id={'setting_picture.help.profile.example'}
defaultMessage='Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}'
values={{max: 52428800}}
/>

View File

@@ -8,7 +8,7 @@ exports[`components/new_channel_modal should match snapshot 1`] = `
open={false}
>
<button
aria-label="Add Channels Dropdown"
aria-label="Add Channel Dropdown"
className="SidebarChannelNavigator__addChannelsCtaLhsButton SidebarChannelNavigator__addChannelsCtaLhsButton--untouched"
id="addChannelsCta"
onClick={[Function]}
@@ -48,7 +48,7 @@ exports[`components/new_channel_modal should match snapshot 1`] = `
exports[`components/new_channel_modal should match snapshot when user has only join channel permissions 1`] = `
<button
aria-label="Add Channels Dropdown"
aria-label="Add Channel Dropdown"
className="SidebarChannelNavigator__addChannelsCtaLhsButton SidebarChannelNavigator__addChannelsCtaLhsButton--untouched"
id="addChannelsCta"
onClick={[Function]}

View File

@@ -112,7 +112,7 @@ const AddChannelsCtaButton = (): JSX.Element | null => {
<button
className={buttonClass}
id={'addChannelsCta'}
aria-label={intl.formatMessage({id: 'sidebar_left.add_channel_dropdown.dropdownAriaLabel', defaultMessage: 'Add Channels Dropdown'})}
aria-label={intl.formatMessage({id: 'sidebar_left.add_channel_dropdown.dropdownAriaLabel', defaultMessage: 'Add Channel Dropdown'})}
onClick={handleClick}
>
<li

View File

@@ -541,7 +541,7 @@ export class ParsedCommand {
if (this.incompleteStart === this.i - 1) {
return this.asError(this.intl.formatMessage({
id: 'apps.error.parser.empty_value',
defaultMessage: 'Empty values are not allowed.',
defaultMessage: 'Empty values are not allowed',
}));
}
this.i++;
@@ -581,7 +581,7 @@ export class ParsedCommand {
if (this.incompleteStart === this.i - 1) {
return this.asError(this.intl.formatMessage({
id: 'apps.error.parser.empty_value',
defaultMessage: 'Empty values are not allowed.',
defaultMessage: 'Empty values are not allowed',
}));
}
this.i++;
@@ -730,7 +730,7 @@ export class ParsedCommand {
if (this.incompleteStart === this.i - 1) {
return this.asError(this.intl.formatMessage({
id: 'apps.error.parser.empty_value',
defaultMessage: 'empty values are not allowed',
defaultMessage: 'Empty values are not allowed',
}));
}
this.i++;
@@ -770,7 +770,7 @@ export class ParsedCommand {
if (this.incompleteStart === this.i - 1) {
return this.asError(this.intl.formatMessage({
id: 'apps.error.parser.empty_value',
defaultMessage: 'empty values are not allowed',
defaultMessage: 'Empty values are not allowed',
}));
}
this.i++;
@@ -1506,7 +1506,7 @@ export class AppCommandParser {
const errorResponse = res.error;
return {error: errorResponse.text || this.intl.formatMessage({
id: 'apps.error.unknown',
defaultMessage: 'Unknown error.',
defaultMessage: 'Unknown error occurred.',
})};
}
@@ -1822,7 +1822,7 @@ export class AppCommandParser {
const errorResponse = res.error;
return this.makeDynamicSelectSuggestionError(errorResponse.text || this.intl.formatMessage({
id: 'apps.error.unknown',
defaultMessage: 'Unknown error.',
defaultMessage: 'Unknown error occurred.',
}));
}

View File

@@ -195,7 +195,7 @@ class TeamGroupsManageModal extends React.PureComponent<Props, State> {
<>
<ListModal
show={!this.state.showConfirmModal}
titleText={formatMessage({id: 'groups', defaultMessage: '{team} Groups'}, {team: this.props.team.display_name})}
titleText={formatMessage({id: 'team_groups', defaultMessage: '{team} Groups'}, {team: this.props.team.display_name})}
searchPlaceholderText={formatMessage({id: 'manage_team_groups_modal.search_placeholder', defaultMessage: 'Search groups'})}
renderRow={this.renderRow}
loadItems={this.loadItems}

View File

@@ -1301,7 +1301,7 @@ export class UserSettingsGeneralTab extends React.Component<Props, State> {
imgSrc = Utils.imageURLForUser(user.id, user.last_picture_update);
helpText = (
<FormattedMessage
id={'setting_picture.help.profile'}
id='setting_picture.help.profile'
defaultMessage='Upload a picture in BMP, JPG, JPEG, or PNG format. Maximum file size: {max}'
values={{max: Utils.fileSizeToString(this.props.maxFileSize)}}
/>

View File

@@ -378,7 +378,7 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should
type="radio"
/>
<Memo(MemoizedFormattedMessage)
defaultMessage="Every {count} minutes"
defaultMessage="Every {count, plural, one {minute} other {{count, number} minutes}}"
id="user.settings.notifications.email.everyXMinutes"
values={
Object {
@@ -523,7 +523,7 @@ exports[`components/user_settings/notifications/EmailNotificationSetting should
type="radio"
/>
<FormattedMessage
defaultMessage="Every {count} minutes"
defaultMessage="Every {count, plural, one {minute} other {{count, number} minutes}}"
id="user.settings.notifications.email.everyXMinutes"
values={
Object {

View File

@@ -284,7 +284,7 @@ export default class EmailNotificationSetting extends React.PureComponent<Props,
/>
<FormattedMessage
id='user.settings.notifications.email.everyXMinutes'
defaultMessage='Every {count} minutes'
defaultMessage='Every {count, plural, one {minute} other {{count, number} minutes}}'
values={{count: Preferences.INTERVAL_FIFTEEN_MINUTES / SECONDS_PER_MINUTE}}
/>
</label>

View File

@@ -90,7 +90,7 @@ const ViewUserGroupModalHeader = (props: Props) => {
>
<FormattedMessage
id='user_groups_modal.addPeople'
defaultMessage='AddPeople'
defaultMessage='Add People'
/>
</button>
);

View File

@@ -184,6 +184,7 @@
"add_outgoing_webhook.displayName": "Title",
"add_outgoing_webhook.displayName.help": "Specify a title for the webhook settings page. The title can contain up to 64 characters.",
"add_outgoing_webhook.doneHelp": "Your outgoing webhook is set up. The following token will be sent in the outgoing payload. Please use it to verify the request came from your Mattermost team (details at <link>Outgoing Webhooks</link>).",
"add_outgoing_webhook.header": "Outgoing Webhooks",
"add_outgoing_webhook.icon_url": "Profile Picture",
"add_outgoing_webhook.icon_url.help": "Enter the URL of a .png or .jpg file for this integration to use as the profile picture when posting. The file should be at least 128 pixels by 128 pixels. If left blank, the profile picture specified by the webhook creator is used.",
"add_outgoing_webhook.save": "Save",
@@ -307,6 +308,7 @@
"admin.billing.subscription.cloudReverseTrial.daysLeftOnTrial": "{daysLeftOnTrial} days left on your trial. Purchase a plan or contact sales to keep your workspace.",
"admin.billing.subscription.cloudReverseTrial.lastDay": "This is the last day of your trial. Purchase a plan before {userEndTrialHour} or contact sales",
"admin.billing.subscription.cloudReverseTrial.subscribeButton": "Review your options",
"admin.billing.subscription.cloudTrial.daysLeft": "Your trial has started! There are {daysLeftOnTrial} days left",
"admin.billing.subscription.cloudTrial.daysLeftOnTrial": "There are {daysLeftOnTrial} days left on your free trial",
"admin.billing.subscription.cloudTrial.lastDay": "This is the last day of your free trial. Your access will expire on {userEndTrialDate} at {userEndTrialHour}.",
"admin.billing.subscription.cloudTrial.moreThan3Days": "Your trial has started! There are {daysLeftOnTrial} days left",
@@ -400,6 +402,7 @@
"admin.billing.subscription.providePaymentDetails": "Provide your payment details",
"admin.billing.subscription.returnToTeam": "Return to {team}",
"admin.billing.subscription.stateprovince": "State/Province",
"admin.billing.subscription.subscribedSuccess": "You're now subscribed to {productName}",
"admin.billing.subscription.switchedToAnnual.title": "You're now switched to {selectedProductName} annual",
"admin.billing.subscription.title": "Subscription",
"admin.billing.subscription.updatePaymentInfo": "Update Payment Information",
@@ -1384,6 +1387,7 @@
"admin.log.fileLevelTitle": "File Log Level:",
"admin.log.fileTitle": "Output logs to file: ",
"admin.log.jsonDescription": "When true, logged events are written in a machine readable JSON format. Otherwise they are printed as plain text. Changing this setting requires a server restart before taking effect.",
"admin.log.Level": "Level",
"admin.log.levelDescription": "This setting determines the level of detail at which log events are written to the console. ERROR: Outputs only error messages. INFO: Outputs error messages and information around startup and initialization. DEBUG: Prints high detail for developers working on debugging issues.",
"admin.log.levelTitle": "Console Log Level:",
"admin.log.locationDescription": "The location of the log files. If blank, they are stored in the ./logs directory. The path that you set must exist and Mattermost must have write permissions in it. Changing this setting requires a server restart before taking effect.",
@@ -1405,6 +1409,7 @@
"admin.manage_roles.additionalRoles": "Select additional permissions for the account. <link>Read more about roles and permissions</link>.",
"admin.manage_roles.allowUserAccessTokens": "Allow this account to generate <link>personal access tokens</link>.",
"admin.manage_roles.allowUserAccessTokensDesc": "Removing this permission doesn't delete existing tokens. To delete them, go to the user's Manage Tokens menu.",
"admin.manage_roles.botAdditionalRoles": "Select additional permissions for the account. <link>Read more about roles and permissions</link>.",
"admin.manage_roles.cancel": "Cancel",
"admin.manage_roles.manageRolesTitle": "Manage Roles",
"admin.manage_roles.postAllPublicRole": "Access to post to all Mattermost public channels.",
@@ -2588,6 +2593,7 @@
"analytics.system.skippedIntensiveQueries": "To maximize performance, some statistics are disabled. You can <link>re-enable them in config.json</link>.",
"analytics.system.textPosts": "Posts with Text-only",
"analytics.system.title": "System Statistics",
"analytics.system.topChannels": "Top Channels",
"analytics.system.totalBotPosts": "Total Posts from Bots",
"analytics.system.totalChannels": "Total Channels",
"analytics.system.totalCommands": "Total Commands",
@@ -2673,6 +2679,7 @@
"apps.error.form.refresh_no_refresh": "Called refresh on no refresh field.",
"apps.error.form.required_fields_empty": "Please fix all field errors",
"apps.error.form.submit.pretext": "There has been an error submitting the modal. Contact the app developer. Details: {details}",
"apps.error.form.update": "There has been an error updating the modal. Contact the app developer. Details: {details}",
"apps.error.lookup.error_preparing_request": "Error preparing lookup request: {errorMessage}",
"apps.error.malformed_binding": "This binding is not properly formed. Contact the App developer.",
"apps.error.parser": "Parsing error: {error}",
@@ -2817,6 +2824,7 @@
"bots.disabled": "Disabled",
"bots.image.upload": "Upload Image",
"bots.manage.add": "Add Bot Account",
"bots.manage.add.add": "Add",
"bots.manage.add.cancel": "Cancel",
"bots.manage.add.create": "Create Bot Account",
"bots.manage.add.creating": "Creating...",
@@ -2853,6 +2861,7 @@
"change_url.shorter": "URLs must have maximum 64 characters.",
"change_url.startAndEndWithLetter": "URLs must start and end with a lowercase letter or number.",
"change_url.startWithLetter": "URLs must start with a lowercase letter or number.",
"channel_groups": "{channel} Groups",
"channel_header.addChannelHeader": "Add a channel header",
"channel_header.channelFiles": "Channel files",
"channel_header.channelHasGuests": "This channel has guests",
@@ -2865,6 +2874,7 @@
"channel_header.flagged": "Saved posts",
"channel_header.groupMessageHasGuests": "This group message has guests",
"channel_header.lastActive": "Last online {timestamp}",
"channel_header.lastOnline": "Last online {timestamp}",
"channel_header.leave": "Leave Channel",
"channel_header.manageMembers": "Manage Members",
"channel_header.menuAriaLabel": "Channel Menu",
@@ -3345,6 +3355,7 @@
"emoji_picker.custom": "Custom",
"emoji_picker.custom_emoji": "Custom Emoji",
"emoji_picker.emojiPicker": "Select an Emoji",
"emoji_picker.emojiPicker.previewPlaceholder": "Select an Emoji",
"emoji_picker.flags": "Flags",
"emoji_picker.food-drink": "Food & Drink",
"emoji_picker.header": "Emoji Picker",
@@ -3377,6 +3388,7 @@
"error.generic.link": "Back to {siteName}",
"error.generic.link_login": "Back to Login Page",
"error.generic.message": "An error has occurred.",
"error.generic.siteLink": "Back to {siteName}",
"error.generic.title": "Error",
"error.local_storage.help1": "Enable cookies",
"error.local_storage.help2": "Turn off private browsing",
@@ -3564,6 +3576,7 @@
"generic_icons.warning": "Warning Icon",
"generic_modal.cancel": "Cancel",
"generic_modal.confirm": "Confirm",
"generic.close": "Close",
"generic.done": "Done",
"generic.next": "Next",
"generic.previous": "Previous",
@@ -3607,7 +3620,6 @@
"group_member_list.searchError": "There was a problem getting results. Clear your search term and try again.",
"group_member_list.sendMessageButton": "Send message to {user}",
"group_member_list.sendMessageTooltip": "Send message",
"groups": "{team} Groups",
"help.attaching.downloading.description": "Download an attached file by selecting the Download icon next to the file thumbnail, or by opening the file previewer and selecting **Download**.",
"help.attaching.downloading.title": "Download Files",
"help.attaching.dragdrop.description": "Upload a file, or a selection of files, by dragging the files from your computer into the right-hand sidebar or center pane. Dragging and dropping attaches the files to the message input box, then you can optionally type a message and press **ENTER** to post the message.",
@@ -3737,6 +3749,7 @@
"help.messaging.reply": "**Reply to Messages:** Select the **Reply Arrow** icon next to the text input box.",
"help.messaging.title": "Messaging Basics",
"help.messaging.write": "**Write Messages:** Use the text input box at the bottom of the Mattermost interface to write a message. Press **ENTER** to send the message. Use **SHIFT+ENTER** to create a new line without sending a message.",
"incoming_webhooks.header": "Incoming Webhooks",
"inProduct_notices.adminOnlyMessage": "Visible to Admins only",
"input.clear": "Clear",
"insights.accessModal.cloudFreeTrial": "During your trial you are able to view Team Insights.",
@@ -3884,6 +3897,7 @@
"installed_oauth_apps.trusted": "Is Trusted",
"installed_oauth_apps.trusted.no": "No",
"installed_oauth_apps.trusted.yes": "Yes",
"installed_oauth2_apps.header": "OAuth 2.0 Applications",
"installed_outgoing_webhooks.add": "Add Outgoing Webhook",
"installed_outgoing_webhooks.delete.confirm": "This action permanently deletes the outgoing webhook and breaks any integrations using it. Are you sure you want to delete it?",
"installed_outgoing_webhooks.empty": "No outgoing webhooks found",
@@ -4448,7 +4462,8 @@
"post_info.comment_icon.tooltip.reply": "Reply",
"post_info.copy": "Copy Text",
"post_info.del": "Delete",
"post_info.dot_menu.tooltip.more_actions": "More",
"post_info.dot_menu.tooltip.actions": "Actions",
"post_info.dot_menu.tooltip.more": "More",
"post_info.edit": "Edit",
"post_info.edit.aria_label": "Select to restore an old message.",
"post_info.edit.current_version": "Current Version",
@@ -4767,6 +4782,7 @@
"setting_item_min.edit": "Edit",
"setting_picture.cancel": "Cancel",
"setting_picture.help.profile": "Upload a picture in BMP, JPG, JPEG, or PNG format. Maximum file size: {max}",
"setting_picture.help.profile.example": "Upload a picture in BMP, JPG or PNG format. Maximum file size: {max}",
"setting_picture.help.team": "Upload a team icon in BMP, JPG or PNG format.\nSquare images with a solid background color are recommended.",
"setting_picture.remove": "Remove This Icon",
"setting_picture.remove_profile_picture": "Remove Profile Picture",
@@ -4996,6 +5012,7 @@
"single_image_view.copied_link_tooltip": "Copied",
"single_image_view.copy_link_tooltip": "Copy link",
"single_image_view.download_tooltip": "Download",
"slash_commands.header": "Slash Commands",
"someting.string": "defaultString",
"start_cloud_trial.modal.enter_trial_email.description": "Start a trial and enter a business email to get started. ",
"start_cloud_trial.modal.enter_trial_email.input.label": "Enter business email",
@@ -5090,6 +5107,7 @@
"tag.default.guest": "GUEST",
"tag.default.new": "NEW",
"team_channel_settings.group.group_user_row.numberOfGroups": "{amount, number} {amount, plural, one {Group} other {Groups}}",
"team_groups": "{team} Groups",
"team_member_modal.invitePeople": "Invite People",
"team_member_modal.members": "{team} Members",
"team_members_dropdown.confirmDemoteDescription": "If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.",
@@ -5125,7 +5143,8 @@
"terms_of_service.agreeButton": "I Agree",
"terms_of_service.api_error": "Unable to complete the request. If this issue persists, contact your System Administrator.",
"terms_of_service.disagreeButton": "I Disagree",
"test": "Button Text",
"test1": "Help Text",
"test2": "Button Text",
"textbox.bold": "**bold**",
"textbox.edit": "Edit message",
"textbox.help": "Help",

View File

@@ -96,7 +96,7 @@ export default function CallButton({pluginCallComponents, currentChannel, channe
<span className='call-button-label'>{'Call'}</span>
<ChevronDownIcon
color='inherit'
aria-label={formatMessage({id: 'generic_icons.dropdown', defaultMessage: 'Dropdown icon'}).toLowerCase()}
aria-label={formatMessage({id: 'generic_icons.dropdown', defaultMessage: 'Dropdown Icon'}).toLowerCase()}
/>
</button>
<Menu