mirror of
https://github.com/wassname/talk.git
synced 2026-07-20 12:40:47 +08:00
Add missing translations from commentbox.
This commit is contained in:
@@ -14,6 +14,16 @@ comment:
|
||||
ban_user: "Ban User"
|
||||
comment: "Post a comment"
|
||||
flagged: flagged
|
||||
comment_box:
|
||||
post: "Post"
|
||||
cancel: "Cancel"
|
||||
reply: "Reply"
|
||||
comment: "Post a comment"
|
||||
name: "Name"
|
||||
comment_post_notif: "Your comment has been posted."
|
||||
comment_post_notif_premod: "Thank you for posting. Our moderation team will review your comment shortly."
|
||||
comment_post_banned_word: "Your comment contains one or more words that are not permitted, so it will not be published. If you think this message is incorrect, please contact our moderation team."
|
||||
characters_remaining: "characters remaining"
|
||||
comment_is_best: "This comment is one of the best"
|
||||
comment_offensive: "This comment is offensive"
|
||||
comment_plural: Comments
|
||||
|
||||
@@ -14,6 +14,16 @@ comment:
|
||||
ban_user: "Usuario Suspendido"
|
||||
comment: "Publicar un comentario"
|
||||
flagged: reportado
|
||||
comment_box:
|
||||
post: "Publicar"
|
||||
cancel: "Cancelar"
|
||||
reply: "Responder"
|
||||
comment: "Publicar un comentario"
|
||||
name: "Nombre"
|
||||
comment_post_notif: "Tu comentario ha sido publicado."
|
||||
comment_post_notif_premod: "Gracias por el comentario. Nuestro equipo de moderación va a revisarlo muy pronto."
|
||||
comment_post_banned_word: "Tu comentario contiene una o más palabras que no estan permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contacta a nuestro equipo de moderación."
|
||||
characters_remaining: "carácteres restantes"
|
||||
comment_is_best: Este comentario es uno de los mejores
|
||||
comment_offensive: Este comentario es ofensivo
|
||||
comment_plural: Comentarios
|
||||
|
||||
@@ -11,9 +11,9 @@ export const name = 'coral-plugin-commentbox';
|
||||
// if needed
|
||||
export const notifyForNewCommentStatus = (addNotification, status) => {
|
||||
if (status === 'REJECTED') {
|
||||
addNotification('error', lang.t('comment-post-banned-word'));
|
||||
addNotification('error', lang.t('comment_box.comment_post_banned_word'));
|
||||
} else if (status === 'PREMOD') {
|
||||
addNotification('success', lang.t('comment-post-notif-premod'));
|
||||
addNotification('success', lang.t('comment_box.comment_post_notif-premod'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -156,7 +156,7 @@ class CommentBox extends React.Component {
|
||||
key={this.state.postedCount}
|
||||
defaultValue={this.props.defaultValue}
|
||||
bodyInputId={isReply ? 'replyText' : 'commentText'}
|
||||
bodyLabel={isReply ? lang.t('reply') : lang.t('comment.comment')}
|
||||
bodyLabel={isReply ? lang.t('comment_box.reply') : lang.t('comment.comment')}
|
||||
maxCharCount={maxCharCount}
|
||||
charCountEnable={this.props.charCountEnable}
|
||||
bodyPlaceholder={lang.t('comment.comment')}
|
||||
|
||||
@@ -2,12 +2,11 @@ import React, {PropTypes} from 'react';
|
||||
import {Button} from 'coral-ui';
|
||||
import classnames from 'classnames';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
import Slot from 'coral-framework/components/Slot';
|
||||
|
||||
import {name} from './CommentBox';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
/**
|
||||
* Common UI for Creating or Editing a Comment
|
||||
@@ -56,9 +55,9 @@ export class CommentForm extends React.Component {
|
||||
}
|
||||
static get defaultProps() {
|
||||
return {
|
||||
bodyLabel: lang.t('comment'),
|
||||
bodyPlaceholder: lang.t('comment'),
|
||||
submitText: lang.t('post'),
|
||||
bodyLabel: lang.t('comment_box.comment'),
|
||||
bodyPlaceholder: lang.t('comment_box.comment'),
|
||||
submitText: lang.t('comment_box.post'),
|
||||
saveButtonCStyle: 'darkGrey',
|
||||
saveCommentEnabled: () => true,
|
||||
};
|
||||
@@ -109,7 +108,7 @@ export class CommentForm extends React.Component {
|
||||
{
|
||||
this.props.charCountEnable &&
|
||||
<div className={`${name}-char-count ${length > maxCharCount ? `${name}-char-max` : ''}`}>
|
||||
{maxCharCount && `${maxCharCount - length} ${lang.t('characters-remaining')}`}
|
||||
{maxCharCount && `${maxCharCount - length} ${lang.t('comment_box.characters_remaining')}`}
|
||||
</div>
|
||||
}
|
||||
<div className={`${name}-button-container`}>
|
||||
@@ -120,7 +119,7 @@ export class CommentForm extends React.Component {
|
||||
cStyle='darkGrey'
|
||||
className={classnames(`${name}-cancel-button`, buttonClass)}
|
||||
onClick={this.props.cancelButtonClicked}>
|
||||
{lang.t('cancel')}
|
||||
{lang.t('comment_box.cancel')}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"en": {
|
||||
"post": "Post",
|
||||
"cancel": "Cancel",
|
||||
"reply": "Reply",
|
||||
"comment": "Post a comment",
|
||||
"name": "Name",
|
||||
"comment-post-notif": "Your comment has been posted.",
|
||||
"comment-post-notif-premod": "Thank you for posting. Our moderation team will review your comment shortly.",
|
||||
"comment-post-banned-word": "Your comment contains one or more words that are not permitted, so it will not be published. If you think this message is incorrect, please contact our moderation team.",
|
||||
"characters-remaining": " characters remaining"
|
||||
},
|
||||
"es": {
|
||||
"post": "Publicar",
|
||||
"cancel": "Cancelar",
|
||||
"reply": "Responder",
|
||||
"comment": "Publicar un comentario",
|
||||
"name": "Nombre",
|
||||
"comment-post-notif": "Tu comentario ha sido publicado.",
|
||||
"comment-post-notif-premod": "Gracias por el comentario. Nuestro equipo de moderación va a revisarlo muy pronto.",
|
||||
"comment-post-banned-word": "Tu comentario contiene una o más palabras que no estan permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contacta a nuestro equipo de moderación.",
|
||||
"characters-remaining": "carácteres restantes"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user