Merge pull request #3 from dcsjapan/flags-key-fix

Fix key names in Flags
This commit is contained in:
Franz Liedke 2015-10-21 12:44:56 +02:00
commit 2f26de4fcb
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ app.initializers.add('flarum-flags', () => {
extend(PermissionGrid.prototype, 'moderateItems', items => { extend(PermissionGrid.prototype, 'moderateItems', items => {
items.add('viewFlags', { items.add('viewFlags', {
icon: 'flag', 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' permission: 'discussion.viewFlags'
}, 65); }, 65);
}); });
@ -14,7 +14,7 @@ app.initializers.add('flarum-flags', () => {
extend(PermissionGrid.prototype, 'replyItems', items => { extend(PermissionGrid.prototype, 'replyItems', items => {
items.add('flagPosts', { items.add('flagPosts', {
icon: 'flag', 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' permission: 'discussion.flagPosts'
}, 70); }, 70);
}); });

View File

@ -101,7 +101,7 @@ export default function() {
const detail = flag.reasonDetail(); const detail = flag.reasonDetail();
return [ 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> : '' detail ? <span className="Post-flagged-detail">{detail}</span> : ''
]; ];
} }

View File

@ -50,7 +50,7 @@ export default class FlagList extends Component {
); );
}) })
: !this.loading : !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'})} : LoadingIndicator.component({className: 'LoadingIndicator--block'})}
</ul> </ul>
</div> </div>