1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 02:01:19 +02:00

Update for ICU MessageFormat

This commit is contained in:
Alexander Skvortsov
2021-05-12 19:27:13 -04:00
parent bc187d9b83
commit ae69dd25c7
2 changed files with 3 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ export default function addMentionedByList() {
const count = repliers.length - names.length;
names.push(
app.translator.transChoice('flarum-mentions.forum.post.others_text', count, {count})
app.translator.trans('flarum-mentions.forum.post.others_text', {count})
);
}
@@ -124,7 +124,7 @@ export default function addMentionedByList() {
<div className="Post-mentionedBy">
<span className="Post-mentionedBy-summary">
{icon('fas fa-reply')}
{app.translator.transChoice('flarum-mentions.forum.post.mentioned_by' + (repliers[0].user() === app.session.user ? '_self' : '') + '_text', names.length, {
{app.translator.trans('flarum-mentions.forum.post.mentioned_by' + (repliers[0].user() === app.session.user ? '_self' : '') + '_text', {
count: names.length,
users: punctuateSeries(names)
})}

View File

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