Adding translations for comment post notifications.

This commit is contained in:
David Jay
2016-11-11 13:46:35 -05:00
parent 9174b0fcda
commit ba43e9d6dd
2 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ class CommentBox extends Component {
postItem(comment, 'comments')
.then((comment_id) => {
if (premod === 'pre') {
addNotification('success', 'Your comment has been posted and is being reviewed by our moderation team.');
addNotification('success', lang.t('comment-post-notif-premod'));
} else {
appendItemArray(parent_id || id, related, comment_id, !parent_id, parent_type);
addNotification('success', 'Your comment has been posted.');
@@ -60,7 +60,7 @@ class CommentBox extends Component {
style={styles && styles.textarea}
value={this.state.username}
id={reply ? 'replyUser' : 'commentUser'}
placeholder='Name'
placeholder={lang.t('name')}
onChange={(e) => this.setState({username: e.target.value})}/>
</div>
<div
@@ -75,7 +75,7 @@ class CommentBox extends Component {
className={`${name}-textarea`}
style={styles && styles.textarea}
value={this.state.body}
placeholder='Comment'
placeholder={lang.t('comment')}
id={reply ? 'replyText' : 'commentText'}
onChange={(e) => this.setState({body: e.target.value})}
rows={3}/>
@@ -3,12 +3,16 @@
"post": "Post",
"reply": "Reply",
"comment": "Comment",
"comment-post-notif": "Your comment has been posted."
"name": "Name",
"comment-post-notif": "Your comment has been posted.",
"comment-post-notif-premod": "Thank you for reporting this comment. Our moderation team has been notified and will review it shortly."
},
"es": {
"post": "Publicar",
"reply": "Respuesta",
"comment": "Comentario",
"comment-post-notif": "¡traduceme!"
"name": "Nombre",
"comment-post-notif": "¡traduceme!",
"comment-post-notif-premod": "¡traduceme!"
}
}