mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Merge pull request #5 from dcsjapan/key-reorganization
Reorganize key names
This commit is contained in:
commit
a638945cef
|
@ -9,7 +9,7 @@ export default function addSubscriptionBadge() {
|
|||
switch (this.subscription()) {
|
||||
case 'follow':
|
||||
badge = Badge.component({
|
||||
label: app.translator.trans('flarum-subscriptions.forum.following'),
|
||||
label: app.translator.trans('flarum-subscriptions.forum.badge.following_tooltip'),
|
||||
icon: 'star',
|
||||
type: 'following'
|
||||
});
|
||||
|
@ -17,7 +17,7 @@ export default function addSubscriptionBadge() {
|
|||
|
||||
case 'ignore':
|
||||
badge = Badge.component({
|
||||
label: app.translator.trans('flarum-subscriptions.forum.ignoring'),
|
||||
label: app.translator.trans('flarum-subscriptions.forum.badge.ignoring_tooltip'),
|
||||
icon: 'eye-slash',
|
||||
type: 'ignoring'
|
||||
});
|
||||
|
|
|
@ -9,9 +9,9 @@ export default function addSubscriptionControls() {
|
|||
extend(DiscussionControls, 'userControls', function(items, discussion, context) {
|
||||
if (app.session.user && !(context instanceof DiscussionPage)) {
|
||||
const states = {
|
||||
none: {label: app.translator.trans('flarum-subscriptions.forum.follow'), icon: 'star', save: 'follow'},
|
||||
follow: {label: app.translator.trans('flarum-subscriptions.forum.unfollow'), icon: 'star-o', save: false},
|
||||
ignore: {label: app.translator.trans('flarum-subscriptions.forum.unignore'), icon: 'eye', save: false}
|
||||
none: {label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'), icon: 'star', save: 'follow'},
|
||||
follow: {label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'), icon: 'star-o', save: false},
|
||||
ignore: {label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'), icon: 'eye', save: false}
|
||||
};
|
||||
|
||||
const subscription = discussion.subscription() || 'none';
|
||||
|
|
|
@ -12,7 +12,7 @@ export default function addSubscriptionFilter() {
|
|||
|
||||
items.add('following', LinkButton.component({
|
||||
href: app.route('index.filter', params),
|
||||
children: app.translator.trans('flarum-subscriptions.forum.following'),
|
||||
children: app.translator.trans('flarum-subscriptions.forum.index.following_link'),
|
||||
icon: 'star'
|
||||
}), 50);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@ export default class NewPostNotification extends Notification {
|
|||
}
|
||||
|
||||
content() {
|
||||
return app.translator.trans('flarum-subscriptions.forum.new_post_notification', {user: this.props.notification.sender()});
|
||||
return app.translator.trans('flarum-subscriptions.forum.notifications:new_post_text', {user: this.props.notification.sender()});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,18 +9,18 @@ export default class SubscriptionMenu extends Component {
|
|||
const discussion = this.props.discussion;
|
||||
const subscription = discussion.subscription();
|
||||
|
||||
let buttonLabel = app.translator.trans('flarum-subscriptions.forum.follow');
|
||||
let buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button');
|
||||
let buttonIcon = 'star-o';
|
||||
const buttonClass = 'SubscriptionMenu-button--' + subscription;
|
||||
|
||||
switch (subscription) {
|
||||
case 'follow':
|
||||
buttonLabel = app.translator.trans('flarum-subscriptions.forum.following');
|
||||
buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');
|
||||
buttonIcon = 'star';
|
||||
break;
|
||||
|
||||
case 'ignore':
|
||||
buttonLabel = app.translator.trans('flarum-subscriptions.forum.ignoring');
|
||||
buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button');
|
||||
buttonIcon = 'eye-slash';
|
||||
break;
|
||||
|
||||
|
@ -32,20 +32,20 @@ export default class SubscriptionMenu extends Component {
|
|||
{
|
||||
subscription: false,
|
||||
icon: 'star-o',
|
||||
label: app.translator.trans('flarum-subscriptions.forum.not_following'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.not_following_description')
|
||||
label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text')
|
||||
},
|
||||
{
|
||||
subscription: 'follow',
|
||||
icon: 'star',
|
||||
label: app.translator.trans('flarum-subscriptions.forum.following'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.following_description')
|
||||
label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text')
|
||||
},
|
||||
{
|
||||
subscription: 'ignore',
|
||||
icon: 'eye-slash',
|
||||
label: app.translator.trans('flarum-subscriptions.forum.ignoring'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.ignoring_description')
|
||||
label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),
|
||||
description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text')
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ app.initializers.add('subscriptions', function() {
|
|||
items.add('newPost', {
|
||||
name: 'newPost',
|
||||
icon: 'star',
|
||||
label: app.translator.trans('flarum-subscriptions.forum.notify_new_post')
|
||||
label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label')
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user