mirror of
https://github.com/flarum/framework.git
synced 2025-06-25 04:11:23 +08:00
Update plural translations
This commit is contained in:
@ -31,12 +31,14 @@ export default function() {
|
|||||||
// others" name to the end of the list. Clicking on it will display a modal
|
// others" name to the end of the list. Clicking on it will display a modal
|
||||||
// with a full list of names.
|
// with a full list of names.
|
||||||
if (likes.length > limit) {
|
if (likes.length > limit) {
|
||||||
|
const count = likes.length - limit;
|
||||||
|
|
||||||
names.push(
|
names.push(
|
||||||
<a href="#" onclick={e => {
|
<a href="#" onclick={e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
app.modal.show(new PostLikesModal({post}));
|
app.modal.show(new PostLikesModal({post}));
|
||||||
}}>
|
}}>
|
||||||
{app.trans('flarum-likes.forum.others', {count: likes.length - limit})}
|
{app.translator.transChoice('flarum-likes.forum.others', count, {count})}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -44,7 +46,7 @@ export default function() {
|
|||||||
items.add('liked', (
|
items.add('liked', (
|
||||||
<div className="Post-likedBy">
|
<div className="Post-likedBy">
|
||||||
{icon('thumbs-o-up')}
|
{icon('thumbs-o-up')}
|
||||||
{app.trans('flarum-likes.forum.post_liked_by' + (likes[0] === app.session.user ? '_self' : ''), {
|
{app.translator.transChoice('flarum-likes.forum.post_liked_by' + (likes[0] === app.session.user ? '_self' : ''), names.length, {
|
||||||
count: names.length,
|
count: names.length,
|
||||||
users: punctuateSeries(names)
|
users: punctuateSeries(names)
|
||||||
})}
|
})}
|
||||||
|
Reference in New Issue
Block a user