From f1f9ef75ce4248b29488668d55912b77efa857e0 Mon Sep 17 00:00:00 2001 From: dcsjapan Date: Fri, 23 Oct 2015 10:01:44 +0900 Subject: [PATCH] Reorganize key names See [flarum/core #265](https://github.com/flarum/core/issues/265). - Adjusts key names to three-tier namespacing. - Extracts previously unextracted strings. - Code fix needed in DiscussionTaggedPost.js before this can be used. --- js/admin/src/addTagPermission.js | 2 +- js/admin/src/addTagsHomePageOption.js | 2 +- js/admin/src/addTagsPane.js | 4 ++-- js/admin/src/addTagsPermissionScope.js | 2 +- js/admin/src/components/EditTagModal.js | 20 +++++++++---------- js/admin/src/components/TagSettingsModal.js | 14 ++++++------- js/admin/src/components/TagsPage.js | 10 +++++----- js/forum/src/addTagComposer.js | 2 +- js/forum/src/addTagControl.js | 2 +- js/forum/src/addTagList.js | 4 ++-- .../src/components/DiscussionTaggedPost.js | 13 ++++++++++-- js/forum/src/components/TagDiscussionModal.js | 10 +++++----- js/forum/src/components/TagLinkButton.js | 2 +- js/lib/helpers/tagLabel.js | 2 +- 14 files changed, 49 insertions(+), 40 deletions(-) diff --git a/js/admin/src/addTagPermission.js b/js/admin/src/addTagPermission.js index d7126234..1a09145b 100644 --- a/js/admin/src/addTagPermission.js +++ b/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/js/admin/src/addTagsHomePageOption.js b/js/admin/src/addTagsHomePageOption.js index b90b3eef..1d943831 100644 --- a/js/admin/src/addTagsHomePageOption.js +++ b/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/js/admin/src/addTagsPane.js b/js/admin/src/addTagsPane.js index 81deeac5..56bbb9b9 100644 --- a/js/admin/src/addTagsPane.js +++ b/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/js/admin/src/addTagsPermissionScope.js b/js/admin/src/addTagsPermissionScope.js index e816bbdb..d6b50ecf 100644 --- a/js/admin/src/addTagsPermissionScope.js +++ b/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/js/admin/src/components/EditTagModal.js b/js/admin/src/components/EditTagModal.js index a3802236..2d762c5e 100644 --- a/js/admin/src/components/EditTagModal.js +++ b/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 {
- - { + + { this.name(e.target.value); this.slug(slug(e.target.value)); }}/>
- +
- +