mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 19:13:37 +08:00
Merge pull request #1 from dcsjapan/extract-translations
Extract translations
This commit is contained in:
commit
a4669d7c70
|
@ -6,7 +6,7 @@ app.initializers.add('approval', () => {
|
|||
extend(PermissionGrid.prototype, 'replyItems', items => {
|
||||
items.add('replyWithoutApproval', {
|
||||
icon: 'check',
|
||||
label: 'Reply without approval',
|
||||
label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),
|
||||
permission: 'discussion.replyWithoutApproval'
|
||||
}, 95);
|
||||
});
|
||||
|
@ -14,7 +14,7 @@ app.initializers.add('approval', () => {
|
|||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||
items.add('approvePosts', {
|
||||
icon: 'check',
|
||||
label: 'Approve posts',
|
||||
label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),
|
||||
permission: 'discussion.approvePosts'
|
||||
}, 65);
|
||||
});
|
||||
|
|
|
@ -27,13 +27,13 @@ app.initializers.add('flarum-approval', () => {
|
|||
|
||||
extend(CommentPost.prototype, 'headerItems', function(items) {
|
||||
if (!this.props.post.isApproved() && !this.props.post.isHidden()) {
|
||||
items.add('unapproved', 'Awaiting Approval');
|
||||
items.add('unapproved', app.translator.trans('flarum-approval.forum.post.awaiting_approval_text'));
|
||||
}
|
||||
});
|
||||
|
||||
override(CommentPost.prototype, 'flagReason', function(original, flag) {
|
||||
if (flag.type() === 'approval') {
|
||||
return 'Awaiting approval';
|
||||
return app.translator.trans('flarum-approval.forum.post.awaiting_approval_text');
|
||||
}
|
||||
|
||||
return original(flag);
|
||||
|
@ -43,7 +43,7 @@ app.initializers.add('flarum-approval', () => {
|
|||
if (!post.isApproved() && post.canApprove()) {
|
||||
items.add('approve',
|
||||
<Button icon="check" onclick={PostControls.approveAction.bind(post)}>
|
||||
Approve
|
||||
{app.translator.trans('flarum-approval.forum.post_controls.approve_button')}
|
||||
</Button>,
|
||||
10
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user