This commit is contained in:
Toby Zerner 2015-10-02 17:44:30 +09:30
commit 8a5eb9cd42
39 changed files with 122 additions and 122 deletions

View File

@ -62,7 +62,7 @@ export default class AvatarEditor extends Component {
items.add('upload',
Button.component({
icon: 'upload',
children: app.trans('core.user_avatar_upload_button'),
children: app.trans('core.forum.user_avatar_upload_button'),
onclick: this.upload.bind(this)
})
);
@ -70,7 +70,7 @@ export default class AvatarEditor extends Component {
items.add('remove',
Button.component({
icon: 'times',
children: app.trans('core.user_avatar_remove_button'),
children: app.trans('core.forum.user_avatar_remove_button'),
onclick: this.remove.bind(this)
})
);

View File

@ -29,7 +29,7 @@ export default class ChangeEmailModal extends Modal {
}
title() {
return app.trans('core.change_email_title');
return app.trans('core.forum.change_email_title');
}
content() {
@ -37,10 +37,10 @@ export default class ChangeEmailModal extends Modal {
return (
<div className="Modal-body">
<div className="Form Form--centered">
<p className="helpText">{app.trans('core.change_email_confirmation_message', {email: <strong>{this.email()}</strong>})}</p>
<p className="helpText">{app.trans('core.forum.change_email_confirmation_message', {email: <strong>{this.email()}</strong>})}</p>
<div className="Form-group">
<Button className="Button Button--primary Button--block" onclick={this.hide.bind(this)}>
{app.trans('core.change_email_dismiss_button')}
{app.trans('core.forum.change_email_dismiss_button')}
</Button>
</div>
</div>
@ -63,7 +63,7 @@ export default class ChangeEmailModal extends Modal {
className: 'Button Button--primary Button--block',
type: 'submit',
loading: this.loading,
children: app.trans('core.change_email_submit_button')
children: app.trans('core.forum.change_email_submit_button')
})}
</div>
</div>

View File

@ -11,20 +11,20 @@ export default class ChangePasswordModal extends Modal {
}
title() {
return app.trans('core.change_password_title');
return app.trans('core.forum.change_password_title');
}
content() {
return (
<div className="Modal-body">
<div className="Form Form--centered">
<p className="helpText">{app.trans('core.change_password_text')}</p>
<p className="helpText">{app.trans('core.forum.change_password_text')}</p>
<div className="Form-group">
{Button.component({
className: 'Button Button--primary Button--block',
type: 'submit',
loading: this.loading,
children: app.trans('core.change_password_send_button')
children: app.trans('core.forum.change_password_send_button')
})}
</div>
</div>

View File

@ -460,28 +460,28 @@ class Composer extends Component {
if (this.position === Composer.PositionEnum.FULLSCREEN) {
items.add('exitFullScreen', ComposerButton.component({
icon: 'compress',
title: app.trans('core.composer_exit_full_screen_tooltip'),
title: app.trans('core.forum.composer_exit_full_screen_tooltip'),
onclick: this.exitFullScreen.bind(this)
}));
} else {
if (this.position !== Composer.PositionEnum.MINIMIZED) {
items.add('minimize', ComposerButton.component({
icon: 'minus minimize',
title: app.trans('core.composer_minimize_tooltip'),
title: app.trans('core.forum.composer_minimize_tooltip'),
onclick: this.minimize.bind(this),
itemClassName: 'App-backControl'
}));
items.add('fullScreen', ComposerButton.component({
icon: 'expand',
title: app.trans('core.composer_full_screen_tooltip'),
title: app.trans('core.forum.composer_full_screen_tooltip'),
onclick: this.fullScreen.bind(this)
}));
}
items.add('close', ComposerButton.component({
icon: 'times',
title: app.trans('core.composer_close_tooltip'),
title: app.trans('core.forum.composer_close_tooltip'),
onclick: this.close.bind(this)
}));
}

View File

@ -27,10 +27,10 @@ export default class DiscussionComposer extends ComposerBody {
static initProps(props) {
super.initProps(props);
props.placeholder = props.placeholder || extractText(app.trans('core.composer_discussion_body_placeholder'));
props.submitLabel = props.submitLabel || app.trans('core.composer_discussion_submit_button');
props.confirmExit = props.confirmExit || extractText(app.trans('core.composer_discussion_discard_confirmation'));
props.titlePlaceholder = props.titlePlaceholder || extractText(app.trans('core.composer_discussion_title_placeholder'));
props.placeholder = props.placeholder || extractText(app.trans('core.forum.composer_discussion_body_placeholder'));
props.submitLabel = props.submitLabel || app.trans('core.forum.composer_discussion_submit_button');
props.confirmExit = props.confirmExit || extractText(app.trans('core.forum.composer_discussion_discard_confirmation'));
props.titlePlaceholder = props.titlePlaceholder || extractText(app.trans('core.forum.composer_discussion_title_placeholder'));
}
headerItems() {

View File

@ -48,7 +48,7 @@ export default class DiscussionList extends Component {
loading = LoadingIndicator.component();
} else if (this.moreResults) {
loading = Button.component({
children: app.trans('core.discussion_list_load_more_button'),
children: app.trans('core.forum.discussion_list_load_more_button'),
className: 'Button',
onclick: this.loadMore.bind(this)
});

View File

@ -87,7 +87,7 @@ export default class DiscussionListItem extends Component {
<div className={'DiscussionListItem-content Slidable-content' + (isUnread ? ' unread' : '') + (isRead ? ' read' : '')}>
<a href={startUser ? app.route.user(startUser) : '#'}
className="DiscussionListItem-author"
title={extractText(app.trans('core.discussion_list_started_text', {user: startUser, ago: humanTime(discussion.startTime())}))}
title={extractText(app.trans('core.forum.discussion_list_started_text', {user: startUser, ago: humanTime(discussion.startTime())}))}
config={function(element) {
$(element).tooltip({placement: 'right'});
m.route.apply(this, arguments);
@ -108,7 +108,7 @@ export default class DiscussionListItem extends Component {
<span className="DiscussionListItem-count"
onclick={this.markAsRead.bind(this)}
title={showUnread ? app.trans('core.discussion_list_mark_as_read_tooltip') : ''}>
title={showUnread ? app.trans('core.forum.discussion_list_mark_as_read_tooltip') : ''}>
{abbreviateNumber(discussion[showUnread ? 'unreadCount' : 'repliesCount']())}
</span>

View File

@ -20,6 +20,6 @@ export default class DiscussionRenamedNotification extends Notification {
}
content() {
return app.trans('core.notifications_discussion_renamed_text', {user: this.props.notification.sender()});
return app.trans('core.forum.notifications_discussion_renamed_text', {user: this.props.notification.sender()});
}
}

View File

@ -14,7 +14,7 @@ export default class DiscussionRenamedPost extends EventPost {
}
descriptionKey() {
return 'core.post_stream_discussion_renamed_text';
return 'core.forum.post_stream_discussion_renamed_text';
}
descriptionData() {

View File

@ -28,11 +28,11 @@ export default class DiscussionsSearchSource {
const results = this.results[query] || [];
return [
<li className="Dropdown-header">{app.trans('core.search_discussions_heading')}</li>,
<li className="Dropdown-header">{app.trans('core.forum.search_discussions_heading')}</li>,
<li>
{LinkButton.component({
icon: 'search',
children: app.trans('core.search_all_discussions_button', {query}),
children: app.trans('core.forum.search_all_discussions_button', {query}),
href: app.route('index', {q: query})
})}
</li>,

View File

@ -23,8 +23,8 @@ export default class EditPostComposer extends ComposerBody {
static initProps(props) {
super.initProps(props);
props.submitLabel = props.submitLabel || app.trans('core.composer_edit_submit_button');
props.confirmExit = props.confirmExit || app.trans('core.composer_edit_discard_confirmation');
props.submitLabel = props.submitLabel || app.trans('core.forum.composer_edit_submit_button');
props.confirmExit = props.confirmExit || app.trans('core.forum.composer_edit_discard_confirmation');
props.originalContent = props.originalContent || props.post.content();
props.user = props.user || props.post.user();
@ -39,7 +39,7 @@ export default class EditPostComposer extends ComposerBody {
<h3>
{icon('pencil')}{' '}
<a href={app.route.discussion(post.discussion(), post.number())} config={m.route}>
{app.trans('core.composer_edit_post_link', {number: post.number(), discussion: post.discussion().title()})}
{app.trans('core.forum.composer_edit_post_link', {number: post.number(), discussion: post.discussion().title()})}
</a>
</h3>
));

View File

@ -38,7 +38,7 @@ export default class EditUserModal extends Modal {
<div className="Form">
<div className="Form-group">
<label>Username</label>
<input className="FormControl" placeholder={extractText(app.trans('core.edit_user_username_label'))}
<input className="FormControl" placeholder={extractText(app.trans('core.forum.edit_user_username_label'))}
value={this.username()}
onchange={m.withAttr('value', this.username)} />
</div>
@ -46,7 +46,7 @@ export default class EditUserModal extends Modal {
<div className="Form-group">
<label>Email</label>
<div>
<input className="FormControl" placeholder={extractText(app.trans('core.edit_user_email_label'))}
<input className="FormControl" placeholder={extractText(app.trans('core.forum.edit_user_email_label'))}
value={this.email()}
onchange={m.withAttr('value', this.email)} />
</div>
@ -65,7 +65,7 @@ export default class EditUserModal extends Modal {
Set new password
</label>
{this.setPassword() ? (
<input className="FormControl" type="password" name="password" placeholder={extractText(app.trans('core.edit_user_password_label'))}
<input className="FormControl" type="password" name="password" placeholder={extractText(app.trans('core.forum.edit_user_password_label'))}
value={this.password()}
onchange={m.withAttr('value', this.password)} />
) : ''}
@ -94,7 +94,7 @@ export default class EditUserModal extends Modal {
className: 'Button Button--primary',
type: 'submit',
loading: this.loading,
children: app.trans('core.edit_user_submit_button')
children: app.trans('core.forum.edit_user_submit_button')
})}
</div>
</div>

View File

@ -35,7 +35,7 @@ export default class ForgotPasswordModal extends Modal {
}
title() {
return app.trans('core.forgot_password_title');
return app.trans('core.forum.forgot_password_title');
}
content() {
@ -43,10 +43,10 @@ export default class ForgotPasswordModal extends Modal {
return (
<div className="Modal-body">
<div className="Form Form--centered">
<p className="helpText">{app.trans('core.forgot_password_email_sent_message')}</p>
<p className="helpText">{app.trans('core.forum.forgot_password_email_sent_message')}</p>
<div className="Form-group">
<Button className="Button Button--primary Button--block" onclick={this.hide.bind(this)}>
{app.trans('core.forgot_password_dismiss_button')}
{app.trans('core.forum.forgot_password_dismiss_button')}
</Button>
</div>
</div>
@ -57,9 +57,9 @@ export default class ForgotPasswordModal extends Modal {
return (
<div className="Modal-body">
<div className="Form Form--centered">
<p className="helpText">{app.trans('core.forgot_password_text')}</p>
<p className="helpText">{app.trans('core.forum.forgot_password_text')}</p>
<div className="Form-group">
<input className="FormControl" name="email" type="email" placeholder={extractText(app.trans('core.forgot_password_email_placeholder'))}
<input className="FormControl" name="email" type="email" placeholder={extractText(app.trans('core.forum.forgot_password_email_placeholder'))}
value={this.email()}
onchange={m.withAttr('value', this.email)}
disabled={this.loading} />
@ -69,7 +69,7 @@ export default class ForgotPasswordModal extends Modal {
className: 'Button Button--primary Button--block',
type: 'submit',
loading: this.loading,
children: app.trans('core.forgot_password_submit_button')
children: app.trans('core.forum.forgot_password_submit_button')
})}
</div>
</div>

View File

@ -64,7 +64,7 @@ export default class HeaderSecondary extends Component {
if (app.forum.attribute('allowSignUp')) {
items.add('signUp',
Button.component({
children: app.trans('core.header_sign_up_link'),
children: app.trans('core.forum.header_sign_up_link'),
className: 'Button Button--link',
onclick: () => app.modal.show(new SignUpModal())
}), 10
@ -73,7 +73,7 @@ export default class HeaderSecondary extends Component {
items.add('logIn',
Button.component({
children: app.trans('core.header_log_in_link'),
children: app.trans('core.forum.header_log_in_link'),
className: 'Button Button--link',
onclick: () => app.modal.show(new LogInModal())
}), 0

View File

@ -147,7 +147,7 @@ export default class IndexPage extends Page {
items.add('newDiscussion',
Button.component({
children: app.trans(canStartDiscussion ? 'core.index_start_discussion_button' : 'core.index_cannot_start_discussion_button'),
children: app.trans(canStartDiscussion ? 'core.forum.index_start_discussion_button' : 'core.forum.index_cannot_start_discussion_button'),
icon: 'edit',
className: 'Button Button--primary IndexPage-newDiscussion',
itemClassName: 'App-primaryControl',
@ -180,7 +180,7 @@ export default class IndexPage extends Page {
items.add('allDiscussions',
LinkButton.component({
href: app.route('index', params),
children: app.trans('core.index_all_discussions_link'),
children: app.trans('core.forum.index_all_discussions_link'),
icon: 'comments-o'
}),
100
@ -201,7 +201,7 @@ export default class IndexPage extends Page {
const sortOptions = {};
for (const i in app.cache.discussionList.sortMap()) {
sortOptions[i] = app.trans('core.index_sort_' + i + '_button');
sortOptions[i] = app.trans('core.forum.index_sort_' + i + '_button');
}
items.add('sort',
@ -226,7 +226,7 @@ export default class IndexPage extends Page {
items.add('refresh',
Button.component({
title: app.trans('core.index_refresh_tooltip'),
title: app.trans('core.forum.index_refresh_tooltip'),
icon: 'refresh',
className: 'Button Button--icon',
onclick: () => app.cache.discussionList.refresh()
@ -236,7 +236,7 @@ export default class IndexPage extends Page {
if (app.session.user) {
items.add('markAllAsRead',
Button.component({
title: app.trans('core.index_mark_all_as_read_tooltip'),
title: app.trans('core.forum.index_mark_all_as_read_tooltip'),
icon: 'check',
className: 'Button Button--icon',
onclick: this.markAllAsRead.bind(this)

View File

@ -38,7 +38,7 @@ export default class LogInModal extends Modal {
}
title() {
return app.trans('core.log_in_title');
return app.trans('core.forum.log_in_title');
}
content() {
@ -48,14 +48,14 @@ export default class LogInModal extends Modal {
<div className="Form Form--centered">
<div className="Form-group">
<input className="FormControl" name="email" placeholder={extractText(app.trans('core.log_in_username_or_email_placeholder'))}
<input className="FormControl" name="email" placeholder={extractText(app.trans('core.forum.log_in_username_or_email_placeholder'))}
value={this.email()}
onchange={m.withAttr('value', this.email)}
disabled={this.loading} />
</div>
<div className="Form-group">
<input className="FormControl" name="password" type="password" placeholder={extractText(app.trans('core.log_in_password_placeholder'))}
<input className="FormControl" name="password" type="password" placeholder={extractText(app.trans('core.forum.log_in_password_placeholder'))}
value={this.password()}
onchange={m.withAttr('value', this.password)}
disabled={this.loading} />
@ -66,20 +66,20 @@ export default class LogInModal extends Modal {
className: 'Button Button--primary Button--block',
type: 'submit',
loading: this.loading,
children: app.trans('core.log_in_submit_button')
children: app.trans('core.forum.log_in_submit_button')
})}
</div>
</div>
</div>,
<div className="Modal-footer">
<p className="LogInModal-forgotPassword">
<a onclick={this.forgotPassword.bind(this)}>{app.trans('core.log_in_forgot_password_link')}</a>
<a onclick={this.forgotPassword.bind(this)}>{app.trans('core.forum.log_in_forgot_password_link')}</a>
</p>
{app.forum.attribute('allowSignUp') ? (
<p className="LogInModal-signUp">
{app.trans('core.log_in_no_account_text')}
<a onclick={this.signUp.bind(this)}>{app.trans('core.log_in_sign_up_link')}</a>
{app.trans('core.forum.log_in_no_account_text')}
<a onclick={this.signUp.bind(this)}>{app.trans('core.forum.log_in_sign_up_link')}</a>
</p>
) : ''}
</div>
@ -132,12 +132,12 @@ export default class LogInModal extends Modal {
if (response && response.code === 'confirm_email') {
this.alert = Alert.component({
children: app.trans('core.log_in_confirmation_required_message', {email: response.email})
children: app.trans('core.forum.log_in_confirmation_required_message', {email: response.email})
});
} else {
this.alert = Alert.component({
type: 'error',
children: app.trans('core.log_in_invalid_login_message')
children: app.trans('core.forum.log_in_invalid_login_message')
});
}

View File

@ -21,8 +21,8 @@ export default class NotificationGrid extends Component {
* @type {Array}
*/
this.methods = [
{name: 'alert', icon: 'bell', label: app.trans('core.settings_notify_by_web_heading')},
{name: 'email', icon: 'envelope-o', label: app.trans('core.settings_notify_by_email_heading')}
{name: 'alert', icon: 'bell', label: app.trans('core.forum.settings_notify_by_web_heading')},
{name: 'email', icon: 'envelope-o', label: app.trans('core.forum.settings_notify_by_email_heading')}
];
/**
@ -182,7 +182,7 @@ export default class NotificationGrid extends Component {
items.add('discussionRenamed', {
name: 'discussionRenamed',
icon: 'pencil',
label: app.trans('core.settings_notify_discussion_renamed_label')
label: app.trans('core.forum.settings_notify_discussion_renamed_label')
});
return items;

View File

@ -59,12 +59,12 @@ export default class NotificationList extends Component {
{Button.component({
className: 'Button Button--icon Button--link',
icon: 'check',
title: app.trans('core.notifications_mark_all_as_read_tooltip'),
title: app.trans('core.forum.notifications_mark_all_as_read_tooltip'),
onclick: this.markAllAsRead.bind(this)
})}
</div>
<h4 className="App-titleControl App-titleControl--text">{app.trans('core.notifications_title')}</h4>
<h4 className="App-titleControl App-titleControl--text">{app.trans('core.forum.notifications_title')}</h4>
</div>
<div className="NotificationList-content">
@ -98,7 +98,7 @@ export default class NotificationList extends Component {
);
})
: !this.loading
? <div className="NotificationList-empty">{app.trans('core.notifications_empty_text')}</div>
? <div className="NotificationList-empty">{app.trans('core.forum.notifications_empty_text')}</div>
: LoadingIndicator.component({className: 'LoadingIndicator--block'})}
</div>
</div>

View File

@ -7,7 +7,7 @@ export default class NotificationsDropdown extends Dropdown {
props.className = props.className || 'NotificationsDropdown';
props.buttonClassName = props.buttonClassName || 'Button Button--flat';
props.menuClassName = props.menuClassName || 'Dropdown-menu--right';
props.label = props.label || app.trans('core.notifications_tooltip');
props.label = props.label || app.trans('core.forum.notifications_tooltip');
props.icon = props.icon || 'bell';
super.initProps(props);

View File

@ -15,7 +15,7 @@ export default class PostEdited extends Component {
view() {
const post = this.props.post;
const editUser = post.editUser();
const title = extractText(app.trans('core.post_edited_tooltip', {user: editUser, ago: humanTime(post.editTime())}));
const title = extractText(app.trans('core.forum.post_edited_tooltip', {user: editUser, ago: humanTime(post.editTime())}));
return (
<span className="PostEdited" title={title}>{icon('pencil')}</span>

View File

@ -33,7 +33,7 @@ export default class PostMeta extends Component {
</a>
<div className="Dropdown-menu dropdown-menu">
<span className="PostMeta-number">{app.trans('core.post_number_tooltip', {number: post.number()})}</span>{' '}
<span className="PostMeta-number">{app.trans('core.forum.post_number_tooltip', {number: post.number()})}</span>{' '}
{fullTime(time)}
{touch
? <a className="Button PostMeta-permalink" href={permalink}>{permalink}</a>

View File

@ -221,7 +221,7 @@ class PostStream extends mixin(Component, evented) {
if (dt > 1000 * 60 * 60 * 24 * 4) {
content = [
<div className="PostStream-timeGap">
<span>{app.trans('core.post_stream_time_lapsed_text', {period: moment.duration(dt).humanize()})}</span>
<span>{app.trans('core.forum.post_stream_time_lapsed_text', {period: moment.duration(dt).humanize()})}</span>
</div>,
content
];

View File

@ -71,7 +71,7 @@ export default class PostStreamScrubber extends Component {
const unreadCount = this.props.stream.discussion.unreadCount();
const unreadPercent = Math.min(this.count() - this.index, unreadCount) / this.count();
const viewing = app.trans('core.post_scrubber_viewing_text', {
const viewing = app.trans('core.forum.post_scrubber_viewing_text', {
index: <span className="Scrubber-index">{retain || formatNumber(this.visibleIndex())}</span>,
count: <span className="Scrubber-count">{formatNumber(this.count())}</span>
});
@ -101,7 +101,7 @@ export default class PostStreamScrubber extends Component {
<div className="Dropdown-menu dropdown-menu">
<div className="Scrubber">
<a className="Scrubber-first" onclick={this.goToFirst.bind(this)}>
{icon('angle-double-up')} {app.trans('core.post_scrubber_original_post_link')}
{icon('angle-double-up')} {app.trans('core.forum.post_scrubber_original_post_link')}
</a>
<div className="Scrubber-scrollbar">
@ -116,12 +116,12 @@ export default class PostStreamScrubber extends Component {
<div className="Scrubber-after"/>
<div className="Scrubber-unread" config={styleUnread}>
{app.trans('core.post_scrubber_unread_text', {count: unreadCount})}
{app.trans('core.forum.post_scrubber_unread_text', {count: unreadCount})}
</div>
</div>
<a className="Scrubber-last" onclick={this.goToLast.bind(this)}>
{icon('angle-double-down')} {app.trans('core.post_scrubber_now_link')}
{icon('angle-double-down')} {app.trans('core.forum.post_scrubber_now_link')}
</a>
</div>
</div>

View File

@ -51,7 +51,7 @@ export default class PostsUserPage extends UserPage {
footer = (
<div className="PostsUserPage-loadMore">
{Button.component({
children: app.trans('core.user_posts_load_more_button'),
children: app.trans('core.forum.user_posts_load_more_button'),
className: 'Button',
onclick: this.loadMore.bind(this)
})}

View File

@ -25,9 +25,9 @@ export default class ReplyComposer extends ComposerBody {
static initProps(props) {
super.initProps(props);
props.placeholder = props.placeholder || extractText(app.trans('core.composer_reply_body_placeholder'));
props.submitLabel = props.submitLabel || app.trans('core.composer_reply_submit_button');
props.confirmExit = props.confirmExit || extractText(app.trans('core.composer_reply_discard_confirmation'));
props.placeholder = props.placeholder || extractText(app.trans('core.forum.composer_reply_body_placeholder'));
props.submitLabel = props.submitLabel || app.trans('core.forum.composer_reply_submit_button');
props.confirmExit = props.confirmExit || extractText(app.trans('core.forum.composer_reply_discard_confirmation'));
}
headerItems() {
@ -76,7 +76,7 @@ export default class ReplyComposer extends ComposerBody {
let alert;
const viewButton = Button.component({
className: 'Button Button--link',
children: app.trans('core.composer_reply_view_button'),
children: app.trans('core.forum.composer_reply_view_button'),
onclick: () => {
m.route(app.route.post(post));
app.alerts.dismiss(alert);
@ -85,7 +85,7 @@ export default class ReplyComposer extends ComposerBody {
app.alerts.show(
alert = new Alert({
type: 'success',
message: app.trans('core.composer_reply_posted_message'),
message: app.trans('core.forum.composer_reply_posted_message'),
controls: [viewButton]
})
);

View File

@ -44,7 +44,7 @@ export default class ReplyPlaceholder extends Component {
<article className="Post ReplyPlaceholder" onclick={reply} onmousedown={triggerClick}>
<header className="Post-header">
{avatar(app.session.user, {className: 'PostUser-avatar'})}{' '}
{app.trans('core.post_stream_reply_placeholder')}
{app.trans('core.forum.post_stream_reply_placeholder')}
</header>
</article>
);

View File

@ -84,7 +84,7 @@ export default class Search extends Component {
})}>
<div className="Search-input">
<input className="FormControl"
placeholder={extractText(app.trans('core.header_search_placeholder'))}
placeholder={extractText(app.trans('core.forum.header_search_placeholder'))}
value={this.value()}
oninput={m.withAttr('value', this.value)}
onfocus={() => this.hasFocus = true}

View File

@ -47,7 +47,7 @@ export default class SessionDropdown extends Dropdown {
items.add('profile',
LinkButton.component({
icon: 'user',
children: app.trans('core.header_profile_button'),
children: app.trans('core.forum.header_profile_button'),
href: app.route.user(user)
}),
100
@ -56,7 +56,7 @@ export default class SessionDropdown extends Dropdown {
items.add('settings',
LinkButton.component({
icon: 'cog',
children: app.trans('core.header_settings_button'),
children: app.trans('core.forum.header_settings_button'),
href: app.route('settings')
}),
50
@ -66,7 +66,7 @@ export default class SessionDropdown extends Dropdown {
items.add('administration',
LinkButton.component({
icon: 'wrench',
children: app.trans('core.header_admin_button'),
children: app.trans('core.forum.header_admin_button'),
href: app.forum.attribute('baseUrl') + '/admin',
target: '_blank',
config: () => {}
@ -80,7 +80,7 @@ export default class SessionDropdown extends Dropdown {
items.add('logOut',
Button.component({
icon: 'sign-out',
children: app.trans('core.header_log_out_button'),
children: app.trans('core.forum.header_log_out_button'),
onclick: app.session.logout.bind(app.session)
}),
-100

View File

@ -17,7 +17,7 @@ export default class SettingsPage extends UserPage {
super(...args);
this.show(app.session.user);
app.setTitle(app.trans('core.settings_title'));
app.setTitle(app.trans('core.forum.settings_title'));
}
content() {
@ -38,7 +38,7 @@ export default class SettingsPage extends UserPage {
items.add('account',
FieldSet.component({
label: app.trans('core.settings_account_heading'),
label: app.trans('core.forum.settings_account_heading'),
className: 'Settings-account',
children: this.accountItems().toArray()
})
@ -46,7 +46,7 @@ export default class SettingsPage extends UserPage {
items.add('notifications',
FieldSet.component({
label: app.trans('core.settings_notifications_heading'),
label: app.trans('core.forum.settings_notifications_heading'),
className: 'Settings-notifications',
children: [NotificationGrid.component({user: this.user})]
})
@ -54,7 +54,7 @@ export default class SettingsPage extends UserPage {
items.add('privacy',
FieldSet.component({
label: app.trans('core.settings_privacy_heading'),
label: app.trans('core.forum.settings_privacy_heading'),
className: 'Settings-privacy',
children: this.privacyItems().toArray()
})
@ -73,7 +73,7 @@ export default class SettingsPage extends UserPage {
items.add('changePassword',
Button.component({
children: app.trans('core.settings_change_password_button'),
children: app.trans('core.forum.settings_change_password_button'),
className: 'Button',
onclick: () => app.modal.show(new ChangePasswordModal())
})
@ -81,7 +81,7 @@ export default class SettingsPage extends UserPage {
items.add('changeEmail',
Button.component({
children: app.trans('core.settings_change_email_button'),
children: app.trans('core.forum.settings_change_email_button'),
className: 'Button',
onclick: () => app.modal.show(new ChangeEmailModal())
})
@ -118,7 +118,7 @@ export default class SettingsPage extends UserPage {
items.add('discloseOnline',
Switch.component({
children: app.trans('core.settings_privacy_disclose_online_label'),
children: app.trans('core.forum.settings_privacy_disclose_online_label'),
state: this.user.preferences().discloseOnline,
onchange: (value, component) => {
this.user.pushAttributes({lastSeenTime: null});

View File

@ -53,7 +53,7 @@ export default class SignUpModal extends Modal {
}
title() {
return app.trans('core.sign_up_title');
return app.trans('core.forum.sign_up_title');
}
content() {
@ -73,14 +73,14 @@ export default class SignUpModal extends Modal {
<div className="Form Form--centered">
<div className="Form-group">
<input className="FormControl" name="username" placeholder={extractText(app.trans('core.sign_up_username_placeholder'))}
<input className="FormControl" name="username" placeholder={extractText(app.trans('core.forum.sign_up_username_placeholder'))}
value={this.username()}
onchange={m.withAttr('value', this.username)}
disabled={this.loading} />
</div>
<div className="Form-group">
<input className="FormControl" name="email" type="email" placeholder={extractText(app.trans('core.sign_up_email_placeholder'))}
<input className="FormControl" name="email" type="email" placeholder={extractText(app.trans('core.forum.sign_up_email_placeholder'))}
value={this.email()}
onchange={m.withAttr('value', this.email)}
disabled={this.loading || (this.props.token && this.props.email)} />
@ -88,7 +88,7 @@ export default class SignUpModal extends Modal {
{this.props.token ? '' : (
<div className="Form-group">
<input className="FormControl" name="password" type="password" placeholder={extractText(app.trans('core.sign_up_password_placeholder'))}
<input className="FormControl" name="password" type="password" placeholder={extractText(app.trans('core.forum.sign_up_password_placeholder'))}
value={this.password()}
onchange={m.withAttr('value', this.password)}
disabled={this.loading} />
@ -100,7 +100,7 @@ export default class SignUpModal extends Modal {
className="Button Button--primary Button--block"
type="submit"
loading={this.loading}>
{app.trans('core.sign_up_submit_button')}
{app.trans('core.forum.sign_up_submit_button')}
</Button>
</div>
</div>
@ -119,13 +119,13 @@ export default class SignUpModal extends Modal {
<div className="darkenBackground">
<div className="container">
{avatar(user)}
<h3>{app.trans('core.sign_up_welcome_text', {user})}</h3>
<h3>{app.trans('core.forum.sign_up_welcome_text', {user})}</h3>
<p>{app.trans('core.sign_up_confirmation_message', {email: <strong>{user.email()}</strong>})}</p>
<p>{app.trans('core.forum.sign_up_confirmation_message', {email: <strong>{user.email()}</strong>})}</p>
<p>
<Button className="Button Button--primary" onclick={this.hide.bind(this)}>
{app.trans('core.sign_up_dismiss_button')}
{app.trans('core.forum.sign_up_dismiss_button')}
</Button>
</p>
</div>
@ -140,8 +140,8 @@ export default class SignUpModal extends Modal {
footer() {
return [
<p className="SignUpModal-logIn">
{app.trans('core.sign_up_already_have_account_text')}
<a onclick={this.logIn.bind(this)}>{app.trans('core.sign_up_log_in_link')}</a>
{app.trans('core.forum.sign_up_already_have_account_text')}
<a onclick={this.logIn.bind(this)}>{app.trans('core.forum.sign_up_log_in_link')}</a>
</p>
];
}

View File

@ -21,7 +21,7 @@ export default class TerminalPost extends Component {
return (
<span>
{lastPost ? icon('reply') : ''}{' '}
{app.trans('core.discussion_list_' + (lastPost ? 'replied' : 'started') + '_text', {
{app.trans('core.forum.discussion_list_' + (lastPost ? 'replied' : 'started') + '_text', {
user,
ago: humanTime(time)
})}

View File

@ -31,7 +31,7 @@ export default class UserBio extends Component {
let content;
if (this.editing) {
content = <textarea className="FormControl" placeholder={extractText(app.trans('core.user_bio_placeholder'))} rows="3" value={user.bio()}/>;
content = <textarea className="FormControl" placeholder={extractText(app.trans('core.forum.user_bio_placeholder'))} rows="3" value={user.bio()}/>;
} else {
let subContent;
@ -43,7 +43,7 @@ export default class UserBio extends Component {
if (bioHtml) {
subContent = m.trust(bioHtml);
} else if (this.props.editable) {
subContent = <p className="UserBio-placeholder">{app.trans('core.user_bio_placeholder')}</p>;
subContent = <p className="UserBio-placeholder">{app.trans('core.forum.user_bio_placeholder')}</p>;
}
}

View File

@ -40,7 +40,7 @@ export default class UserCard extends Component {
className: 'UserCard-controls App-primaryControl',
menuClassName: 'Dropdown-menu--right',
buttonClassName: this.props.controlsButtonClassName,
label: app.trans('core.user_controls_button'),
label: app.trans('core.forum.user_controls_button'),
icon: 'ellipsis-v'
}) : ''}
@ -95,13 +95,13 @@ export default class UserCard extends Component {
items.add('lastSeen', (
<span className={'UserCard-lastSeen' + (online ? ' online' : '')}>
{online
? [icon('circle'), ' ', app.trans('core.user_online_text')]
? [icon('circle'), ' ', app.trans('core.forum.user_online_text')]
: [icon('clock-o'), ' ', humanTime(lastSeenTime)]}
</span>
));
}
items.add('joined', app.trans('core.user_joined_date_text', {ago: humanTime(user.joinTime())}));
items.add('joined', app.trans('core.forum.user_joined_date_text', {ago: humanTime(user.joinTime())}));
return items;
}

View File

@ -131,7 +131,7 @@ export default class UserPage extends Page {
items.add('posts',
LinkButton.component({
href: app.route('user.posts', {username: user.username()}),
children: [app.trans('core.user_posts_link'), <span className="Button-badge">{user.commentsCount()}</span>],
children: [app.trans('core.forum.user_posts_link'), <span className="Button-badge">{user.commentsCount()}</span>],
icon: 'comment-o'
})
);
@ -139,7 +139,7 @@ export default class UserPage extends Page {
items.add('discussions',
LinkButton.component({
href: app.route('user.discussions', {username: user.username()}),
children: [app.trans('core.user_discussions_link'), <span className="Button-badge">{user.discussionsCount()}</span>],
children: [app.trans('core.forum.user_discussions_link'), <span className="Button-badge">{user.discussionsCount()}</span>],
icon: 'reorder'
})
);
@ -149,7 +149,7 @@ export default class UserPage extends Page {
items.add('settings',
LinkButton.component({
href: app.route('settings'),
children: app.trans('core.user_settings_link'),
children: app.trans('core.forum.user_settings_link'),
icon: 'cog'
})
);

View File

@ -22,7 +22,7 @@ export default class UsersSearchResults {
if (!results.length) return '';
return [
<li className="Dropdown-header">{app.trans('core.search_users_heading')}</li>,
<li className="Dropdown-header">{app.trans('core.forum.search_users_heading')}</li>,
results.map(user => (
<li className="UserSearchResult" data-index={'users' + user.id()}>
<a href={app.route.user(user)} config={m.route}>

View File

@ -55,14 +55,14 @@ export default {
!app.session.user || discussion.canReply()
? Button.component({
icon: 'reply',
children: app.trans(app.session.user ? 'core.discussion_controls_reply_button' : 'core.discussion_controls_log_in_to_reply_button'),
children: app.trans(app.session.user ? 'core.forum.discussion_controls_reply_button' : 'core.forum.discussion_controls_log_in_to_reply_button'),
onclick: this.replyAction.bind(discussion, true, false)
})
: Button.component({
icon: 'reply',
children: app.trans('core.discussion_controls_cannot_reply_button'),
children: app.trans('core.forum.discussion_controls_cannot_reply_button'),
className: 'disabled',
title: app.trans('core.discussion_controls_cannot_reply_text')
title: app.trans('core.forum.discussion_controls_cannot_reply_text')
})
);
}
@ -85,7 +85,7 @@ export default {
if (discussion.canRename()) {
items.add('rename', Button.component({
icon: 'pencil',
children: app.trans('core.discussion_controls_rename_button'),
children: app.trans('core.forum.discussion_controls_rename_button'),
onclick: this.renameAction.bind(discussion)
}));
}
@ -109,21 +109,21 @@ export default {
if (discussion.canHide()) {
items.add('hide', Button.component({
icon: 'trash-o',
children: app.trans('core.discussion_controls_delete_button'),
children: app.trans('core.forum.discussion_controls_delete_button'),
onclick: this.hideAction.bind(discussion)
}));
}
} else if (discussion.canDelete()) {
items.add('restore', Button.component({
icon: 'reply',
children: app.trans('core.discussion_controls_restore_button'),
children: app.trans('core.forum.discussion_controls_restore_button'),
onclick: this.restoreAction.bind(discussion),
disabled: discussion.commentsCount() === 0
}));
items.add('delete', Button.component({
icon: 'times',
children: app.trans('core.discussion_controls_delete_forever_button'),
children: app.trans('core.forum.discussion_controls_delete_forever_button'),
onclick: this.deleteAction.bind(discussion)
}));
}
@ -216,7 +216,7 @@ export default {
* @return {Promise}
*/
deleteAction() {
if (confirm(extractText(app.trans('core.discussion_controls_delete_confirmation')))) {
if (confirm(extractText(app.trans('core.forum.discussion_controls_delete_confirmation')))) {
// If there is a discussion list in the cache, remove this discussion.
if (app.cache.discussionList) {
app.cache.discussionList.removeDiscussion(this);
@ -239,7 +239,7 @@ export default {
*/
renameAction() {
const currentTitle = this.title();
const title = prompt(extractText(app.trans('core.discussion_controls_rename_text')), currentTitle);
const title = prompt(extractText(app.trans('core.forum.discussion_controls_rename_text')), currentTitle);
// If the title is different to what it was before, then save it. After the
// save has completed, update the post stream as there will be a new post

View File

@ -60,7 +60,7 @@ export default {
if (!post.isHidden()) {
items.add('edit', Button.component({
icon: 'pencil',
children: app.trans('core.post_controls_edit_button'),
children: app.trans('core.forum.post_controls_edit_button'),
onclick: this.editAction.bind(post)
}));
}
@ -85,7 +85,7 @@ export default {
if (post.canEdit()) {
items.add('hide', Button.component({
icon: 'trash-o',
children: app.trans('core.post_controls_delete_button'),
children: app.trans('core.forum.post_controls_delete_button'),
onclick: this.hideAction.bind(post)
}));
}
@ -93,14 +93,14 @@ export default {
if (post.canEdit()) {
items.add('restore', Button.component({
icon: 'reply',
children: app.trans('core.post_controls_restore_button'),
children: app.trans('core.forum.post_controls_restore_button'),
onclick: this.restoreAction.bind(post)
}));
}
if (post.canDelete() && post.number() !== 1) {
items.add('delete', Button.component({
icon: 'times',
children: app.trans('core.post_controls_delete_forever_button'),
children: app.trans('core.forum.post_controls_delete_forever_button'),
onclick: this.deleteAction.bind(post)
}));
}

View File

@ -60,7 +60,7 @@ export default {
if (user.canEdit()) {
items.add('edit', Button.component({
icon: 'pencil',
children: app.trans('core.user_controls_edit_button'),
children: app.trans('core.forum.user_controls_edit_button'),
onclick: this.editAction.bind(user)
}));
}
@ -83,7 +83,7 @@ export default {
if (user.id() !== '1' && user.canDelete()) {
items.add('delete', Button.component({
icon: 'times',
children: app.trans('core.user_controls_delete_button'),
children: app.trans('core.forum.user_controls_delete_button'),
onclick: this.deleteAction.bind(user)
}));
}

View File

@ -6,7 +6,7 @@
* @return {Object}
*/
export default function username(user) {
const name = (user && user.username()) || app.trans('core.deleted_username');
const name = (user && user.username()) || app.trans('core.forum.user_deleted_text');
return <span className="username">{name}</span>;
}