summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-01-31 13:02:48 -0500
committerCorey Hulen <corey@hulen.com>2017-01-31 13:02:48 -0500
commit9369cab56c82629d505d44d572f273df1d396972 (patch)
treed5e7959639ff66f15c34351ea02c6ec19177442b /webapp
parent6054dee806f45b7813438bfd4758af0407099865 (diff)
downloadchat-9369cab56c82629d505d44d572f273df1d396972.tar.gz
chat-9369cab56c82629d505d44d572f273df1d396972.tar.bz2
chat-9369cab56c82629d505d44d572f273df1d396972.zip
Added ability for system message username to be localized (#5239)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/post_view/components/post_header.jsx8
-rw-r--r--webapp/components/rhs_comment.jsx7
-rw-r--r--webapp/components/rhs_root_post.jsx7
-rw-r--r--webapp/components/user_profile.jsx2
-rw-r--r--webapp/i18n/en.json1
-rw-r--r--webapp/utils/constants.jsx1
6 files changed, 21 insertions, 5 deletions
diff --git a/webapp/components/post_view/components/post_header.jsx b/webapp/components/post_view/components/post_header.jsx
index 4043460a3..5e0a8a5a4 100644
--- a/webapp/components/post_view/components/post_header.jsx
+++ b/webapp/components/post_view/components/post_header.jsx
@@ -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}
/>
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 0eb7717b3..614ba6005 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -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}
/>
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index a114c7385..2942a0efc 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -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}
/>
diff --git a/webapp/components/user_profile.jsx b/webapp/components/user_profile.jsx
index d9bd5c378..8c365b6da 100644
--- a/webapp/components/user_profile.jsx
+++ b/webapp/components/user_profile.jsx
@@ -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,
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index fd2a34f36..560cbe5ee 100644
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -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",
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index bd50534f2..de720b837 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -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',