mirror of
https://github.com/flarum/framework.git
synced 2025-04-02 23:19:04 +08:00
Merge pull request #2 from dcsjapan/key-reorganization
Reorganize key names
This commit is contained in:
commit
eb398c9cbc
@ -6,7 +6,7 @@ app.initializers.add('lock', () => {
|
|||||||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||||
items.add('lock', {
|
items.add('lock', {
|
||||||
icon: 'lock',
|
icon: 'lock',
|
||||||
label: 'Lock discussions',
|
label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),
|
||||||
permission: 'discussion.lock'
|
permission: 'discussion.lock'
|
||||||
}, 95);
|
}, 95);
|
||||||
});
|
});
|
||||||
|
@ -7,7 +7,7 @@ export default function addLockBadge() {
|
|||||||
if (this.isLocked()) {
|
if (this.isLocked()) {
|
||||||
badges.add('locked', Badge.component({
|
badges.add('locked', Badge.component({
|
||||||
type: 'locked',
|
type: 'locked',
|
||||||
label: app.translator.trans('flarum-lock.forum.locked'),
|
label: app.translator.trans('flarum-lock.forum.badge.locked'),
|
||||||
icon: 'lock'
|
icon: 'lock'
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ export default function addLockControl() {
|
|||||||
extend(DiscussionControls, 'moderationControls', function(items, discussion) {
|
extend(DiscussionControls, 'moderationControls', function(items, discussion) {
|
||||||
if (discussion.canLock()) {
|
if (discussion.canLock()) {
|
||||||
items.add('lock', Button.component({
|
items.add('lock', Button.component({
|
||||||
children: app.translator.trans(discussion.isLocked() ? 'flarum-lock.forum.unlock' : 'flarum-lock.forum.lock'),
|
children: app.translator.trans(discussion.isLocked() ? 'flarum-lock.forum.discussion_controls.unlock' : 'flarum-lock.forum.discussion_controls.lock'),
|
||||||
icon: 'lock',
|
icon: 'lock',
|
||||||
onclick: this.lockAction.bind(discussion)
|
onclick: this.lockAction.bind(discussion)
|
||||||
}));
|
}));
|
||||||
|
@ -12,6 +12,6 @@ export default class DiscussionLockedNotification extends Notification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
content() {
|
content() {
|
||||||
return app.translator.trans('flarum-lock.forum.discussion_locked_notification', {user: this.props.notification.sender()});
|
return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {user: this.props.notification.sender()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ export default class DiscussionLockedPost extends EventPost {
|
|||||||
|
|
||||||
descriptionKey() {
|
descriptionKey() {
|
||||||
return this.props.post.content().locked
|
return this.props.post.content().locked
|
||||||
? 'flarum-lock.forum.discussion_locked_post'
|
? 'flarum-lock.forum.post_stream.discussion_locked_post'
|
||||||
: 'flarum-lock.forum.discussion_unlocked_post';
|
: 'flarum-lock.forum.post_stream.discussion_unlocked_post';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ app.initializers.add('flarum-lock', () => {
|
|||||||
items.add('discussionLocked', {
|
items.add('discussionLocked', {
|
||||||
name: 'discussionLocked',
|
name: 'discussionLocked',
|
||||||
icon: 'lock',
|
icon: 'lock',
|
||||||
label: app.translator.trans('flarum-lock.forum.notify_discussion_locked')
|
label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user