Merge branch 'i18n-refactor' of ssh://github.com/coralproject/talk into i18n-refactor

This commit is contained in:
Chi Vinh Le
2017-05-24 01:39:09 +07:00
5 changed files with 32 additions and 8 deletions
@@ -85,7 +85,7 @@ export class EditableCommentContent extends React.Component {
} else if (error.networkError) {
addNotification('error', t('error.networkError'));
} else {
addNotification('error', t('editComment.unexpectedError'));
addNotification('error', t('edit_comment.unexpectedError'));
throw error;
}
}
@@ -114,9 +114,9 @@ export class EditableCommentContent extends React.Component {
return (comment.body !== originalBody) && !editWindowExpired;
}}
saveComment={this.editComment}
bodyLabel={t('editComment.bodyInputLabel')}
bodyLabel={t('edit_comment.bodyInputLabel')}
bodyPlaceholder=""
submitText={<span>{t('editComment.saveButton')}</span>}
submitText={<span>{t('edit_comment.save_button')}</span>}
saveButtonCStyle="green"
cancelButtonClicked={this.props.stopEditing}
buttonClass={styles.button}
@@ -126,15 +126,15 @@ export class EditableCommentContent extends React.Component {
{
editWindowExpired
? <span>
{t('editComment.editWindowExpired')}
{t('edit_comment.editWindowExpired')}
{
typeof this.props.stopEditing === 'function'
? <span>&nbsp;<a className={styles.link} onClick={this.props.stopEditing}>{t('editComment.editWindowExpiredClose')}</a></span>
? <span>&nbsp;<a className={styles.link} onClick={this.props.stopEditing}>{t('edit_comment.editWindowExpiredClose')}</a></span>
: null
}
</span>
: <span>
<Icon name="timer"/> {t('editComment.editWindowTimerPrefix')}
<Icon name="timer"/> {t('edit_comment.editWindowTimerPrefix')}
<CountdownSeconds
until={editableUntil}
classNameForMsRemaining={(remainingMs) => (remainingMs <= 10 * 1000) ? styles.editWindowAlmostOver : '' }
@@ -46,7 +46,7 @@ export default class Embed extends React.Component {
<TabBar onChange={this.changeTab} activeTab={activeTab}>
<Tab><Count count={totalCommentCount}/></Tab>
<Tab>{t('framework.my_profile')}</Tab>
<Tab restricted={!can(user, 'UPDATE_CONFIG')}>Configure Stream</Tab>
<Tab restricted={!can(user, 'UPDATE_CONFIG')}>{t('framework.configure_stream')}</Tab>
</TabBar>
{
commentId &&
+3 -1
View File
@@ -4,6 +4,8 @@ import styles from './Comment.css';
import PubDate from '../coral-plugin-pubdate/PubDate';
import Content from '../coral-plugin-commentcontent/CommentContent';
import t from 'coral-framework/services/i18n';
const Comment = (props) => {
return (
<div className={styles.myComment}>
@@ -25,7 +27,7 @@ const Comment = (props) => {
<ul>
<li>
<a onClick={props.link(`${props.asset.url}#${props.comment.id}`)}>
<Icon name="open_in_new" />View Conversation
<Icon name="open_in_new" />{t('view_conversation')}
</a>
</li>
<li>