davebaol
davebaol
@hyyan Thanks, this looks like an acceptable solution most of the times. However it's still not clear why computed functions are not available in lifecycle functions. It seems that Polymer...
Just replace the text message with `this.localize('myKey');` Also, about the function you're passing to async, you should either bind it to `this` or make it an arrow function.
@SheanYu Try something like this ``` javascript this.async((function() { toastMessage.show({ horizontalAlign: 'right', verticalAlign: 'top', duration: 5000, text: this.localize('login_failed') }); }).bind(this), 100); ```
@SheanYu Actually, that code is executed out of the ready function since it's an event handler. You just have to bind the event handler to `this` like that `(function(event) {...}).bind(this)`
@SheanYu Well, you're binding `this` to nothing. This should make it work ``` javascript loginForm.addEventListener('iron-form-response', (function(event) { ... }).bind(this)); ```
> I understand that resources may not yet be loaded, but I expect it to be another kind of error... I don't think it's a matter of resources not loaded...
@lluisgener Because being localize a computed property when language or resources change all `[[localize(...)]]` are dynamically re-calculated.