@@ -94,7 +94,7 @@ export default class EditGroupModal extends Modal {
}
deleteGroup() {
- if (confirm(app.trans('core.admin.edit_group_delete_confirmation'))) {
+ if (confirm(app.translator.trans('core.admin.edit_group.delete_confirmation'))) {
this.group.delete().then(() => m.redraw());
this.hide();
}
diff --git a/framework/core/js/admin/src/components/ExtensionsPage.js b/framework/core/js/admin/src/components/ExtensionsPage.js
index c22220d3d..58b1f9832 100644
--- a/framework/core/js/admin/src/components/ExtensionsPage.js
+++ b/framework/core/js/admin/src/components/ExtensionsPage.js
@@ -18,7 +18,7 @@ export default class ExtensionsPage extends Component {
{Button.component({
- children: app.trans('core.admin.extensions_add_button'),
+ children: app.translator.trans('core.admin.extensions.add_button'),
icon: 'plus',
className: 'Button Button--primary',
onclick: () => app.modal.show(new AddExtensionModal())
@@ -70,7 +70,7 @@ export default class ExtensionsPage extends Component {
if (app.extensionSettings[name]) {
items.add('settings', Button.component({
icon: 'cog',
- children: app.trans('core.admin.extensions_settings_button'),
+ children: app.translator.trans('core.admin.extensions.settings_button'),
onclick: app.extensionSettings[name]
}));
}
@@ -78,7 +78,7 @@ export default class ExtensionsPage extends Component {
if (!enabled) {
items.add('uninstall', Button.component({
icon: 'trash-o',
- children: app.trans('core.admin.extensions_uninstall_button'),
+ children: app.translator.trans('core.admin.extensions.uninstall_button'),
onclick: () => {
app.request({
url: app.forum.attribute('apiUrl') + '/extensions/' + name,
diff --git a/framework/core/js/admin/src/components/LoadingModal.js b/framework/core/js/admin/src/components/LoadingModal.js
index 1c9dd2867..e991f371a 100644
--- a/framework/core/js/admin/src/components/LoadingModal.js
+++ b/framework/core/js/admin/src/components/LoadingModal.js
@@ -10,7 +10,7 @@ export default class LoadingModal extends Modal {
}
title() {
- return app.trans('core.admin.extensions_loading_title');
+ return app.translator.trans('core.admin.loading.title');
}
content() {
diff --git a/framework/core/js/admin/src/components/PermissionDropdown.js b/framework/core/js/admin/src/components/PermissionDropdown.js
index ea6175efb..ea19a1ae3 100644
--- a/framework/core/js/admin/src/components/PermissionDropdown.js
+++ b/framework/core/js/admin/src/components/PermissionDropdown.js
@@ -27,9 +27,9 @@ export default class PermissionDropdown extends Dropdown {
const adminGroup = app.store.getById('groups', Group.ADMINISTRATOR_ID);
if (everyone) {
- this.props.label = app.trans('core.admin.permissions_dropdown_everyone_button');
+ this.props.label = app.translator.trans('core.admin.permissions_controls.everyone_button');
} else if (members) {
- this.props.label = app.trans('core.admin.permissions_dropdown_members_button');
+ this.props.label = app.translator.trans('core.admin.permissions_controls.members_button');
} else {
this.props.label = [
badgeForId(Group.ADMINISTRATOR_ID),
@@ -40,7 +40,7 @@ export default class PermissionDropdown extends Dropdown {
if (this.props.allowGuest) {
this.props.children.push(
Button.component({
- children: app.trans('core.admin.permissions_dropdown_everyone_button'),
+ children: app.translator.trans('core.admin.permissions_controls.everyone_button'),
icon: everyone ? 'check' : true,
onclick: () => this.save([Group.GUEST_ID])
})
@@ -49,7 +49,7 @@ export default class PermissionDropdown extends Dropdown {
this.props.children.push(
Button.component({
- children: app.trans('core.admin.permissions_dropdown_members_button'),
+ children: app.translator.trans('core.admin.permissions_controls.members_button'),
icon: members ? 'check' : true,
onclick: () => this.save([Group.MEMBER_ID])
}),
diff --git a/framework/core/js/admin/src/components/PermissionGrid.js b/framework/core/js/admin/src/components/PermissionGrid.js
index 25dd7fcc8..bbacaebe5 100644
--- a/framework/core/js/admin/src/components/PermissionGrid.js
+++ b/framework/core/js/admin/src/components/PermissionGrid.js
@@ -59,22 +59,22 @@ export default class PermissionGrid extends Component {
const items = new ItemList();
items.add('view', {
- label: app.trans('core.admin.permissions_read_heading'),
+ label: app.translator.trans('core.admin.permissions.read_heading'),
children: this.viewItems().toArray()
}, 100);
items.add('start', {
- label: app.trans('core.admin.permissions_create_heading'),
+ label: app.translator.trans('core.admin.permissions.create_heading'),
children: this.startItems().toArray()
}, 90);
items.add('reply', {
- label: app.trans('core.admin.permissions_participate_heading'),
+ label: app.translator.trans('core.admin.permissions.participate_heading'),
children: this.replyItems().toArray()
}, 80);
items.add('moderate', {
- label: app.trans('core.admin.permissions_moderate_heading'),
+ label: app.translator.trans('core.admin.permissions.moderate_heading'),
children: this.moderateItems().toArray()
}, 70);
@@ -86,19 +86,19 @@ export default class PermissionGrid extends Component {
items.add('viewDiscussions', {
icon: 'eye',
- label: app.trans('core.admin.permissions_view_discussions_label'),
+ label: app.translator.trans('core.admin.permissions.view_discussions_label'),
permission: 'viewDiscussions',
allowGuest: true
}, 100);
items.add('signUp', {
icon: 'user-plus',
- label: app.trans('core.admin.permissions_sign_up_label'),
+ label: app.translator.trans('core.admin.permissions.sign_up_label'),
setting: () => SettingDropdown.component({
key: 'allow_sign_up',
options: [
- {value: '1', label: app.trans('core.admin.permissions_signup_open_button')},
- {value: '0', label: app.trans('core.admin.permissions_signup_closed_button')}
+ {value: '1', label: app.translator.trans('core.admin.permissions_controls.signup_open_button')},
+ {value: '0', label: app.translator.trans('core.admin.permissions_controls.signup_closed_button')}
]
})
}, 90);
@@ -111,25 +111,25 @@ export default class PermissionGrid extends Component {
items.add('start', {
icon: 'edit',
- label: app.trans('core.admin.permissions_start_discussions_label'),
+ label: app.translator.trans('core.admin.permissions.start_discussions_label'),
permission: 'startDiscussion'
}, 100);
items.add('allowRenaming', {
icon: 'i-cursor',
- label: app.trans('core.admin.permissions_allow_renaming_label'),
+ label: app.translator.trans('core.admin.permissions.allow_renaming_label'),
setting: () => {
const minutes = parseInt(app.settings.allow_renaming, 10);
return SettingDropdown.component({
defaultLabel: minutes
- ? app.translator.transChoice('core.admin.permissions_allow_some_minutes_button', minutes, {count: minutes})
- : app.trans('core.admin.permissions_allow_indefinitely_button'),
+ ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes})
+ : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),
key: 'allow_renaming',
options: [
- {value: '-1', label: app.trans('core.admin.permissions_allow_indefinitely_button')},
- {value: '10', label: app.trans('core.admin.permissions_allow_ten_minutes_button')},
- {value: 'reply', label: app.trans('core.admin.permissions_allow_until_reply_button')}
+ {value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')},
+ {value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')},
+ {value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')}
]
});
}
@@ -143,25 +143,25 @@ export default class PermissionGrid extends Component {
items.add('reply', {
icon: 'reply',
- label: app.trans('core.admin.permissions_reply_to_discussions_label'),
+ label: app.translator.trans('core.admin.permissions.reply_to_discussions_label'),
permission: 'discussion.reply'
}, 100);
items.add('allowPostEditing', {
icon: 'pencil',
- label: app.trans('core.admin.permissions_allow_post_editing_label'),
+ label: app.translator.trans('core.admin.permissions.allow_post_editing_label'),
setting: () => {
const minutes = parseInt(app.settings.allow_post_editing, 10);
return SettingDropdown.component({
defaultLabel: minutes
- ? app.translator.transChoice('core.admin.permissions_allow_some_minutes_button', minutes, {count: minutes})
- : app.trans('core.admin.permissions_allow_indefinitely_button'),
+ ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes})
+ : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),
key: 'allow_post_editing',
options: [
- {value: '-1', label: app.trans('core.admin.permissions_allow_indefinitely_button')},
- {value: '10', label: app.trans('core.admin.permissions_allow_ten_minutes_button')},
- {value: 'reply', label: app.trans('core.admin.permissions_allow_until_reply_button')}
+ {value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')},
+ {value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')},
+ {value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')}
]
});
}
@@ -175,31 +175,31 @@ export default class PermissionGrid extends Component {
items.add('renameDiscussions', {
icon: 'i-cursor',
- label: app.trans('core.admin.permissions_rename_discussions_label'),
+ label: app.translator.trans('core.admin.permissions.rename_discussions_label'),
permission: 'discussion.rename'
}, 100);
items.add('hideDiscussions', {
icon: 'trash-o',
- label: app.trans('core.admin.permissions_delete_discussions_label'),
+ label: app.translator.trans('core.admin.permissions.delete_discussions_label'),
permission: 'discussion.hide'
}, 90);
items.add('deleteDiscussions', {
icon: 'times',
- label: app.trans('core.admin.permissions_delete_discussions_forever_label'),
+ label: app.translator.trans('core.admin.permissions.delete_discussions_forever_label'),
permission: 'discussion.delete'
}, 80);
items.add('editPosts', {
icon: 'pencil',
- label: app.trans('core.admin.permissions_edit_and_delete_posts_label'),
+ label: app.translator.trans('core.admin.permissions.edit_and_delete_posts_label'),
permission: 'discussion.editPosts'
}, 70);
items.add('deletePosts', {
icon: 'times',
- label: app.trans('core.admin.permissions_delete_posts_forever_label'),
+ label: app.translator.trans('core.admin.permissions.delete_posts_forever_label'),
permission: 'discussion.deletePosts'
}, 60);
@@ -210,7 +210,7 @@ export default class PermissionGrid extends Component {
const items = new ItemList();
items.add('global', {
- label: app.trans('core.admin.permissions_global_heading'),
+ label: app.translator.trans('core.admin.permissions.global_heading'),
render: item => {
if (item.setting) {
return item.setting();
diff --git a/framework/core/js/admin/src/components/PermissionsPage.js b/framework/core/js/admin/src/components/PermissionsPage.js
index 10a784342..dc228d619 100644
--- a/framework/core/js/admin/src/components/PermissionsPage.js
+++ b/framework/core/js/admin/src/components/PermissionsPage.js
@@ -25,7 +25,7 @@ export default class PermissionsPage extends Component {
))}
diff --git a/framework/core/js/admin/src/components/SessionDropdown.js b/framework/core/js/admin/src/components/SessionDropdown.js
index be5edfc7a..d6ce0e56a 100644
--- a/framework/core/js/admin/src/components/SessionDropdown.js
+++ b/framework/core/js/admin/src/components/SessionDropdown.js
@@ -43,7 +43,7 @@ export default class SessionDropdown extends Dropdown {
items.add('logOut',
Button.component({
icon: 'sign-out',
- children: app.trans('core.admin.header_log_out_button'),
+ children: app.translator.trans('core.admin.header.log_out_button'),
onclick: app.session.logout.bind(app.session)
}),
-100
diff --git a/framework/core/js/forum/src/components/AvatarEditor.js b/framework/core/js/forum/src/components/AvatarEditor.js
index 35acab59c..ac525d64d 100644
--- a/framework/core/js/forum/src/components/AvatarEditor.js
+++ b/framework/core/js/forum/src/components/AvatarEditor.js
@@ -60,7 +60,7 @@ export default class AvatarEditor extends Component {
items.add('upload',
Button.component({
icon: 'upload',
- children: app.trans('core.forum.user_avatar_upload_button'),
+ children: app.translator.trans('core.forum.user.avatar_upload_button'),
onclick: this.upload.bind(this)
})
);
@@ -68,7 +68,7 @@ export default class AvatarEditor extends Component {
items.add('remove',
Button.component({
icon: 'times',
- children: app.trans('core.forum.user_avatar_remove_button'),
+ children: app.translator.trans('core.forum.user.avatar_remove_button'),
onclick: this.remove.bind(this)
})
);
diff --git a/framework/core/js/forum/src/components/ChangeEmailModal.js b/framework/core/js/forum/src/components/ChangeEmailModal.js
index 320d9313b..35b430889 100644
--- a/framework/core/js/forum/src/components/ChangeEmailModal.js
+++ b/framework/core/js/forum/src/components/ChangeEmailModal.js
@@ -29,7 +29,7 @@ export default class ChangeEmailModal extends Modal {
}
title() {
- return app.trans('core.forum.change_email_title');
+ return app.translator.trans('core.forum.change_email.title');
}
content() {
@@ -37,10 +37,10 @@ export default class ChangeEmailModal extends Modal {
return (