mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Merge pull request #3 from dcsjapan/key-reorganization
Reorganize key names
This commit is contained in:
commit
4d3f6a2c15
|
@ -6,7 +6,7 @@ app.initializers.add('flarum-likes', () => {
|
||||||
extend(PermissionGrid.prototype, 'replyItems', items => {
|
extend(PermissionGrid.prototype, 'replyItems', items => {
|
||||||
items.add('likePosts', {
|
items.add('likePosts', {
|
||||||
icon: 'thumbs-o-up',
|
icon: 'thumbs-o-up',
|
||||||
label: 'Like posts',
|
label: app.translator.trans('flarum-likes.admin.permissions.like_posts_label'),
|
||||||
permission: 'discussion.likePosts'
|
permission: 'discussion.likePosts'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default function() {
|
||||||
|
|
||||||
items.add('like',
|
items.add('like',
|
||||||
Button.component({
|
Button.component({
|
||||||
children: app.translator.trans(isLiked ? 'flarum-likes.forum.unlike_action' : 'flarum-likes.forum.like_action'),
|
children: app.translator.trans(isLiked ? 'flarum-likes.forum.post.unlike_link' : 'flarum-likes.forum.post.like_link'),
|
||||||
className: 'Button Button--link',
|
className: 'Button Button--link',
|
||||||
onclick: () => {
|
onclick: () => {
|
||||||
isLiked = !isLiked;
|
isLiked = !isLiked;
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default function() {
|
||||||
.map(user => {
|
.map(user => {
|
||||||
return (
|
return (
|
||||||
<a href={app.route.user(user)} config={m.route}>
|
<a href={app.route.user(user)} config={m.route}>
|
||||||
{user === app.session.user ? app.translator.trans('flarum-likes.forum.you') : username(user)}
|
{user === app.session.user ? app.translator.trans('flarum-likes.forum.post.you_text') : username(user)}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -39,7 +39,7 @@ export default function() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
app.modal.show(new PostLikesModal({post}));
|
app.modal.show(new PostLikesModal({post}));
|
||||||
}}>
|
}}>
|
||||||
{app.translator.transChoice('flarum-likes.forum.others', count, {count})}
|
{app.translator.transChoice('flarum-likes.forum.post.others_link', count, {count})}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,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.translator.transChoice('flarum-likes.forum.post_liked_by' + (likes[0] === app.session.user ? '_self' : ''), names.length, {
|
{app.translator.transChoice('flarum-likes.forum.post.liked_by' + (likes[0] === app.session.user ? '_self' : '') + '_text', names.length, {
|
||||||
count: names.length,
|
count: names.length,
|
||||||
users: punctuateSeries(names)
|
users: punctuateSeries(names)
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default class PostLikedNotification extends Notification {
|
||||||
const user = notification.sender();
|
const user = notification.sender();
|
||||||
const auc = notification.additionalUnreadCount();
|
const auc = notification.additionalUnreadCount();
|
||||||
|
|
||||||
return app.translator.trans('flarum-likes.forum.post_liked_notification', {
|
return app.translator.trans('flarum-likes.forum.notifications.post_liked_text', {
|
||||||
user,
|
user,
|
||||||
username: auc ? punctuateSeries([
|
username: auc ? punctuateSeries([
|
||||||
username(user),
|
username(user),
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default class PostLikesModal extends Modal {
|
||||||
}
|
}
|
||||||
|
|
||||||
title() {
|
title() {
|
||||||
return app.translator.trans('flarum-likes.forum.post_likes_modal_title');
|
return app.translator.trans('flarum-likes.forum.post_likes.title');
|
||||||
}
|
}
|
||||||
|
|
||||||
content() {
|
content() {
|
||||||
|
|
|
@ -21,7 +21,7 @@ app.initializers.add('flarum-likes', () => {
|
||||||
items.add('postLiked', {
|
items.add('postLiked', {
|
||||||
name: 'postLiked',
|
name: 'postLiked',
|
||||||
icon: 'thumbs-o-up',
|
icon: 'thumbs-o-up',
|
||||||
label: app.translator.trans('flarum-likes.forum.notify_post_liked')
|
label: app.translator.trans('flarum-likes.forum.settings.notify_post_liked_label')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user