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 produces empty output with TypeScript 2.1.x

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When running the Angular i18n CLI tool with Typescript 2.1.x the resulting XLF file has an empty body.

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
  <file source-language="en" datatype="plaintext" original="ng2.template">
    <body>
    </body>
  </file>
</xliff>

Expected behavior

It should find one entry for Hello {{name}} which is the case for TypeScript 2.0.x

<?xml version="1.0" encoding="UTF-8" ?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
  <file source-language="en" datatype="plaintext" original="ng2.template">
    <body>
      <trans-unit id="789f11377164fcf3a8f1d0408ee7dfed637cd9ae" datatype="html">
        <source>Hello <x id="INTERPOLATION"/></source>
        <target/>
      </trans-unit>
    </body>
  </file>
</xliff>

Minimal reproduction of the problem with instructions

Expected behavior with TypeScript 2.0.10: https://github.com/Hirse/quickstart
Current behavior with TypeScript 2.1.4: https://github.com/Hirse/quickstart/tree/ts-2.1

What is the motivation / use case for changing the behavior?

I want to use Angular i18n with the latest version of TypeScript.

Please tell us about your environment:

Win 10, git bash, npm

  • Angular version: 2.3.1
  • Browser: none

  • Language: TypeScript 2.1

  • Node (for AoT issues): node --version = v7.2.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
Martin-Luftcommented, Dec 16, 2016

Angular does not support TypeScript 2.1 yet:

https://github.com/angular/angular/pull/13294

0reactions
angular-automatic-lock-bot[bot]commented, Sep 11, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript: Empty output file when compiling - Stack Overflow
When I uncomment the import line, I get no error on compiling, but it generates an empty (zero size) "myApp.js" and a file...
Read more >
ng extract-i18n generates empty file after updating to Angular 12
Description. After updating project from version 11 to version 12 and enabling ivy compiler ng extract-i18n generates xlf file with empty body ...
Read more >
angular/angular - Gitter
I have some problems with inner-element animations not firing when there in an animation on the parent element (works in version 5.0.2 and ......
Read more >
Internationalizing applications | Zowe Docs
When you run the i18n script, it reads this file and generates a messages.[lang].xlf file in the src/assets/i18n directory for each language ...
Read more >
ngx-i18n-combine - JSON Processing library - kandi
ngx-i18n -combine is a TypeScript library typically used in Utilities, JSON Processing applications. ngx-i18n-combine has no bugs, it has no vulnerabilities, ...
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