diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-02-03 12:16:28 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-02-03 12:17:13 -0300 |
commit | cdfa9b585a220353114924477a300fb6d3e50df8 (patch) | |
tree | e4831292bb2d6f762a7fbb00a9e814dd61f29ff6 /web/react/components/channel_loader.jsx | |
parent | 6a3806fe9d03abdfa1eb30fc62c7388a6922b60f (diff) | |
download | chat-cdfa9b585a220353114924477a300fb6d3e50df8.tar.gz chat-cdfa9b585a220353114924477a300fb6d3e50df8.tar.bz2 chat-cdfa9b585a220353114924477a300fb6d3e50df8.zip |
Messages for SocketStore and small fixes
Diffstat (limited to 'web/react/components/channel_loader.jsx')
-rw-r--r-- | web/react/components/channel_loader.jsx | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index 712d6885f..15571ad93 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -15,7 +15,40 @@ import PreferenceStore from '../stores/preference_store.jsx'; import * as Utils from '../utils/utils.jsx'; import Constants from '../utils/constants.jsx'; -export default class ChannelLoader extends React.Component { +import {intlShape, injectIntl, defineMessages} from 'mm-intl'; + +const holders = defineMessages({ + socketError: { + id: 'channel_loader.socketError', + defaultMessage: 'Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.' + }, + someone: { + id: 'channel_loader.someone', + defaultMessage: 'Someone' + }, + posted: { + id: 'channel_loader.posted', + defaultMessage: 'Posted' + }, + uploadedImage: { + id: 'channel_loader.uploadedImage', + defaultMessage: ' uploaded an image' + }, + uploadedFile: { + id: 'channel_loader.uploadedFile', + defaultMessage: ' uploaded a file' + }, + something: { + id: 'channel_loader.something', + defaultMessage: ' did something new' + }, + wrote: { + id: 'channel_loader.wrote', + defaultMessage: ' wrote: ' + } +}); + +class ChannelLoader extends React.Component { constructor(props) { super(props); @@ -23,6 +56,17 @@ export default class ChannelLoader extends React.Component { this.onSocketChange = this.onSocketChange.bind(this); + const {formatMessage} = this.props.intl; + SocketStore.setTranslations({ + socketError: formatMessage(holders.socketError), + someone: formatMessage(holders.someone), + posted: formatMessage(holders.posted), + uploadedImage: formatMessage(holders.uploadedImage), + uploadedFile: formatMessage(holders.uploadedFile), + something: formatMessage(holders.something), + wrote: formatMessage(holders.wrote) + }); + this.state = {}; } componentDidMount() { @@ -126,3 +170,9 @@ export default class ChannelLoader extends React.Component { return <div/>; } } + +ChannelLoader.propTypes = { + intl: intlShape.isRequired +}; + +export default injectIntl(ChannelLoader);
\ No newline at end of file |