FIX: Deprecation overwriting translatedText CP

This allows us to pass a `textParams` object for options that will be
translated via i18n.
This commit is contained in:
Robin Ward 2020-09-29 15:58:13 -04:00
parent eac5dfd1ef
commit 8945a752f2
2 changed files with 4 additions and 3 deletions

View File

@ -5,10 +5,10 @@ import discourseComputed from "discourse-common/utils/decorators";
export default Component.extend({ export default Component.extend({
tagName: "span", tagName: "span",
@discourseComputed("text") @discourseComputed("text", "textParams")
translatedText(text) { translatedText(text) {
if (text) { if (text) {
return I18n.t(text); return I18n.t(...arguments);
} }
}, },

View File

@ -4,7 +4,8 @@
<span> <span>
{{discourse-linked-text {{discourse-linked-text
action=(action "turnOn") action=(action "turnOn")
translatedText=(i18n "pwa.install_banner" title=siteSettings.title) text="pwa.install_banner"
textParams=(hash title=siteSettings.title)
}} }}
</span> </span>
{{d-button {{d-button