diff --git a/extensions/likes/js/forum/src/addLikesList.js b/extensions/likes/js/forum/src/addLikesList.js index e4581af69..d7536e214 100644 --- a/extensions/likes/js/forum/src/addLikesList.js +++ b/extensions/likes/js/forum/src/addLikesList.js @@ -27,7 +27,7 @@ export default function() { .map(user => { return ( - {user === app.session.user ? 'You' : username(user)} + {user === app.session.user ? app.trans('likes.you') : username(user)} ); }); diff --git a/extensions/likes/js/forum/src/components/PostLikedNotification.js b/extensions/likes/js/forum/src/components/PostLikedNotification.js index 8b42df07d..a07b86467 100644 --- a/extensions/likes/js/forum/src/components/PostLikedNotification.js +++ b/extensions/likes/js/forum/src/components/PostLikedNotification.js @@ -1,4 +1,6 @@ import Notification from 'flarum/components/Notification'; +import username from 'flarum/helpers/username'; +import punctuate from 'flarum/helpers/punctuate'; export default class PostLikedNotification extends Notification { icon() { @@ -19,7 +21,7 @@ export default class PostLikedNotification extends Notification { user, username: auc ? punctuate([ username(user), - app.trans('core.others', {count: auc}) + app.trans('likes.others', {count: auc}) ]) : undefined, number: post.number() }); diff --git a/extensions/likes/locale/en.yml b/extensions/likes/locale/en.yml index f54c2b865..750fa2062 100644 --- a/extensions/likes/locale/en.yml +++ b/extensions/likes/locale/en.yml @@ -9,3 +9,4 @@ likes: like_action: Like notify_post_liked: Someone likes my post others: "{count} others" + you: You diff --git a/extensions/likes/src/Listeners/AddClientAssets.php b/extensions/likes/src/Listeners/AddClientAssets.php index 8b013e03c..7028ed828 100755 --- a/extensions/likes/src/Listeners/AddClientAssets.php +++ b/extensions/likes/src/Listeners/AddClientAssets.php @@ -34,7 +34,8 @@ class AddClientAssets 'likes.unlike_action', 'likes.like_action', 'likes.notify_post_liked', - 'likes.others' + 'likes.others', + 'likes.you' ]); } }