diff --git a/extensions/tags/js/src/admin/addTagChangePermission.js b/extensions/tags/js/src/admin/addTagChangePermission.js index 32803d681..d715f148b 100644 --- a/extensions/tags/js/src/admin/addTagChangePermission.js +++ b/extensions/tags/js/src/admin/addTagChangePermission.js @@ -12,7 +12,7 @@ export default function() { return SettingDropdown.component({ defaultLabel: minutes - ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes}) + ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', {count: minutes}) : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'), key: 'allow_tag_change', options: [ diff --git a/extensions/tags/js/src/forum/components/DiscussionTaggedPost.js b/extensions/tags/js/src/forum/components/DiscussionTaggedPost.js index 8f7fbd441..0320c5c6a 100644 --- a/extensions/tags/js/src/forum/components/DiscussionTaggedPost.js +++ b/extensions/tags/js/src/forum/components/DiscussionTaggedPost.js @@ -38,14 +38,14 @@ export default class DiscussionTaggedPost extends EventPost { const data = {}; if (this.attrs.tagsAdded.length) { - data.tagsAdded = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.attrs.tagsAdded.length, { + data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', { tags: tagsLabel(this.attrs.tagsAdded, {link: true}), count: this.attrs.tagsAdded.length }); } if (this.attrs.tagsRemoved.length) { - data.tagsRemoved = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.attrs.tagsRemoved.length, { + data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', { tags: tagsLabel(this.attrs.tagsRemoved, {link: true}), count: this.attrs.tagsRemoved.length }); diff --git a/extensions/tags/js/src/forum/components/TagDiscussionModal.js b/extensions/tags/js/src/forum/components/TagDiscussionModal.js index 0c60a066e..8d0d015f1 100644 --- a/extensions/tags/js/src/forum/components/TagDiscussionModal.js +++ b/extensions/tags/js/src/forum/components/TagDiscussionModal.js @@ -111,10 +111,10 @@ export default class TagDiscussionModal extends Modal { getInstruction(primaryCount, secondaryCount) { if (primaryCount < this.minPrimary) { const remaining = this.minPrimary - primaryCount; - return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_primary_placeholder', remaining, {count: remaining}); + return app.translator.trans('flarum-tags.forum.choose_tags.choose_primary_placeholder', {count: remaining}); } else if (secondaryCount < this.minSecondary) { const remaining = this.minSecondary - secondaryCount; - return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_secondary_placeholder', remaining, {count: remaining}); + return app.translator.trans('flarum-tags.forum.choose_tags.choose_secondary_placeholder', {count: remaining}); } return ''; diff --git a/extensions/tags/locale/en.yml b/extensions/tags/locale/en.yml index 3527507cf..11b4d3709 100644 --- a/extensions/tags/locale/en.yml +++ b/extensions/tags/locale/en.yml @@ -66,8 +66,8 @@ flarum-tags: # These translations are used by the Choose Tags modal dialog. choose_tags: - choose_primary_placeholder: "Choose a primary tag|Choose {count} primary tags" - choose_secondary_placeholder: "Choose 1 more tag|Choose {count} more tags" + choose_primary_placeholder: "{count, plural, one {Choose a primary tag} other {Choose # primary tags}}" + choose_secondary_placeholder: "{count, plural, one {Choose 1 more tag} other {Choose # more tags}}" edit_title: "Edit Tags for {title}" submit_button: => core.ref.okay title: Choose Tags for Your Discussion @@ -94,7 +94,7 @@ flarum-tags: added_and_removed_tags_text: "{username} added the {tagsAdded} and removed the {tagsRemoved}." added_tags_text: "{username} added the {tagsAdded}." removed_tags_text: "{username} removed the {tagsRemoved}." - tags_text: "{tags} tag|{tags} tags" + tags_text: "{count, plural, one {# tag} other {# tags}}" # These translations are used when visiting a single tag's discussion list. tag: