1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 00:17:31 +02:00

Update for ICU MessageFormat

This commit is contained in:
Alexander Skvortsov
2021-05-12 19:24:06 -04:00
parent 93d373f066
commit 6c27c08672
3 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ export default function() {
e.preventDefault();
app.modal.show(PostLikesModal, {post});
}}>
{app.translator.transChoice('flarum-likes.forum.post.others_link', count, {count})}
{app.translator.trans('flarum-likes.forum.post.others_link', {count})}
</a>
);
}
@@ -48,7 +48,7 @@ export default function() {
items.add('liked', (
<div className="Post-likedBy">
{icon('far fa-thumbs-up')}
{app.translator.transChoice('flarum-likes.forum.post.liked_by' + (likes[0] === app.session.user ? '_self' : '') + '_text', names.length, {
{app.translator.trans('flarum-likes.forum.post.liked_by' + (likes[0] === app.session.user ? '_self' : '') + '_text', {
count: names.length,
users: punctuateSeries(names)
})}

View File

@@ -14,7 +14,7 @@ export default class PostLikedNotification extends Notification {
const notification = this.attrs.notification;
const user = notification.fromUser();
return app.translator.transChoice('flarum-likes.forum.notifications.post_liked_text', 1, {user});
return app.translator.trans('flarum-likes.forum.notifications.post_liked_text', {user, count: 1});
}
excerpt() {