diff --git a/extensions/tags/js/forum/src/addTagComposer.js b/extensions/tags/js/forum/src/addTagComposer.js index 2640fe206..8cd8c5dab 100644 --- a/extensions/tags/js/forum/src/addTagComposer.js +++ b/extensions/tags/js/forum/src/addTagComposer.js @@ -35,7 +35,7 @@ export default function() { {this.tags.length ? tagsLabel(this.tags) - : {app.trans('tags.tag_new_discussion_link')}} + : {app.trans('flarum-tags.forum.tag_new_discussion_link')}} ), 10); }); diff --git a/extensions/tags/js/forum/src/addTagControl.js b/extensions/tags/js/forum/src/addTagControl.js index 802f9666e..994211880 100644 --- a/extensions/tags/js/forum/src/addTagControl.js +++ b/extensions/tags/js/forum/src/addTagControl.js @@ -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})) })); diff --git a/extensions/tags/js/forum/src/addTagList.js b/extensions/tags/js/forum/src/addTagList.js index dabcb1f8c..3f8bdf2fd 100644 --- a/extensions/tags/js/forum/src/addTagList.js +++ b/extensions/tags/js/forum/src/addTagList.js @@ -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); } diff --git a/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js b/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js index 093a2b282..8daf80e72 100644 --- a/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js +++ b/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js @@ -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 })); diff --git a/extensions/tags/js/forum/src/components/TagDiscussionModal.js b/extensions/tags/js/forum/src/components/TagDiscussionModal.js index 984f9f9c9..5d2369086 100644 --- a/extensions/tags/js/forum/src/components/TagDiscussionModal.js +++ b/extensions/tags/js/forum/src/components/TagDiscussionModal.js @@ -85,15 +85,17 @@ export default class TagDiscussionModal extends Modal { title() { return this.props.discussion - ? app.trans('tags.edit_discussion_tags_title', {title: {this.props.discussion.title()}}) - : app.trans('tags.tag_new_discussion_title'); + ? app.trans('flarum-tags.forum.edit_discussion_tags_title', {title: {this.props.discussion.title()}}) + : 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') })} diff --git a/extensions/tags/js/forum/src/components/TagLinkButton.js b/extensions/tags/js/forum/src/components/TagLinkButton.js index a4830ea9e..e4fc44c04 100644 --- a/extensions/tags/js/forum/src/components/TagLinkButton.js +++ b/extensions/tags/js/forum/src/components/TagLinkButton.js @@ -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'); } } diff --git a/extensions/tags/js/lib/helpers/tagLabel.js b/extensions/tags/js/lib/helpers/tagLabel.js index f60c5e37f..8b365858e 100644 --- a/extensions/tags/js/lib/helpers/tagLabel.js +++ b/extensions/tags/js/lib/helpers/tagLabel.js @@ -25,7 +25,7 @@ export default function tagLabel(tag, attrs = {}) { return ( m((link ? 'a' : 'span'), attrs, - {tag ? tag.name() : app.trans('tags.deleted')} + {tag ? tag.name() : app.trans('flarum-tags.forum.deleted')} ) );