UX: Allow emojis to be displayed in nav-item.

This commit is contained in:
Guo Xiang Tan 2018-07-30 18:02:34 +08:00
parent ef78268c01
commit 581cf62bcf
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { toTitleCase } from "discourse/lib/formatter"; import { toTitleCase } from "discourse/lib/formatter";
import { emojiUnescape } from "discourse/lib/text";
import computed from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators";
const NavItem = Discourse.Model.extend({ const NavItem = Discourse.Model.extend({
@ -30,7 +31,9 @@ const NavItem = Discourse.Model.extend({
extra.categoryName = toTitleCase(categoryName); extra.categoryName = toTitleCase(categoryName);
} }
return I18n.t(`filters.${name.replace("/", ".") + titleKey}`, extra); return emojiUnescape(
I18n.t(`filters.${name.replace("/", ".") + titleKey}`, extra)
);
}, },
@computed("name") @computed("name")