Skip to content
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

Not getting i18n to work #2814

Closed
bjornharvold opened this issue Oct 21, 2016 · 5 comments
Closed

Not getting i18n to work #2814

bjornharvold opened this issue Oct 21, 2016 · 5 comments

Comments

@bjornharvold
Copy link

bjornharvold commented Oct 21, 2016

Please provide us with the following information:

OS?

Mac OS X Sierra

Versions.

2.1.0

Repro steps.

Added one single i18n attribute to a paragraph tag on one of my components like so:

<p i18n="Test title|Test description">Welcome to i18n</p>

The log given by the failure.

| => ./node_modules/.bin/ng-xi18n 
Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /Users/crash/git/traveliko/traveliko-spa-frontend/src/app/app.module.ts, resolving symbol AppModule in /Users/crash/git/traveliko/traveliko-spa-frontend/src/app/app.module.ts
    at simplifyInContext (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/static_reflector.js:469:23)
    at StaticReflector.simplify (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/static_reflector.js:472:22)
    at StaticReflector.annotations (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/static_reflector.js:61:36)
    at _loop_1 (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/extract_i18n.js:67:54)
    at Extractor.readFileMetadata (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/extract_i18n.js:80:13)
    at /Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/extract_i18n.js:87:74
    at Array.map (native)
    at Extractor.extract (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/extract_i18n.js:87:35)
    at extract (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/extract_i18n.js:16:35)
    at Object.main (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/tsc-wrapped/src/main.js:30:16)
Extraction failed

Mention any other details that might be useful.

I am using module lazy loading.


Thanks! We'll be in touch soon.

@jfmaeck
Copy link

jfmaeck commented Oct 25, 2016

Perhaps specifying the tsconfig.json might help?

./node_modules/.bin/ng-xi18n -p src/tsconfig.json

Or in package.json:

  ...
  "scripts": {
    "i18n": "ng-xi18n -p src/tsconfig.json"
  }
  ...

@bjornharvold
Copy link
Author

Same error I'm afraid. I don't even know if this is an Angular CLI issue or if it is with Angular itself.

@richard-smith-sky
Copy link

I also have this error.

@filipesilva
Copy link
Contributor

Closed in favor of #2201

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants