-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Please provide us with the following information:
OS
->Windows 7
Versions.
angular-cli: 1.0.0-beta.24
node: 4.4.5
os: win32 x64
@angular/common: 2.4.1
@angular/compiler: 2.4.1
@angular/compiler-cli: 2.4.1
@angular/core: 2.4.1
@angular/forms: 2.4.1
@angular/http: 2.4.1
@angular/platform-browser: 2.4.1
@angular/platform-browser-dynamic: 2.4.1
@angular/platform-server: 2.4.1
@angular/router: 3.4.1
npm version : 4.0.5.
Steps.
I have created an application with Angular CLI (ng new xxxxxx)
Also I want to add internationalization to my application and I following the angular.io documentation:
https://angular.io/docs/ts/latest/cookbook/i18n.html and this short tutorial:
https://devblog.dymel.pl/2016/11/03/angular2-and-i18n-translate-your-app/
My problem is when I tried to execute the command: node_modules.bin\ng-xi18n, in order to generate the language files. I am getting the next issue:
C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots>node_modules.bin\ng-xi18n
Error: Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a
reference to an exported function, resolving symbol AnimationDriver.NOOP in C:/angular/drtslotnoCLi/crewtraininguipoc/DRTSlots/node_modules/@angular/platform-browser/src/dom/animatio
n_driver.d.ts, resolving symbol BrowserTestingModule in C:/angular/drtslotnoCLi/crewtraininguipoc/DRTSlots/node_modules/@angular/platform-browser/testing/browser.d.ts, resolving symbo
l BrowserTestingModule in C:/angular/drtslotnoCLi/crewtraininguipoc/DRTSlots/node_modules/@angular/platform-browser/testing/browser.d.ts
at simplifyInContext (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:25713:25)
at StaticReflector.simplify (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:25725:15)
at StaticReflector.annotations (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:25223:62)
at NgModuleResolver.resolve (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:17583:84)
at CompileMetadataResolver.getNgModuleMetadata (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:18091:62)
at CompileMetadataResolver.getNgModuleSummary (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:18047:54)
at C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:18137:70
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:18132:51)
at addNgModule (C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots\node_modules@angular\compiler\bundles\compiler.umd.js:24985:60)
Extraction failed.
I understand that right now, Ican’t use the CLI in translated applications. It’s because the CLI compiles the templates while doing the build. According to the tutorial I mentioned before.
I was able to make work the internationalization with the ng2-translate libarary.
There is some way in oder to fix this issue?
Thanks.