Added ability for system message username to be localized (#5239)

Этот коммит содержится в:
Harrison Healey
2017-01-31 13:02:48 -05:00
коммит произвёл Corey Hulen
родитель 6054dee806
Коммит 9369cab56c
6 изменённых файлов: 21 добавлений и 5 удалений

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

@@ -3,6 +3,7 @@
import UserProfile from 'components/user_profile.jsx';
import PostInfo from './post_info.jsx';
import {FormattedMessage} from 'react-intl';
import * as PostUtils from 'utils/post_utils.jsx';
@@ -55,7 +56,12 @@ export default class PostHeader extends React.Component {
userProfile = (
<UserProfile
user={{}}
overwriteName={Constants.SYSTEM_MESSAGE_PROFILE_NAME}
overwriteName={
<FormattedMessage
id='post_info.system'
defaultMessage='System'
/>
}
overwriteImage={Constants.SYSTEM_MESSAGE_PROFILE_IMAGE}
disablePopover={true}
/>

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

@@ -285,7 +285,12 @@ export default class RhsComment extends React.Component {
userProfile = (
<UserProfile
user={{}}
overwriteName={Constants.SYSTEM_MESSAGE_PROFILE_NAME}
overwriteName={
<FormattedMessage
id='post_info.system'
defaultMessage='System'
/>
}
overwriteImage={Constants.SYSTEM_MESSAGE_PROFILE_IMAGE}
disablePopover={true}
/>

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

@@ -293,7 +293,12 @@ export default class RhsRootPost extends React.Component {
userProfile = (
<UserProfile
user={{}}
overwriteName={Constants.SYSTEM_MESSAGE_PROFILE_NAME}
overwriteName={
<FormattedMessage
id='post_info.system'
defaultMessage='System'
/>
}
overwriteImage={Constants.SYSTEM_MESSAGE_PROFILE_IMAGE}
disablePopover={true}
/>

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

@@ -102,7 +102,7 @@ UserProfile.defaultProps = {
};
UserProfile.propTypes = {
user: React.PropTypes.object,
overwriteName: React.PropTypes.string,
overwriteName: React.PropTypes.node,
overwriteImage: React.PropTypes.string,
disablePopover: React.PropTypes.bool,
displayNameType: React.PropTypes.string,

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

@@ -1701,6 +1701,7 @@
"post_info.mobile.unflag": "Unflag",
"post_info.permalink": "Permalink",
"post_info.reply": "Reply",
"post_info.system": "System",
"post_message_view.edited": "(edited)",
"posts_view.loadMore": "Load more messages",
"posts_view.newMsg": "New Messages",

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

@@ -364,7 +364,6 @@ export const Constants = {
POST_FAILED: 'failed',
POST_DELETED: 'deleted',
SYSTEM_MESSAGE_PREFIX: 'system_',
SYSTEM_MESSAGE_PROFILE_NAME: 'System',
SYSTEM_MESSAGE_PROFILE_IMAGE: logoImage,
RESERVED_TEAM_NAMES: [
'signup',