mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 19:05:09 +08:00
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
Block a user