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:
parent
eac5dfd1ef
commit
8945a752f2
|
@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue