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({
|
||||
tagName: "span",
|
||||
|
||||
@discourseComputed("text")
|
||||
@discourseComputed("text", "textParams")
|
||||
translatedText(text) {
|
||||
if (text) {
|
||||
return I18n.t(text);
|
||||
return I18n.t(...arguments);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<span>
|
||||
{{discourse-linked-text
|
||||
action=(action "turnOn")
|
||||
translatedText=(i18n "pwa.install_banner" title=siteSettings.title)
|
||||
text="pwa.install_banner"
|
||||
textParams=(hash title=siteSettings.title)
|
||||
}}
|
||||
</span>
|
||||
{{d-button
|
||||
|
|
Loading…
Reference in New Issue