MM-12320 - Change "about" section references to use the site name when it is configured (#2835)

* Change "about" section references to use the site name when it is configured

* Removed non-english changes

* Removed non-english changes

* cleanup

* Fixed indentation

* destructuring
This commit is contained in:
Eli Yukelzon 2019-05-28 15:49:23 +03:00 committed by Elias Nahum
parent 6e099d6a21
commit a6307c5ca6
3 changed files with 8 additions and 4 deletions

View file

@ -75,10 +75,10 @@ class Settings extends PureComponent {
};
goToAbout = preventDoubleTap(() => {
const {intl, navigator, theme} = this.props;
const {intl, navigator, theme, config} = this.props;
navigator.push({
screen: 'About',
title: intl.formatMessage({id: 'about.title', defaultMessage: 'About Mattermost'}),
title: intl.formatMessage({id: 'about.title', defaultMessage: 'About {appTitle}'}, {appTitle: config.SiteName || 'Mattermost'}),
animated: true,
backButtonTitle: '',
navigatorStyle: {
@ -302,7 +302,8 @@ class Settings extends PureComponent {
/>
}
<SettingsItem
defaultMessage='About Mattermost'
defaultMessage='About {appTitle}'
messageValues={{appTitle: config.SiteName || 'Mattermost'}}
i18nId={t('about.title')}
iconName='ios-information-circle'
iconType='ion'

View file

@ -14,6 +14,7 @@ import getStyleSheet from './style';
export default class SettingsItem extends PureComponent {
static propTypes = {
defaultMessage: PropTypes.string.isRequired,
messageValues: PropTypes.object,
i18nId: PropTypes.string,
iconName: PropTypes.string,
iconType: PropTypes.oneOf(['fontawesome', 'foundation', 'ion', 'material']),
@ -35,6 +36,7 @@ export default class SettingsItem extends PureComponent {
const {
centered,
defaultMessage,
messageValues,
i18nId,
isDestructor,
theme,
@ -57,6 +59,7 @@ export default class SettingsItem extends PureComponent {
return (
<FormattedText
values={messageValues}
id={i18nId}
defaultMessage={defaultMessage}
style={textStyle}

View file

@ -9,7 +9,7 @@
"about.teamEditionSt": "All your team communication in one place, instantly searchable and accessible anywhere.",
"about.teamEditiont0": "Team Edition",
"about.teamEditiont1": "Enterprise Edition",
"about.title": "About Mattermost",
"about.title": "About {appTitle}",
"announcment_banner.dont_show_again": "Don't show again",
"api.channel.add_member.added": "{addedUsername} added to the channel by {username}.",
"archivedChannelMessage": "You are viewing an **archived channel**. New messages cannot be posted.",