lephyrus / ngx-translate-messageformat-compiler

Advanced pluralization (and more) for ngx-translate, using standard ICU syntax which is compiled with the help of messageformat.js.
MIT License
93 stars 29 forks source link

Route Lazy loading.. #10

Closed kourosko closed 6 years ago

kourosko commented 6 years ago

If I'll use lazy loading routing something breaks and plural is not working. Details to reproduce it. If I load the page and route to (lazy load) module then the message compiler works. But if I press F5 in a lazy load route, the message compiler breaks and I get the original message eg. There {value, plural, =0{are no results} one{is one result} other{are # results}}.

lephyrus commented 6 years ago

Thanks for reporting this. It's the same issue as https://github.com/lephyrus/ngx-translate-messageformat-compiler/issues/7. It's an issue that needs to be resolved in @ngrx/core and I'm pretty sure it's fixed by https://github.com/ngx-translate/core/pull/659. I'll try to get that merged - in the meantime you could help by verifying that this indeed fixes your issue.

kourosko commented 6 years ago

Great news. I can confirm that fix in ngx-translate/core#659 fixes my problem. Thanks lephyrus.

lephyrus commented 6 years ago

This has been fixed upstream and released as v9.0.2: https://github.com/ngx-translate/core/releases/tag/v9.0.2