mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Add "forum" namespacing to previously renamed core keys
- Does not affect "core.deleted_user" global string. - Corresponding YAML will be sent later w/ more extracted strings.
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
}));
|
||||
}
|
||||
|
@@ -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)
|
||||
}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user