mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 09:53:00 +08:00
Merge pull request #3 from dcsjapan/flags-key-fix
Fix key names in Flags
This commit is contained in:
commit
2f26de4fcb
|
@ -6,7 +6,7 @@ app.initializers.add('flarum-flags', () => {
|
|||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||
items.add('viewFlags', {
|
||||
icon: 'flag',
|
||||
label: app.translator.trans('flarum-flags.admin.permissions.view_flags'),
|
||||
label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),
|
||||
permission: 'discussion.viewFlags'
|
||||
}, 65);
|
||||
});
|
||||
|
@ -14,7 +14,7 @@ app.initializers.add('flarum-flags', () => {
|
|||
extend(PermissionGrid.prototype, 'replyItems', items => {
|
||||
items.add('flagPosts', {
|
||||
icon: 'flag',
|
||||
label: app.translator.trans('flarum-flags.admin.permissions.flag_posts'),
|
||||
label: app.translator.trans('flarum-flags.admin.permissions.flag_posts_label'),
|
||||
permission: 'discussion.flagPosts'
|
||||
}, 70);
|
||||
});
|
||||
|
|
|
@ -101,7 +101,7 @@ export default function() {
|
|||
const detail = flag.reasonDetail();
|
||||
|
||||
return [
|
||||
app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason' : 'flarum-flags.forum.post.flagged_by', {user, reason}),
|
||||
app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {user, reason}),
|
||||
detail ? <span className="Post-flagged-detail">{detail}</span> : ''
|
||||
];
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export default class FlagList extends Component {
|
|||
);
|
||||
})
|
||||
: !this.loading
|
||||
? <div className="NotificationList-empty">{app.translator.trans('flarum-flags.forum.flagged_posts.no_flags')}</div>
|
||||
? <div className="NotificationList-empty">{app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}</div>
|
||||
: LoadingIndicator.component({className: 'LoadingIndicator--block'})}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user