-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n params attribute doesn't work in globally registered custom elements #305
Comments
Thx for the repro I'll take a look. Clearly it looks like a bug as I cant see anything wrong in the sample |
I think I found the issue, yet I don't really know why it happens. In your
and instead require the message custom element right before it's use
all seems to work. So it must be a timing issue with registration, as that the features are registered before the plugin so we're too late to the story. |
I tried to fix the "timing issue with registration" as following but could not fix the issue.
|
Doing the following: .feature(PLATFORM.moduleName('resources/index'))
.plugin(PLATFORM.moduleName('aurelia-i18n'), (instance: any) => { means load all resources inside .plugin(PLATFORM.moduleName('aurelia-i18n'), (instance: any) => {/*....*/})
...
.feature(PLATFORM.moduleName('resources/index')) |
Nope not going to work since i18n is lazily initialized via callback |
Can we force it to behave differently? |
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:
Repro code at https://github.com/peitschie/bug-repro-aurelia-i18n-alias.
This is somewhat similar to #206.
In this screenshot, the first two lines show i18n parameter binding working for both non-aliased (
t-params.bind
) and aliased (i18n-params.bind
) bindings.These are then copied into a global resource, where it can be seen that the aliased binding (
i18n-params.bind
) does not function, hence the blank space on the 3rd line.Expected/desired behavior:
I am expecting all these combinations to behave identically.
The text was updated successfully, but these errors were encountered: