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 => {
|
extend(PermissionGrid.prototype, 'replyItems', items => {
|
||||||
items.add('replyWithoutApproval', {
|
items.add('replyWithoutApproval', {
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
label: 'Reply without approval',
|
label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),
|
||||||
permission: 'discussion.replyWithoutApproval'
|
permission: 'discussion.replyWithoutApproval'
|
||||||
}, 95);
|
}, 95);
|
||||||
});
|
});
|
||||||
|
@ -14,7 +14,7 @@ app.initializers.add('approval', () => {
|
||||||
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
extend(PermissionGrid.prototype, 'moderateItems', items => {
|
||||||
items.add('approvePosts', {
|
items.add('approvePosts', {
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
label: 'Approve posts',
|
label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),
|
||||||
permission: 'discussion.approvePosts'
|
permission: 'discussion.approvePosts'
|
||||||
}, 65);
|
}, 65);
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,13 +27,13 @@ app.initializers.add('flarum-approval', () => {
|
||||||
|
|
||||||
extend(CommentPost.prototype, 'headerItems', function(items) {
|
extend(CommentPost.prototype, 'headerItems', function(items) {
|
||||||
if (!this.props.post.isApproved() && !this.props.post.isHidden()) {
|
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) {
|
override(CommentPost.prototype, 'flagReason', function(original, flag) {
|
||||||
if (flag.type() === 'approval') {
|
if (flag.type() === 'approval') {
|
||||||
return 'Awaiting approval';
|
return app.translator.trans('flarum-approval.forum.post.awaiting_approval_text');
|
||||||
}
|
}
|
||||||
|
|
||||||
return original(flag);
|
return original(flag);
|
||||||
|
@ -43,7 +43,7 @@ app.initializers.add('flarum-approval', () => {
|
||||||
if (!post.isApproved() && post.canApprove()) {
|
if (!post.isApproved() && post.canApprove()) {
|
||||||
items.add('approve',
|
items.add('approve',
|
||||||
<Button icon="check" onclick={PostControls.approveAction.bind(post)}>
|
<Button icon="check" onclick={PostControls.approveAction.bind(post)}>
|
||||||
Approve
|
{app.translator.trans('flarum-approval.forum.post_controls.approve_button')}
|
||||||
</Button>,
|
</Button>,
|
||||||
10
|
10
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user