feat(ivy): support i18n without closure (#28689)
So far using runtime i18n with ivy meant that you needed to use Closure and `goog.getMsg` (or a polyfill). This PR changes the compiler to output both closure & non-closure code, while the unused option will be tree-shaken by minifiers. This means that if you use the Angular CLI with ivy and load a translations file, you can use i18n and the application will not throw at runtime. For now it will not translate your application, but at least you can try ivy without having to remove all of your i18n code and configuration. PR Close #28689
This commit is contained in:

committed by
Igor Minar

parent
387fbb8106
commit
91c7b451d5
@ -130,6 +130,7 @@ export class Identifiers {
|
||||
static i18nEnd: o.ExternalReference = {name: 'Δi18nEnd', moduleName: CORE};
|
||||
static i18nApply: o.ExternalReference = {name: 'Δi18nApply', moduleName: CORE};
|
||||
static i18nPostprocess: o.ExternalReference = {name: 'Δi18nPostprocess', moduleName: CORE};
|
||||
static i18nLocalize: o.ExternalReference = {name: 'Δi18nLocalize', moduleName: CORE};
|
||||
|
||||
static load: o.ExternalReference = {name: 'Δload', moduleName: CORE};
|
||||
|
||||
|
Reference in New Issue
Block a user