diff --git a/extensions/tags/js/admin/src/addTagPermission.js b/extensions/tags/js/admin/src/addTagPermission.js
index d71262344..1a09145b0 100644
--- a/extensions/tags/js/admin/src/addTagPermission.js
+++ b/extensions/tags/js/admin/src/addTagPermission.js
@@ -5,7 +5,7 @@ export default function() {
extend(PermissionGrid.prototype, 'moderateItems', items => {
items.add('tag', {
icon: 'tag',
- label: 'Tag discussions',
+ label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),
permission: 'discussion.tag'
}, 95);
});
diff --git a/extensions/tags/js/admin/src/addTagsHomePageOption.js b/extensions/tags/js/admin/src/addTagsHomePageOption.js
index b90b3eefa..1d9438314 100644
--- a/extensions/tags/js/admin/src/addTagsHomePageOption.js
+++ b/extensions/tags/js/admin/src/addTagsHomePageOption.js
@@ -5,7 +5,7 @@ export default function() {
extend(BasicsPage.prototype, 'homePageItems', items => {
items.add('tags', {
path: '/tags',
- label: 'Tags'
+ label: app.translator.trans('flarum-tags.admin.basics.tags_label')
});
});
}
diff --git a/extensions/tags/js/admin/src/addTagsPane.js b/extensions/tags/js/admin/src/addTagsPane.js
index 81deeac58..56bbb9b98 100644
--- a/extensions/tags/js/admin/src/addTagsPane.js
+++ b/extensions/tags/js/admin/src/addTagsPane.js
@@ -13,8 +13,8 @@ export default function() {
items.add('tags', AdminLinkButton.component({
href: app.route('tags'),
icon: 'tags',
- children: 'Tags',
- description: 'Manage the list of tags available to organise discussions with.'
+ children: app.translator.trans('flarum-tags.admin.nav.tags_button'),
+ description: app.translator.trans('flarum-tags.admin.nav.tags_text')
}));
});
}
diff --git a/extensions/tags/js/admin/src/addTagsPermissionScope.js b/extensions/tags/js/admin/src/addTagsPermissionScope.js
index e816bbdb9..d6b50ecfe 100644
--- a/extensions/tags/js/admin/src/addTagsPermissionScope.js
+++ b/extensions/tags/js/admin/src/addTagsPermissionScope.js
@@ -37,7 +37,7 @@ export default function() {
items.add('tag', Dropdown.component({
className: 'Dropdown--restrictByTag',
buttonClassName: 'Button Button--text',
- label: 'Restrict by Tag',
+ label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),
icon: 'plus',
caretIcon: null,
children: tags.map(tag => Button.component({
diff --git a/extensions/tags/js/admin/src/components/EditTagModal.js b/extensions/tags/js/admin/src/components/EditTagModal.js
index a38022363..2d762c5ef 100644
--- a/extensions/tags/js/admin/src/components/EditTagModal.js
+++ b/extensions/tags/js/admin/src/components/EditTagModal.js
@@ -31,7 +31,7 @@ export default class EditTagModal extends Modal {
name: this.name,
color: this.color
})
- : 'Create Tag';
+ : app.translator.trans('flarum-tags.admin.edit_tag.title');
}
content() {
@@ -39,25 +39,25 @@ export default class EditTagModal extends Modal {
@@ -75,11 +75,11 @@ export default class EditTagModal extends Modal {
type: 'submit',
className: 'Button Button--primary EditTagModal-save',
loading: this.loading,
- children: 'Save Changes'
+ children: app.translator.trans('flarum-tags.admin.edit_tag.submit_button')
})}
{this.tag.exists ? (
- Delete Tag
+ {app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_button')}
) : ''}
@@ -109,7 +109,7 @@ export default class EditTagModal extends Modal {
}
delete() {
- if (confirm('Are you sure you want to delete this tag? The tag\'s discussions will NOT be deleted.')) {
+ if (confirm(app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_confirmation'))) {
this.tag.delete().then(() => m.redraw());
this.hide();
}
diff --git a/extensions/tags/js/admin/src/components/TagSettingsModal.js b/extensions/tags/js/admin/src/components/TagSettingsModal.js
index d570005a8..b1e54ebb5 100644
--- a/extensions/tags/js/admin/src/components/TagSettingsModal.js
+++ b/extensions/tags/js/admin/src/components/TagSettingsModal.js
@@ -11,7 +11,7 @@ export default class TagSettingsModal extends SettingsModal {
}
title() {
- return 'Tag Settings';
+ return app.translator.trans('flarum-tags.admin.tag_settings.title');
}
form() {
@@ -23,9 +23,9 @@ export default class TagSettingsModal extends SettingsModal {
return [
-
Required Number of Primary Tags
+
{app.translator.trans('flarum-tags.admin.tag_settings.required_primary_heading')}
- Enter the minimum and maximum number of primary tags that may be applied to a discussion.
+ {app.translator.trans('flarum-tags.admin.tag_settings.required_primary_text')}
- {' to '}
+ {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}
,
-
Required Number of Secondary Tags
+
{app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_heading')}
- Enter the minimum and maximum number of secondary tags that may be applied to a discussion.
+ {app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_text')}
- {' to '}
+ {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}
- Tags are used to categorize discussions. Primary tags are like traditional forum categories: They can be arranged in a two-level hierarchy. Secondary tags do not have hierarchy or order, and are useful for micro-categorization.
+ {app.translator.trans('flarum-tags.admin.tags.about_tags_text')}
{Button.component({
className: 'Button Button--primary',
icon: 'plus',
- children: 'Create Tag',
+ children: app.translator.trans('flarum-tags.admin.tags.create_tag_button'),
onclick: () => app.modal.show(new EditTagModal())
})}
{Button.component({
className: 'Button',
- children: 'Settings',
+ children: app.translator.trans('flarum-tags.admin.tags.settings_button'),
onclick: () => app.modal.show(new TagSettingsModal())
})}
@@ -54,7 +54,7 @@ export default class TagsPage extends Component {
-
Primary Tags
+
{app.translator.trans('flarum-tags.admin.tags.primary_heading')}
{sortTags(app.store.all('tags'))
.filter(tag => tag.position() !== null && !tag.isChild())
@@ -63,7 +63,7 @@ export default class TagsPage extends Component {
-
Secondary Tags
+
{app.translator.trans('flarum-tags.admin.tags.secondary_heading')}
{app.store.all('tags')
.filter(tag => tag.position() === null)
diff --git a/extensions/tags/js/forum/src/addTagComposer.js b/extensions/tags/js/forum/src/addTagComposer.js
index c43c45705..05ae57905 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.translator.trans('flarum-tags.forum.tag_new_discussion_link')} }
+ : {app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')} }
), 10);
});
diff --git a/extensions/tags/js/forum/src/addTagControl.js b/extensions/tags/js/forum/src/addTagControl.js
index c84cbbac8..55f9cf86f 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.translator.trans('flarum-tags.forum.edit_discussion_tags_link'),
+ children: app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button'),
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 7f29eb8ab..b1e553622 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.translator.trans('flarum-tags.forum.tags'),
+ children: app.translator.trans('flarum-tags.forum.index.tags_link'),
href: app.route('tags')
}), -10);
@@ -47,7 +47,7 @@ export default function() {
if (more.length) {
items.add('moreTags', LinkButton.component({
- children: app.translator.trans('flarum-tags.forum.more'),
+ children: app.translator.trans('flarum-tags.forum.index.more_link'),
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 8daf80e72..ff9c3711f 100644
--- a/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js
+++ b/extensions/tags/js/forum/src/components/DiscussionTaggedPost.js
@@ -7,6 +7,12 @@ export default class DiscussionTaggedPost extends EventPost {
return 'tag';
}
+ // NEED TO FIX:
+ // This should return one of three strings, depending on whether tags are added, removed, or both:
+ // if added: app.translator.trans('flarum-tags.forum.post_stream.added_tags_text')
+ // if removed: app.translator.trans('flarum-tags.forum.post_stream.removed_tags_text')
+ // if both: app.translator.trans('flarum-tags.forum.post_stream.added_and_removed_tags_text')
+ // The 'flarum-tags.forum.discussion_tagged_post' key has been removed from the YAML.
descriptionKey() {
return 'flarum-tags.forum.discussion_tagged_post';
}
@@ -26,15 +32,18 @@ export default class DiscussionTaggedPost extends EventPost {
const removed = diffTags(oldTags, newTags);
const actions = [];
+ // PLEASE CHECK:
+ // Both {addedTags} and {removedTags} in the above three strings can be returned using the same key.
+ // The key names has been changed ... Is it possible to combine these two operations?
if (added.length) {
- actions.push(app.translator.transChoice('flarum-tags.forum.added_tags', added, {
+ actions.push(app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', added, {
tags: tagsLabel(added, {link: true}),
count: added
}));
}
if (removed.length) {
- actions.push(app.translator.transChoice('flarum-tags.forum.removed_tags', removed, {
+ actions.push(app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', 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 899509d4a..84dbc0110 100644
--- a/extensions/tags/js/forum/src/components/TagDiscussionModal.js
+++ b/extensions/tags/js/forum/src/components/TagDiscussionModal.js
@@ -85,17 +85,17 @@ export default class TagDiscussionModal extends Modal {
title() {
return this.props.discussion
- ? app.translator.trans('flarum-tags.forum.edit_discussion_tags_title', {title: {this.props.discussion.title()} })
- : app.translator.trans('flarum-tags.forum.tag_new_discussion_title');
+ ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', {title: {this.props.discussion.title()} })
+ : app.translator.trans('flarum-tags.forum.choose_tags.title');
}
getInstruction(primaryCount, secondaryCount) {
if (primaryCount < this.minPrimary) {
const remaining = this.minPrimary - primaryCount;
- return app.translator.transChoice('flarum-tags.forum.choose_primary_tags', remaining, {count: remaining});
+ return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_primary_placeholder', remaining, {count: remaining});
} else if (secondaryCount < this.minSecondary) {
const remaining = this.minSecondary - secondaryCount;
- return app.translator.transChoice('flarum-tags.forum.choose_secondary_tags', remaining, {count: remaining});
+ return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_secondary_placeholder', remaining, {count: remaining});
}
return '';
@@ -162,7 +162,7 @@ export default class TagDiscussionModal extends Modal {
className: 'Button Button--primary',
disabled: primaryCount < this.minPrimary || secondaryCount < this.minSecondary,
icon: 'check',
- children: app.translator.trans('flarum-tags.forum.confirm')
+ children: app.translator.trans('flarum-tags.forum.choose_tags.submit_button')
})}
diff --git a/extensions/tags/js/forum/src/components/TagLinkButton.js b/extensions/tags/js/forum/src/components/TagLinkButton.js
index 5a7eb2569..337e74fba 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.translator.trans('flarum-tags.forum.untagged');
+ props.children = tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link');
}
}
diff --git a/extensions/tags/js/lib/helpers/tagLabel.js b/extensions/tags/js/lib/helpers/tagLabel.js
index 301ae3f23..716099854 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.translator.trans('flarum-tags.forum.deleted')}
+ {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}
)
);