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

This commit is contained in:
Toby Zerner 2015-10-21 10:28:41 +10:30
parent fed89e0de1
commit 3380495222
5 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ export default function() {
items.add('like',
Button.component({
children: app.trans(isLiked ? 'flarum-likes.forum.unlike_action' : 'flarum-likes.forum.like_action'),
children: app.translator.trans(isLiked ? 'flarum-likes.forum.unlike_action' : 'flarum-likes.forum.like_action'),
className: 'Button Button--link',
onclick: () => {
isLiked = !isLiked;

View File

@ -22,7 +22,7 @@ export default function() {
.map(user => {
return (
<a href={app.route.user(user)} config={m.route}>
{user === app.session.user ? app.trans('flarum-likes.forum.you') : username(user)}
{user === app.session.user ? app.translator.trans('flarum-likes.forum.you') : username(user)}
</a>
);
});

View File

@ -1,6 +1,6 @@
import Notification from 'flarum/components/Notification';
import username from 'flarum/helpers/username';
import punctuate from 'flarum/helpers/punctuate';
import punctuateSeries from 'flarum/helpers/punctuateSeries';
export default class PostLikedNotification extends Notification {
icon() {
@ -16,11 +16,11 @@ export default class PostLikedNotification extends Notification {
const user = notification.sender();
const auc = notification.additionalUnreadCount();
return app.trans('flarum-likes.forum.post_liked_notification', {
return app.translator.trans('flarum-likes.forum.post_liked_notification', {
user,
username: auc ? punctuate([
username: auc ? punctuateSeries([
username(user),
app.trans('flarum-likes.forum.others', {count: auc})
app.translator.trans('flarum-likes.forum.others', {count: auc})
]) : undefined
});
}

View File

@ -8,7 +8,7 @@ export default class PostLikesModal extends Modal {
}
title() {
return app.trans('flarum-likes.forum.post_likes_modal_title');
return app.translator.trans('flarum-likes.forum.post_likes_modal_title');
}
content() {

View File

@ -21,7 +21,7 @@ app.initializers.add('flarum-likes', () => {
items.add('postLiked', {
name: 'postLiked',
icon: 'thumbs-o-up',
label: app.trans('flarum-likes.forum.notify_post_liked')
label: app.translator.trans('flarum-likes.forum.notify_post_liked')
});
});
});
});