mirror of
https://github.com/flarum/core.git
synced 2025-07-16 22:31:18 +02:00
Fix key names in Lock
- Fixes several key name errors in PR #17. - Sorry for the extra work!
This commit is contained in:
@@ -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.badge.locked'),
|
label: app.translator.trans('flarum-lock.forum.badge.locked_discussion_tooltip'),
|
||||||
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.discussion_controls.unlock' : 'flarum-lock.forum.discussion_controls.lock'),
|
children: app.translator.trans(discussion.isLocked() ? 'flarum-lock.forum.discussion_controls.unlock_button' : 'flarum-lock.forum.discussion_controls.lock_button'),
|
||||||
icon: 'lock',
|
icon: 'lock',
|
||||||
onclick: this.lockAction.bind(discussion)
|
onclick: this.lockAction.bind(discussion)
|
||||||
}));
|
}));
|
||||||
|
@@ -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.post_stream.discussion_locked_post'
|
? 'flarum-lock.forum.post_stream.discussion_locked_text'
|
||||||
: 'flarum-lock.forum.post_stream.discussion_unlocked_post';
|
: 'flarum-lock.forum.post_stream.discussion_unlocked_text';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user