question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng xi18n not extracting anything

See original GitHub issue

I followed docs on Angular 5 internationalization and can’t figure out what’s wrong. Can someone please explain to me what am I doing wrong ?

Versions

Angular CLI: 1.5.0 Node: 9.1.0 OS: linux x64 Angular: 5.0.1 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router @angular/cli: 1.5.0 @angular-devkit/build-optimizer: 0.0.32 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.35 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0 @schematics/angular: 0.1.1 typescript: 2.4.2 webpack: 3.8.1

Repro steps

cd project ng xi18n ng xi18n --output-path=src/locale

Observed behavior

Nothing happens

Desired behavior

would like to see extracted translation file.

Mention any other details that might be useful (optional)

example tags from template i tried with: <span class="m-text-big" i18n>Food order&nbsp;-&nbsp;new</span> <span class="m-text-big" i18n="@@foodOrder.title">Food order&nbsp;-&nbsp;new</span>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
quanterioncommented, Nov 21, 2017

The same for me. I’m on Windows 10 x64, Node 8.7 No errors shown but the x18n process takes unusually short time (20-30 secs, it was about 2-3 minutes when this tool works)).

Tried cli 1.5.3 and 1.6.0-beta.2 - the problem remains

1reaction
quanterioncommented, Nov 22, 2017

It looks like the fix is in master https://github.com/angular/angular-cli/pull/8480 but not yet released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracting $localize messages from typescript not working in ...
I have tried doing ng xi18n --ivy but no luck. It does extract a messages.xlf file, but only with i18n that I use...
Read more >
ng xi18n not working for library · Issue #17140 - GitHub
I want to use ng xi18n command to extract messages for i18n tags which are ... I need to do this in Angular...
Read more >
ng extract-i18n - Angular
Option Description Default Value ‑‑format Output format for the generated file. xlf ‑‑out‑file Name of the file to output. ‑‑output‑path Path where output will be placed....
Read more >
ng extract-i18n not working - ConcretePage.com
When I run ng extract-i18n command, I am getting message. >ng extract-i18n. i18n extraction requires the '@angular/localize' package.
Read more >
Localizing your app - Angular Hispano
If @angular/localize is not installed, the Angular CLI may generate an error when you ... The ng xi18n extraction mechanism uses the ViewEngine...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found