Merge pull request #3 from dcsjapan/key-reorganization

Reorganize key names
This commit is contained in:
Toby Zerner 2015-10-23 13:29:54 +10:30
commit 4d3f6a2c15
6 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@ app.initializers.add('flarum-likes', () => {
extend(PermissionGrid.prototype, 'replyItems', items => {
items.add('likePosts', {
icon: 'thumbs-o-up',
label: 'Like posts',
label: app.translator.trans('flarum-likes.admin.permissions.like_posts_label'),
permission: 'discussion.likePosts'
});
});

View File

@ -13,7 +13,7 @@ export default function() {
items.add('like',
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',
onclick: () => {
isLiked = !isLiked;

View File

@ -23,7 +23,7 @@ export default function() {
.map(user => {
return (
<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>
);
});
@ -39,7 +39,7 @@ export default function() {
e.preventDefault();
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>
);
}
@ -47,7 +47,7 @@ export default function() {
items.add('liked', (
<div className="Post-likedBy">
{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,
users: punctuateSeries(names)
})}

View File

@ -16,7 +16,7 @@ export default class PostLikedNotification extends Notification {
const user = notification.sender();
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,
username: auc ? punctuateSeries([
username(user),

View File

@ -8,7 +8,7 @@ export default class PostLikesModal extends Modal {
}
title() {
return app.translator.trans('flarum-likes.forum.post_likes_modal_title');
return app.translator.trans('flarum-likes.forum.post_likes.title');
}
content() {

View File

@ -21,7 +21,7 @@ app.initializers.add('flarum-likes', () => {
items.add('postLiked', {
name: 'postLiked',
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')
});
});
});