|
|
@@ -4,6 +4,7 @@ import React, { Component } from 'react';
|
|
4
|
4
|
import Emoji from 'react-emoji-render';
|
|
5
|
5
|
import type { Dispatch } from 'redux';
|
|
6
|
6
|
|
|
|
7
|
+import { translate } from '../../../base/i18n';
|
|
7
|
8
|
import { connect } from '../../../base/redux';
|
|
8
|
9
|
|
|
9
|
10
|
import { sendMessage } from '../../actions';
|
|
|
@@ -23,7 +24,12 @@ type Props = {
|
|
23
|
24
|
/**
|
|
24
|
25
|
* Optional callback to get a reference to the chat input element.
|
|
25
|
26
|
*/
|
|
26
|
|
- getChatInputRef?: Function
|
|
|
27
|
+ getChatInputRef?: Function,
|
|
|
28
|
+
|
|
|
29
|
+ /**
|
|
|
30
|
+ * Invoked to obtain translated strings.
|
|
|
31
|
+ */
|
|
|
32
|
+ t: Function
|
|
27
|
33
|
};
|
|
28
|
34
|
|
|
29
|
35
|
/**
|
|
|
@@ -114,11 +120,10 @@ class ChatInput extends Component<Props, State> {
|
|
114
|
120
|
</div>
|
|
115
|
121
|
<div className = 'usrmsg-form'>
|
|
116
|
122
|
<textarea
|
|
117
|
|
- data-i18n = '[placeholder]chat.messagebox'
|
|
118
|
123
|
id = 'usermsg'
|
|
119
|
124
|
onChange = { this._onMessageChange }
|
|
120
|
125
|
onKeyDown = { this._onDetectSubmit }
|
|
121
|
|
- placeholder = { 'Enter Text...' }
|
|
|
126
|
+ placeholder = { this.props.t('chat.messagebox') }
|
|
122
|
127
|
ref = { this._setTextAreaRef }
|
|
123
|
128
|
value = { this.state.message } />
|
|
124
|
129
|
</div>
|
|
|
@@ -233,4 +238,4 @@ class ChatInput extends Component<Props, State> {
|
|
233
|
238
|
}
|
|
234
|
239
|
}
|
|
235
|
240
|
|
|
236
|
|
-export default connect()(ChatInput);
|
|
|
241
|
+export default translate(connect()(ChatInput));
|