mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Reorganize key names
See [flarum/core #265](https://github.com/flarum/core/issues/265). - Adjusts key names to three-tier namespacing. - Extracts previously unextracted strings.
This commit is contained in:
parent
45e3e0fbff
commit
160f092810
|
@ -6,7 +6,7 @@ app.initializers.add('flarum-sticky', () => {
|
|||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||
items.add('sticky', {
|
||||
icon: 'thumb-tack',
|
||||
label: 'Sticky discussions',
|
||||
label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),
|
||||
permission: 'discussion.sticky'
|
||||
}, 95);
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@ export default function addStickyBadge() {
|
|||
if (this.isSticky()) {
|
||||
badges.add('sticky', Badge.component({
|
||||
type: 'sticky',
|
||||
label: app.translator.trans('flarum-sticky.forum.stickied'),
|
||||
label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),
|
||||
icon: 'thumb-tack'
|
||||
}), 10);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ export default function addStickyControl() {
|
|||
extend(DiscussionControls, 'moderationControls', function(items, discussion) {
|
||||
if (discussion.canSticky()) {
|
||||
items.add('sticky', Button.component({
|
||||
children: app.translator.trans(discussion.isSticky() ? 'flarum-sticky.forum.unsticky' : 'flarum-sticky.forum.sticky'),
|
||||
children: app.translator.trans(discussion.isSticky() ? 'flarum-sticky.forum.discussion_controls.unsticky_button' : 'flarum-sticky.forum.discussion_controls.sticky_button'),
|
||||
icon: 'thumb-tack',
|
||||
onclick: this.stickyAction.bind(discussion)
|
||||
}));
|
||||
|
|
|
@ -12,6 +12,6 @@ export default class DiscussionStickiedNotification extends Notification {
|
|||
}
|
||||
|
||||
content() {
|
||||
return app.translator.trans('flarum-sticky.forum.discussion_stickied_notification', {user: this.props.notification.sender()});
|
||||
return '{username} stickied';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ export default class DiscussionStickiedPost extends EventPost {
|
|||
|
||||
descriptionKey() {
|
||||
return this.props.post.content().sticky
|
||||
? 'flarum-sticky.forum.discussion_stickied_post'
|
||||
: 'flarum-sticky.forum.discussion_unstickied_post';
|
||||
? 'flarum-sticky.forum.post_stream.discussion_stickied_text'
|
||||
: 'flarum-sticky.forum.post_stream.discussion_unstickied_text';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user