t-params disapears
Closed this issue · 3 comments
hadrienl commented
Hi,
When I use t-params attribute to attribute data to my locale, the variable is displayed, then emptied. The bug does not occurs if I use the filter t
. You can see the bug in this video : https://www.dropbox.com/s/y69ixjjlp5gmnye/aurelia-bug-i18n.mov?dl=0
My code is just:
<button
t="mykey"
t-params.bind="{foo: foo}">
</button>
${'mykey'|t:{foo: foo}}
EisenbergEffect commented
@zewa666 Ping.
Jenselme commented
I have the same problem. I found a temporary workaround based on this comment: #104 (comment):
In the HTML:
<span t="global.name" t-params.bind="nameParams">Name</span>
In the JS:
// Init this.nameParams somewhere.
ea.subscribe('i18n:locale:changed', payload => {
this.nameParams = {playerName: this.me.name};
});