-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Angular Cli + xi18n internationalization #3868
Comments
You'll have to adapt your tsconfig.json file to exclude test.ts from the compilation. More info: https://medium.com/@feloy/deploying-an-i18n-angular-app-with-angular-cli-fc788f17e358#.u7flu0anf |
I actimeo, thanks a lot for your help, after of the executionof the npm run extract-i18n coomand, in the tutorial: https://medium.com/@feloy/deploying-an-i18n-angular-app-with-angular-cli-fc788f17e358#.u7flu0anfI got the next issue: . C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots>npm run extract-i18n
Error: Error encountered resolving symbol values statically. Calling function 'NoOpAnimationDriver', function calls are not supported. Consider replacing the function or lambda with a I think it is the same issue I got before. Do you know what is happening? Thanks |
Have you modified your tsconfig.json file to exclude test.ts ?
Le 5 janvier 2017 20:35:13 GMT+01:00, rasilvap <[email protected]> a écrit :
…I actimeo, thanks a lot for your help, after to execute the npm run
extract-i18n coomand, in the tutorial:
***@***.***/deploying-an-i18n-angular-app-with-angular-cli-fc788f17e358#.u7flu0anfI
got the next issue: .
C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots>npm run extract-i18n
> ***@***.*** extract-i18n
C:\angular\drtslotnoCLi\crewtraininguipoc\DRTSlots
> cd src && 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
***@***.***/platform-browser/src/dom/animatio
n_driver.d.ts, resolving symbol BrowserTestingModule in
***@***.***/platform-browser/testing/browser.d.ts,
resolving symbo
l BrowserTestingModule in
***@***.***/platform-browser/testing/browser.d.ts
at simplifyInContext
***@***.***\compiler\bundles\compiler.umd.js:25713:25)
at StaticReflector.simplify
***@***.***\compiler\bundles\compiler.umd.js:25725:15)
at StaticReflector.annotations
***@***.***\compiler\bundles\compiler.umd.js:25223:62)
at NgModuleResolver.resolve
***@***.***\compiler\bundles\compiler.umd.js:17583:84)
at CompileMetadataResolver.getNgModuleMetadata
***@***.***\compiler\bundles\compiler.umd.js:18091:62)
at CompileMetadataResolver.getNgModuleSummary
***@***.***\compiler\bundles\compiler.umd.js:18047:54)
at
***@***.***\compiler\bundles\compiler.umd.js:18137:70
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata
***@***.***\compiler\bundles\compiler.umd.js:18132:51)
at addNgModule
***@***.***\compiler\bundles\compiler.umd.js:24985:60)
Extraction failed.
I think it is the same issue I got before. Do you know what is
happening?
Thanks
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#3868 (comment)
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
|
Yeah, my tsconfig.json look like: { My package.json looks like: { Do you think, maybe I am skipping something? Thanks a lot for your help. |
@rasilvap More info on this Issue: |
thank you @rasilvap it works thanks |
@rasilvap is it working for you? I tried the above described steps but its still not working for me... |
There's an ongoing discussion with some tips in #2201. |
Temporarily I had to make the internationalization with Angular ng2-translate. I still having the same isssue with an Angular-CLI Project. |
@rasilvap Hi, is there some source available so I can try to help you on this problem? |
Hi,
But when I run
Versions: npm version : 4.2.0. |
Solved by reinstalling totally angular-cli |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
The text was updated successfully, but these errors were encountered: