@@ -97,7 +97,7 @@ export default class EditGroupModal extends Modal {
}
delete() {
- if (confirm('Are you sure you want to delete this group? The group members will NOT be deleted.')) {
+ if (confirm(app.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 21f32bc6a..6a53175a6 100644
--- a/framework/core/js/admin/src/components/ExtensionsPage.js
+++ b/framework/core/js/admin/src/components/ExtensionsPage.js
@@ -15,7 +15,7 @@ export default class ExtensionsPage extends Component {
{Button.component({
- children: 'Add Extension',
+ children: app.trans('core.admin.extensions_add_button'),
icon: 'plus',
className: 'Button Button--primary',
onclick: () => app.modal.show(new AddExtensionModal())
@@ -63,14 +63,14 @@ export default class ExtensionsPage extends Component {
if (app.extensionSettings[extension.name]) {
items.add('settings', Button.component({
icon: 'cog',
- children: 'Settings',
+ children: app.trans('core.admin.extensions_settings_button'),
onclick: app.extensionSettings[extension.name]
}));
}
items.add('toggle', Button.component({
icon: 'power-off',
- children: enabled ? 'Disable' : 'Enable',
+ children: app.trans(enabled ? 'core.admin.extensions_disable_button' : 'core.admin.extensions_enable_button'),
onclick: () => {
app.request({
url: app.forum.attribute('apiUrl') + '/extensions/' + extension.name,
@@ -85,7 +85,7 @@ export default class ExtensionsPage extends Component {
if (!enabled) {
items.add('uninstall', Button.component({
icon: 'trash-o',
- children: 'Uninstall',
+ children: app.trans('core.admin.extensions_uninstall_button'),
onclick: () => {
app.request({
url: app.forum.attribute('apiUrl') + '/extensions/' + extension.name,
diff --git a/framework/core/js/admin/src/components/LoadingModal.js b/framework/core/js/admin/src/components/LoadingModal.js
index 8d0bf0bf6..1c9dd2867 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 'Please Wait...';
+ return app.trans('core.admin.extensions_loading_title');
}
content() {
diff --git a/framework/core/js/admin/src/components/PermissionDropdown.js b/framework/core/js/admin/src/components/PermissionDropdown.js
index 45b957acc..ea6175efb 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 = 'Everyone';
+ this.props.label = app.trans('core.admin.permissions_dropdown_everyone_button');
} else if (members) {
- this.props.label = 'Members';
+ this.props.label = app.trans('core.admin.permissions_dropdown_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: 'Everyone',
+ children: app.trans('core.admin.permissions_dropdown_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: 'Members',
+ children: app.trans('core.admin.permissions_dropdown_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 d9d9f81ed..8fca29822 100644
--- a/framework/core/js/admin/src/components/PermissionGrid.js
+++ b/framework/core/js/admin/src/components/PermissionGrid.js
@@ -61,22 +61,22 @@ export default class PermissionGrid extends Component {
const items = new ItemList();
items.add('view', {
- label: 'Read',
+ label: app.trans('core.admin.permissions_read_heading'),
children: this.viewItems().toArray()
}, 100);
items.add('start', {
- label: 'Create',
+ label: app.trans('core.admin.permissions_create_heading'),
children: this.startItems().toArray()
}, 90);
items.add('reply', {
- label: 'Participate',
+ label: app.trans('core.admin.permissions_participate_heading'),
children: this.replyItems().toArray()
}, 80);
items.add('moderate', {
- label: 'Moderate',
+ label: app.trans('core.admin.permissions_moderate_heading'),
children: this.moderateItems().toArray()
}, 70);
@@ -88,19 +88,19 @@ export default class PermissionGrid extends Component {
items.add('view', {
icon: 'eye',
- label: 'View discussions',
+ label: app.trans('core.admin.permissions_view_discussions_label'),
permission: 'forum.view',
allowGuest: true
}, 100);
items.add('signUp', {
icon: 'user-plus',
- label: 'Sign up',
+ label: app.trans('core.admin.permissions_sign_up_label'),
setting: () => ConfigDropdown.component({
key: 'allow_sign_up',
options: [
- {value: '1', label: 'Open'},
- {value: '0', label: 'Closed'}
+ {value: '1', label: app.trans('core.admin.permissions_signup_open_button')},
+ {value: '0', label: app.trans('core.admin.permissions_signup_closed_button')}
]
})
}, 90);
@@ -113,23 +113,25 @@ export default class PermissionGrid extends Component {
items.add('start', {
icon: 'edit',
- label: 'Start discussions',
+ label: app.trans('core.admin.permissions_start_discussions_label'),
permission: 'forum.startDiscussion'
}, 100);
items.add('allowRenaming', {
icon: 'i-cursor',
- label: 'Allow renaming',
+ label: app.trans('core.admin.permissions_allow_renaming_label'),
setting: () => {
const minutes = parseInt(app.config.allow_renaming, 10);
return ConfigDropdown.component({
- defaultLabel: minutes ? `For ${minutes} minutes` : 'Indefinitely',
+ defaultLabel: minutes
+ ? app.trans('core.admin.permissions_allow_some_minutes_button', {count: minutes})
+ : app.trans('core.admin.permissions_allow_indefinitely_button'),
key: 'allow_renaming',
options: [
- {value: '-1', label: 'Indefinitely'},
- {value: '10', label: 'For 10 minutes'},
- {value: 'reply', label: 'Until next reply'}
+ {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')}
]
});
}
@@ -143,23 +145,23 @@ export default class PermissionGrid extends Component {
items.add('reply', {
icon: 'reply',
- label: 'Reply to discussions',
+ label: app.trans('core.admin.permissions_reply_to_discussions_label'),
permission: 'discussion.reply'
}, 100);
items.add('allowPostEditing', {
icon: 'pencil',
- label: 'Allow post editing',
+ label: app.trans('core.admin.permissions_allow_post_editing_label'),
setting: () => {
const minutes = parseInt(app.config.allow_post_editing, 10);
return ConfigDropdown.component({
- defaultLabel: minutes ? `For ${minutes} minutes` : 'Indefinitely',
+ defaultLabel: app.trans(minutes ? 'core.admin.permissions_allow_some_minutes_button', {some: ?{minutes}} : 'core.admin.permissions_allow_indefinitely_button'),
key: 'allow_post_editing',
options: [
- {value: '-1', label: 'Indefinitely'},
- {value: '10', label: 'For 10 minutes'},
- {value: 'reply', label: 'Until next reply'}
+ {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')}
]
});
}
@@ -173,31 +175,31 @@ export default class PermissionGrid extends Component {
items.add('renameDiscussions', {
icon: 'i-cursor',
- label: 'Rename discussions',
+ label: app.trans('core.admin.permissions_rename_discussions_label'),
permission: 'discussion.rename'
}, 100);
items.add('hideDiscussions', {
icon: 'trash-o',
- label: 'Delete discussions',
+ label: app.trans('core.admin.permissions_delete_discussions_label'),
permission: 'discussion.hide'
}, 90);
items.add('deleteDiscussions', {
icon: 'times',
- label: 'Delete discussions forever',
+ label: app.trans('core.admin.permissions_delete_discussions_forever_label'),
permission: 'discussion.delete'
}, 80);
items.add('editPosts', {
icon: 'pencil',
- label: 'Edit and delete posts',
+ label: app.trans('core.admin.permissions_edit_and_delete_posts_label'),
permission: 'discussion.editPosts'
}, 70);
items.add('deletePosts', {
icon: 'times',
- label: 'Delete posts forever',
+ label: app.trans('core.admin.permissions_delete_posts_forever_label'),
permission: 'discussion.deletePosts'
}, 60);
@@ -208,7 +210,7 @@ export default class PermissionGrid extends Component {
const items = new ItemList();
items.add('global', {
- label: 'Global',
+ label: app.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 d4a205af9..10a784342 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 f4a21f159..be5edfc7a 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.log_out'),
+ children: app.trans('core.admin.header_log_out_button'),
onclick: app.session.logout.bind(app.session)
}),
-100