mirror of
https://github.com/flarum/core.git
synced 2025-07-30 05:00:56 +02:00
Change app.trans
calls to app.translator.trans
calls
This commit is contained in:
@@ -108,7 +108,7 @@ export default function addComposerAutocomplete() {
|
||||
const user = post.user();
|
||||
suggestions.push(
|
||||
makeSuggestion(user, '@' + user.username() + '#' + post.id(), [
|
||||
app.trans('flarum-mentions.forum.reply_to_post', {number: post.number()}), ' — ',
|
||||
app.translator.trans('flarum-mentions.forum.reply_to_post', {number: post.number()}), ' — ',
|
||||
truncate(post.contentPlain(), 200)
|
||||
], 'MentionsDropdown-post')
|
||||
);
|
||||
|
@@ -91,7 +91,7 @@ export default function addMentionedByList() {
|
||||
config={m.route}
|
||||
onclick={hidePreview}
|
||||
data-number={reply.number()}>
|
||||
{app.session.user === user ? app.trans('flarum-mentions.forum.you') : username(user)}
|
||||
{app.session.user === user ? app.translator.trans('flarum-mentions.forum.you') : username(user)}
|
||||
</a>
|
||||
);
|
||||
});
|
||||
@@ -100,7 +100,7 @@ export default function addMentionedByList() {
|
||||
<div className="Post-mentionedBy" config={config}>
|
||||
<span className="Post-mentionedBy-summary">
|
||||
{icon('reply')}
|
||||
{app.trans('flarum-mentions.forum.post_mentioned_by', {
|
||||
{app.translator.trans('flarum-mentions.forum.post_mentioned_by', {
|
||||
count: names.length,
|
||||
users: punctuateSeries(names)
|
||||
})}
|
||||
|
@@ -31,7 +31,7 @@ export default function() {
|
||||
items.add('reply',
|
||||
Button.component({
|
||||
className: 'Button Button--link',
|
||||
children: app.trans('flarum-mentions.forum.reply_link'),
|
||||
children: app.translator.trans('flarum-mentions.forum.reply_link'),
|
||||
onclick: () => {
|
||||
const quote = window.getSelection().toString();
|
||||
|
||||
|
@@ -21,11 +21,11 @@ export default class PostMentionedNotification extends Notification {
|
||||
const auc = notification.additionalUnreadCount();
|
||||
const user = notification.sender();
|
||||
|
||||
return app.trans('flarum-mentions.forum.post_mentioned_notification', {
|
||||
return app.translator.trans('flarum-mentions.forum.post_mentioned_notification', {
|
||||
user,
|
||||
username: auc ? punctuate([
|
||||
username(user),
|
||||
app.trans('flarum-mentions.forum.others', {count: auc})
|
||||
app.translator.trans('flarum-mentions.forum.others', {count: auc})
|
||||
]) : undefined
|
||||
});
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ export default class UserMentionedNotification extends Notification {
|
||||
content() {
|
||||
const user = this.props.notification.sender();
|
||||
|
||||
return app.trans('flarum-mentions.forum.user_mentioned_notification', {user});
|
||||
return app.translator.trans('flarum-mentions.forum.user_mentioned_notification', {user});
|
||||
}
|
||||
|
||||
excerpt() {
|
||||
|
@@ -35,13 +35,13 @@ app.initializers.add('flarum-mentions', function() {
|
||||
items.add('postMentioned', {
|
||||
name: 'postMentioned',
|
||||
icon: 'reply',
|
||||
label: app.trans('flarum-mentions.forum.notify_post_mentioned')
|
||||
label: app.translator.trans('flarum-mentions.forum.notify_post_mentioned')
|
||||
});
|
||||
|
||||
items.add('userMentioned', {
|
||||
name: 'userMentioned',
|
||||
icon: 'at',
|
||||
label: app.trans('flarum-mentions.forum.notify_user_mentioned')
|
||||
label: app.translator.trans('flarum-mentions.forum.notify_user_mentioned')
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user