Change app.trans calls to app.translator.trans calls

This commit is contained in:
Toby Zerner 2015-10-21 10:28:59 +10:30
parent ae5f196613
commit ae7baa1e7f
4 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ export default function addLockBadge() {
if (this.isLocked()) {
badges.add('locked', Badge.component({
type: 'locked',
label: app.trans('flarum-lock.forum.locked'),
label: app.translator.trans('flarum-lock.forum.locked'),
icon: 'lock'
}));
}

View File

@ -7,7 +7,7 @@ export default function addLockControl() {
extend(DiscussionControls, 'moderationControls', function(items, discussion) {
if (discussion.canLock()) {
items.add('lock', Button.component({
children: app.trans(discussion.isLocked() ? 'flarum-lock.forum.unlock' : 'flarum-lock.forum.lock'),
children: app.translator.trans(discussion.isLocked() ? 'flarum-lock.forum.unlock' : 'flarum-lock.forum.lock'),
icon: 'lock',
onclick: this.lockAction.bind(discussion)
}));

View File

@ -12,6 +12,6 @@ export default class DiscussionLockedNotification extends Notification {
}
content() {
return app.trans('flarum-lock.forum.discussion_locked_notification', {user: this.props.notification.sender()});
return app.translator.trans('flarum-lock.forum.discussion_locked_notification', {user: this.props.notification.sender()});
}
}

View File

@ -23,7 +23,7 @@ app.initializers.add('flarum-lock', () => {
items.add('discussionLocked', {
name: 'discussionLocked',
icon: 'lock',
label: app.trans('flarum-lock.forum.notify_discussion_locked')
label: app.translator.trans('flarum-lock.forum.notify_discussion_locked')
});
});
});
});