Make "Angular 9 introduced a global `$localize()`..." message a warning instead of error
See original GitHub issueπ feature request
Relevant Package
This feature request is for @angular/core
Description
Please consider changing the βAngular 9 introduced a global`$localize()β¦β message from an error to a console warning. In a monorepo, a shared lib/module may have components that are i18n aware that some applications will actually not use, although they have a dependency for some other functionality. With this message as an error, even applications that donβt require i18n now break at runtime.
Describe the solution youβd like
Use console.warn(β¦) instead.
Describe alternatives youβve considered
Not much I can do except add import '@angular/localize/init';
to all apps in the monorepo. Other suggestions welcome.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Angular 9 introduced a global '$localize()' function that needs ...
@angular/localize is a dependency in my package.json, and the @angular/localize/init is an import in my polyfills.ts, but same error on mostΒ ...
Read more >Angular 9 introduced a global `$localize()` function that needs ...
Angular 9 introduced a global `$localize()` function that needs to be loaded, Uncaught Error: It looks like your application or one of itsΒ ......
Read more >Internationalization with @angular/localize | Ninja Squad
Error : It looks like your application or one of its dependencies is using i18n. Angular 9 introduced a global `$localize()` function thatΒ ......
Read more >$localize Global Import Migration - Angular
@angular/localize is a new package that supports i18n of messages in Ivy applications. This package requires a global $localize symbol to exist.
Read more >The Ultimate Guide to Angular Localization | Phrase
Now that we've installed and configured the @angular/localize package, let's run through an example of how we would localize a string of text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@petebacondarwin thanks. Iβll put this on my radar to test. I have a busy couple weeks coming up.
https://github.com/angular/angular/pull/38404 should solve this problem (by moving the
$localize
calls into a lazy evaluated factory function. In this case the call is not made if the component is not used.