diff --git a/framework/core/js/forum/src/components/PostStream.js b/framework/core/js/forum/src/components/PostStream.js
index 6e1f4b58d..aa81bbb79 100644
--- a/framework/core/js/forum/src/components/PostStream.js
+++ b/framework/core/js/forum/src/components/PostStream.js
@@ -205,7 +205,7 @@ class PostStream extends mixin(Component, evented) {
if (dt > 1000 * 60 * 60 * 24 * 4) {
content = [
,
content
];
diff --git a/framework/core/js/forum/src/components/PostStreamScrubber.js b/framework/core/js/forum/src/components/PostStreamScrubber.js
index 51f1b0b90..66dae0502 100644
--- a/framework/core/js/forum/src/components/PostStreamScrubber.js
+++ b/framework/core/js/forum/src/components/PostStreamScrubber.js
@@ -71,12 +71,10 @@ 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 = [
-
,
- ' posts '
- ];
+ const viewing = app.trans('core.viewing_posts', {
+ index:
+ });
function styleUnread(element, isInitialized, context) {
const $element = $(element);
@@ -103,7 +101,7 @@ export default class PostStreamScrubber extends Component {
diff --git a/framework/core/js/forum/src/components/PostedActivity.js b/framework/core/js/forum/src/components/PostedActivity.js
index 7ebc10255..8f3aff34f 100644
--- a/framework/core/js/forum/src/components/PostedActivity.js
+++ b/framework/core/js/forum/src/components/PostedActivity.js
@@ -15,7 +15,7 @@ export default class PostedActivity extends Activity {
description() {
const post = this.props.activity.subject();
- return post.number() === 1 ? 'Started a discussion' : 'Posted a reply';
+ return app.trans(post.number() === 1 ? 'core.started_a_discussion' : 'core.posted_a_reply');
}
content() {
diff --git a/framework/core/js/forum/src/components/ReplyComposer.js b/framework/core/js/forum/src/components/ReplyComposer.js
index 1f6795792..684fcebdb 100644
--- a/framework/core/js/forum/src/components/ReplyComposer.js
+++ b/framework/core/js/forum/src/components/ReplyComposer.js
@@ -16,9 +16,9 @@ export default class ReplyComposer extends ComposerBody {
static initProps(props) {
super.initProps(props);
- props.placeholder = props.placeholder || 'Write a Reply...';
- props.submitLabel = props.submitLabel || 'Post Reply';
- props.confirmExit = props.confirmExit || 'You have not posted your reply. Do you wish to discard it?';
+ props.placeholder = props.placeholder || app.trans('core.write_a_reply');
+ props.submitLabel = props.submitLabel || app.trans('core.post_reply');
+ props.confirmExit = props.confirmExit || app.trans('core.confirm_discard_reply');
}
headerItems() {
@@ -66,7 +66,7 @@ export default class ReplyComposer extends ComposerBody {
// transition to their new post when clicked.
let alert;
const viewButton = Button.component({
- children: 'View',
+ children: app.trans('core.view'),
onclick: () => {
m.route(app.route.post(post));
app.alerts.dismiss(alert);
@@ -75,7 +75,7 @@ export default class ReplyComposer extends ComposerBody {
app.alerts.show(
alert = new Alert({
type: 'success',
- message: 'Your reply was posted.',
+ message: app.trans('reply_posted'),
controls: [viewButton]
})
);
diff --git a/framework/core/js/forum/src/components/ReplyPlaceholder.js b/framework/core/js/forum/src/components/ReplyPlaceholder.js
index 79b9b0e91..a5b2005bb 100644
--- a/framework/core/js/forum/src/components/ReplyPlaceholder.js
+++ b/framework/core/js/forum/src/components/ReplyPlaceholder.js
@@ -25,7 +25,7 @@ export default class ReplyPlaceholder extends Component {
);
diff --git a/framework/core/js/forum/src/components/Search.js b/framework/core/js/forum/src/components/Search.js
index 88ad7fec5..396fe1dd4 100644
--- a/framework/core/js/forum/src/components/Search.js
+++ b/framework/core/js/forum/src/components/Search.js
@@ -82,7 +82,7 @@ export default class Search extends Component {
})}>
this.hasFocus = true}
diff --git a/framework/core/js/forum/src/components/SessionDropdown.js b/framework/core/js/forum/src/components/SessionDropdown.js
index 1ce2dd53f..e0f5ceeb1 100644
--- a/framework/core/js/forum/src/components/SessionDropdown.js
+++ b/framework/core/js/forum/src/components/SessionDropdown.js
@@ -47,7 +47,7 @@ export default class SessionDropdown extends Dropdown {
items.add('profile',
LinkButton.component({
icon: 'user',
- children: 'Profile',
+ children: app.trans('core.profile'),
href: app.route.user(user)
}),
100
@@ -56,7 +56,7 @@ export default class SessionDropdown extends Dropdown {
items.add('settings',
LinkButton.component({
icon: 'cog',
- children: 'Settings',
+ children: app.trans('core.settings'),
href: app.route('settings')
}),
50
@@ -66,7 +66,7 @@ export default class SessionDropdown extends Dropdown {
items.add('administration',
LinkButton.component({
icon: 'wrench',
- children: 'Administration',
+ children: app.trans('core.administration'),
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: 'Log Out',
+ children: app.trans('core.log_out'),
onclick: app.session.logout.bind(app.session)
}),
-100
diff --git a/framework/core/js/forum/src/components/SettingsPage.js b/framework/core/js/forum/src/components/SettingsPage.js
index 66d228dca..0dcd81e20 100644
--- a/framework/core/js/forum/src/components/SettingsPage.js
+++ b/framework/core/js/forum/src/components/SettingsPage.js
@@ -18,7 +18,7 @@ export default class SettingsPage extends UserPage {
super(...args);
this.init(app.session.user);
- app.setTitle('Settings');
+ app.setTitle(app.trans('core.settings'));
app.drawer.hide();
}
@@ -40,7 +40,7 @@ export default class SettingsPage extends UserPage {
items.add('account',
FieldSet.component({
- label: 'Account',
+ label: app.trans('core.account'),
className: 'Settings-account',
children: this.accountItems().toArray()
})
@@ -48,7 +48,7 @@ export default class SettingsPage extends UserPage {
items.add('notifications',
FieldSet.component({
- label: 'Notifications',
+ label: app.trans('core.notifications'),
className: 'Settings-notifications',
children: [NotificationGrid.component({user: this.user})]
})
@@ -56,7 +56,7 @@ export default class SettingsPage extends UserPage {
items.add('privacy',
FieldSet.component({
- label: 'Privacy',
+ label: app.trans('core.privacy'),
className: 'Settings-privacy',
children: this.privacyItems().toArray()
})
@@ -75,7 +75,7 @@ export default class SettingsPage extends UserPage {
items.add('changePassword',
Button.component({
- children: 'Change Password',
+ children: app.trans('core.change_password'),
className: 'Button',
onclick: () => app.modal.show(new ChangePasswordModal())
})
@@ -83,7 +83,7 @@ export default class SettingsPage extends UserPage {
items.add('changeEmail',
Button.component({
- children: 'Change Email',
+ children: app.trans('core.change_email'),
className: 'Button',
onclick: () => app.modal.show(new ChangeEmailModal())
})
@@ -91,7 +91,7 @@ export default class SettingsPage extends UserPage {
items.add('deleteAccount',
Button.component({
- children: 'Delete Account',
+ children: app.trans('core.delete_account'),
className: 'Button Button--danger',
onclick: () => app.modal.show(new DeleteAccountModal())
})
@@ -131,7 +131,7 @@ export default class SettingsPage extends UserPage {
items.add('discloseOnline',
Switch.component({
- children: 'Allow others to see when I am online',
+ children: app.trans('disclose_online'),
state: this.user.preferences().discloseOnline,
onchange: (value, component) => {
this.user.pushAttributes({lastSeenTime: null});
diff --git a/framework/core/js/forum/src/components/SignUpModal.js b/framework/core/js/forum/src/components/SignUpModal.js
index 57ccc9bb2..db0d46b11 100644
--- a/framework/core/js/forum/src/components/SignUpModal.js
+++ b/framework/core/js/forum/src/components/SignUpModal.js
@@ -49,7 +49,7 @@ export default class SignUpModal extends Modal {
}
title() {
- return 'Sign Up';
+ return app.trans('core.sign_up');
}
content() {
@@ -67,21 +67,21 @@ export default class SignUpModal extends Modal {
const body = [(
@@ -111,13 +111,21 @@ export default class SignUpModal extends Modal {
{avatar(user)}
-
Welcome, {user.username()}!
+
{app.trans('core.welcome_user', {user})}
{user.isConfirmed() ? [
-
We've sent a confirmation email to {user.email()}. If it doesn't arrive soon, check your spam folder.
,
-
Go to {emailProviderName}
+
{app.trans('core.confirmation_email_sent', {email: user.email()})}
,
+
+
+ {app.trans('core.go_to', {location: emailProviderName})}
+
+
] : (
-
+
+
+
)}
@@ -130,8 +138,8 @@ export default class SignUpModal extends Modal {
footer() {
return [
];
}
diff --git a/framework/core/js/forum/src/components/TerminalPost.js b/framework/core/js/forum/src/components/TerminalPost.js
index 148fa72e0..268e15ab0 100644
--- a/framework/core/js/forum/src/components/TerminalPost.js
+++ b/framework/core/js/forum/src/components/TerminalPost.js
@@ -20,9 +20,10 @@ export default class TerminalPost extends Component {
return (
);
}
diff --git a/framework/core/js/forum/src/components/TextEditor.js b/framework/core/js/forum/src/components/TextEditor.js
index c748fba06..93aa57014 100644
--- a/framework/core/js/forum/src/components/TextEditor.js
+++ b/framework/core/js/forum/src/components/TextEditor.js
@@ -26,12 +26,6 @@ export default class TextEditor extends Component {
this.value = m.prop(this.props.value || '');
}
- static initProps(props) {
- super.initProps(props);
-
- props.submitLabel = props.submitLabel || 'Submit';
- }
-
view() {
return (