You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On initial load, model A is populated, which contains a valid i18n key for both line 1 and 2:
Clicking the Load model B button then causes the bound values to be replaced with a new model that only has the line 1 property defined:
Note that when using the t.bind syntax, the Model A line 2 translation cell is left bound.
This behaviour differs when the key is fed via the t value converter (see the last column in the table), which does correctly clear the translation of line 2 when the second model is loaded.
Expected/desired behavior:
I am expecting the behaviour of t.bind to match the behaviour seen for ${ key & t}. It seems logical to me that if the bound value is set to undefined or cleared, the translation should also be cleared to reflect the new model.
The text was updated successfully, but these errors were encountered:
I'm submitting a bug report
Library Version:
aurelia-i18n 3.0.0-beta.7
Webpack AND Version
webpack 4.27.0
webpack-cli 3.3.5
Browser:
all
Language:
TypeScript 3.1.2
Current behavior:
When using the
t.bind
syntax, translations will not be correctly cleared when bound value becomes undefined. Reproduction at: https://github.com/peitschie/bug-repro-aurelia-i18n-bind.On initial load, model A is populated, which contains a valid i18n key for both line 1 and 2:
Clicking the Load model B button then causes the bound values to be replaced with a new model that only has the line 1 property defined:
Note that when using the
t.bind
syntax, theModel A line 2 translation
cell is left bound.This behaviour differs when the key is fed via the
t
value converter (see the last column in the table), which does correctly clear the translation of line 2 when the second model is loaded.Expected/desired behavior:
I am expecting the behaviour of
t.bind
to match the behaviour seen for${ key & t}
. It seems logical to me that if the bound value is set to undefined or cleared, the translation should also be cleared to reflect the new model.The text was updated successfully, but these errors were encountered: