mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 19:09:41 +08:00
Update translation IDs
This commit is contained in:
parent
76eaf8cb2d
commit
37fac5a0d4
@ -35,7 +35,7 @@ export default function() {
|
||||
<a className="DiscussionComposer-changeTags" onclick={this.chooseTags.bind(this)}>
|
||||
{this.tags.length
|
||||
? tagsLabel(this.tags)
|
||||
: <span className="TagLabel untagged">{app.trans('tags.tag_new_discussion_link')}</span>}
|
||||
: <span className="TagLabel untagged">{app.trans('flarum-tags.forum.tag_new_discussion_link')}</span>}
|
||||
</a>
|
||||
), 10);
|
||||
});
|
||||
|
@ -9,7 +9,7 @@ export default function() {
|
||||
extend(DiscussionControls, 'moderationControls', function(items, discussion) {
|
||||
if (discussion.canTag()) {
|
||||
items.add('tags', Button.component({
|
||||
children: app.trans('tags.edit_discussion_tags_link'),
|
||||
children: app.trans('flarum-tags.forum.edit_discussion_tags_link'),
|
||||
icon: 'tag',
|
||||
onclick: () => app.modal.show(new TagDiscussionModal({discussion}))
|
||||
}));
|
||||
|
@ -13,7 +13,7 @@ export default function() {
|
||||
extend(IndexPage.prototype, 'navItems', function(items) {
|
||||
items.add('tags', LinkButton.component({
|
||||
icon: 'th-large',
|
||||
children: app.trans('tags.tags'),
|
||||
children: app.trans('flarum-tags.forum.tags'),
|
||||
href: app.route('tags')
|
||||
}), -10);
|
||||
|
||||
@ -47,7 +47,7 @@ export default function() {
|
||||
|
||||
if (more.length) {
|
||||
items.add('moreTags', LinkButton.component({
|
||||
children: app.trans('tags.more'),
|
||||
children: app.trans('flarum-tags.forum.more'),
|
||||
href: app.route('tags')
|
||||
}), -10);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export default class DiscussionTaggedPost extends EventPost {
|
||||
}
|
||||
|
||||
descriptionKey() {
|
||||
return 'tags.discussion_tagged_post';
|
||||
return 'flarum-tags.forum.discussion_tagged_post';
|
||||
}
|
||||
|
||||
descriptionData() {
|
||||
@ -27,14 +27,14 @@ export default class DiscussionTaggedPost extends EventPost {
|
||||
const actions = [];
|
||||
|
||||
if (added.length) {
|
||||
actions.push(app.trans('tags.added_tags', {
|
||||
actions.push(app.translator.transChoice('flarum-tags.forum.added_tags', added, {
|
||||
tags: tagsLabel(added, {link: true}),
|
||||
count: added
|
||||
}));
|
||||
}
|
||||
|
||||
if (removed.length) {
|
||||
actions.push(app.trans('tags.removed_tags', {
|
||||
actions.push(app.translator.transChoice('flarum-tags.forum.removed_tags', removed, {
|
||||
tags: tagsLabel(removed, {link: true}),
|
||||
count: removed
|
||||
}));
|
||||
|
@ -85,15 +85,17 @@ export default class TagDiscussionModal extends Modal {
|
||||
|
||||
title() {
|
||||
return this.props.discussion
|
||||
? app.trans('tags.edit_discussion_tags_title', {title: <em>{this.props.discussion.title()}</em>})
|
||||
: app.trans('tags.tag_new_discussion_title');
|
||||
? app.trans('flarum-tags.forum.edit_discussion_tags_title', {title: <em>{this.props.discussion.title()}</em>})
|
||||
: app.trans('flarum-tags.forum.tag_new_discussion_title');
|
||||
}
|
||||
|
||||
getInstruction(primaryCount, secondaryCount) {
|
||||
if (primaryCount < this.minPrimary) {
|
||||
return app.trans('tags.choose_primary_tags', {count: this.minPrimary - primaryCount});
|
||||
const remaining = this.minPrimary - primaryCount;
|
||||
return app.translator.transChoice('flarum-tags.forum.choose_primary_tags', remaining, {count: remaining});
|
||||
} else if (secondaryCount < this.minSecondary) {
|
||||
return app.trans('tags.choose_secondary_tags', {count: this.minSecondary - secondaryCount});
|
||||
const remaining = this.minSecondary - secondaryCount;
|
||||
return app.translator.transChoice('flarum-tags.forum.choose_secondary_tags', remaining, {count: remaining});
|
||||
}
|
||||
|
||||
return '';
|
||||
@ -160,7 +162,7 @@ export default class TagDiscussionModal extends Modal {
|
||||
className: 'Button Button--primary',
|
||||
disabled: primaryCount < this.minPrimary || secondaryCount < this.minSecondary,
|
||||
icon: 'check',
|
||||
children: app.trans('tags.confirm')
|
||||
children: app.trans('flarum-tags.forum.confirm')
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,6 +22,6 @@ export default class TagLinkButton extends LinkButton {
|
||||
|
||||
props.params.tags = tag ? tag.slug() : 'untagged';
|
||||
props.href = app.route('tag', props.params);
|
||||
props.children = tag ? tag.name() : app.trans('tags.untagged');
|
||||
props.children = tag ? tag.name() : app.trans('flarum-tags.forum.untagged');
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export default function tagLabel(tag, attrs = {}) {
|
||||
return (
|
||||
m((link ? 'a' : 'span'), attrs,
|
||||
<span className="TagLabel-text">
|
||||
{tag ? tag.name() : app.trans('tags.deleted')}
|
||||
{tag ? tag.name() : app.trans('flarum-tags.forum.deleted')}
|
||||
</span>
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user