Extract leftover core strings

Adds app.trans calls for a couple strings in core:
- The "there are no discussions" message in DiscussionList.js
- The user deletion confirmation message in UserControls.js
- Also adds new HTML-style tags to LogInModal.js and SignUpModal.js
This commit is contained in:
dcsjapan 2015-10-06 05:52:03 +09:00
parent 4083b9a33f
commit f53c46f85c
4 changed files with 4 additions and 6 deletions

View File

@ -55,7 +55,7 @@ export default class DiscussionList extends Component {
} }
if (this.discussions.length === 0 && !this.loading) { if (this.discussions.length === 0 && !this.loading) {
const text = 'Looks like there are no discussions here. Why don\'t you create a new one?'; const text = app.trans('core.admin.discussion_list_empty_text');
return ( return (
<div className="DiscussionList"> <div className="DiscussionList">
{Placeholder.component({text})} {Placeholder.component({text})}

View File

@ -78,8 +78,7 @@ export default class LogInModal extends Modal {
{app.forum.attribute('allowSignUp') ? ( {app.forum.attribute('allowSignUp') ? (
<p className="LogInModal-signUp"> <p className="LogInModal-signUp">
{app.trans('core.forum.log_in_no_account_text')} {app.trans('core.forum.log_in_sign_up_text', {a: <a onclick={this.signUp.bind(this)}/>})}
<a onclick={this.signUp.bind(this)}>{app.trans('core.forum.log_in_sign_up_link')}</a>
</p> </p>
) : ''} ) : ''}
</div> </div>

View File

@ -140,8 +140,7 @@ export default class SignUpModal extends Modal {
footer() { footer() {
return [ return [
<p className="SignUpModal-logIn"> <p className="SignUpModal-logIn">
{app.trans('core.forum.sign_up_already_have_account_text')} {app.trans('core.forum.sign_up_log_in_text', {a: <a onclick={this.logIn.bind(this)}/>})}
<a onclick={this.logIn.bind(this)}>{app.trans('core.forum.sign_up_log_in_link')}</a>
</p> </p>
]; ];
} }

View File

@ -95,7 +95,7 @@ export default {
* Delete the user. * Delete the user.
*/ */
deleteAction() { deleteAction() {
if (confirm('Are you sure you want to delete this user? All of the user\'s posts will be deleted.')) { if (confirm(app.trans('core.admin.user_controls_delete_confirmation'))) {
this.delete().then(() => { this.delete().then(() => {
if (app.current instanceof UserPage && app.current.user === this) { if (app.current instanceof UserPage && app.current.user === this) {
app.history.back(); app.history.back();