mirror of
https://github.com/flarum/framework.git
synced 2025-04-14 15:10:35 +08:00
Update for ICU MessageFormat
This commit is contained in:
parent
93d373f066
commit
6c27c08672
@ -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)
|
||||
})}
|
||||
|
@ -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() {
|
||||
|
@ -23,7 +23,7 @@ flarum-likes:
|
||||
post:
|
||||
like_link: Like
|
||||
liked_by_self_text: "{users} like this." # Can be pluralized to agree with the number of users!
|
||||
liked_by_text: "{users} likes this.|{users} like this."
|
||||
liked_by_text: "{count, plural, one {{users} likes this} other {{users} like this}}"
|
||||
others_link: => core.ref.some_others
|
||||
unlike_link: Unlike
|
||||
you_text: => core.ref.you
|
||||
|
Loading…
x
Reference in New Issue
Block a user