diff --git a/app/assets/javascripts/discourse/components/navigation-item.js.es6 b/app/assets/javascripts/discourse/components/navigation-item.js.es6 index 62f6a37fdef..3ec22d8b8ca 100644 --- a/app/assets/javascripts/discourse/components/navigation-item.js.es6 +++ b/app/assets/javascripts/discourse/components/navigation-item.js.es6 @@ -4,22 +4,10 @@ import { bufferedRender } from 'discourse-common/lib/buffered-render'; export default Ember.Component.extend(bufferedRender({ tagName: 'li', classNameBindings: ['active', 'content.hasIcon:has-icon'], - attributeBindings: ['title'], + attributeBindings: ['content.title:title'], hidden: Em.computed.not('content.visible'), rerenderTriggers: ['content.count'], - @computed("content.categoryName", "content.name") - title(categoryName, name) { - const extra = {}; - - if (categoryName) { - name = "category"; - extra.categoryName = categoryName; - } - - return I18n.t("filters." + name.replace("/", ".") + ".help", extra); - }, - @computed("content.filterMode", "filterMode") active(contentFilterMode, filterMode) { return contentFilterMode === filterMode || diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6 index 5015496284e..6bc7ebc3d61 100644 --- a/app/assets/javascripts/discourse/models/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/models/nav-item.js.es6 @@ -3,6 +3,18 @@ import computed from 'ember-addons/ember-computed-decorators'; const NavItem = Discourse.Model.extend({ + @computed("categoryName", "name") + title(categoryName, name) { + const extra = {}; + + if (categoryName) { + name = "category"; + extra.categoryName = categoryName; + } + + return I18n.t("filters." + name.replace("/", ".") + ".help", extra); + }, + @computed("categoryName", "name", "count") displayName(categoryName, name, count) { count = count || 0;