Skip to content

ng-xi18n produces empty output with TypeScript 2.1.x #13519

Closed

Description

@Hirse

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

Activity

  1. Martin-Luft commented on Dec 16, 2016

    @Martin-Luft

    Angular does not support TypeScript 2.1 yet:

    #13294

  2. fabrikam-champions commented on Dec 18, 2016

    @fabrikam-champions

    I have the same issue with angular 2.3.1 and TypeScript verions 2.1.4 , 2.0.10, and 2.0.8

  3. Martin-Luft commented on Jan 10, 2017

    @Martin-Luft

    For me too.

  4. sproddaturi14 commented on Apr 17, 2017

    @sproddaturi14

    Hey Everyone,

    I am seeing this issue still with ang 2.4.7 and typescript 2.1.6 the ng-xi18n tool is running fine but seeing a empty messages.xlff file.Can someone help me on this .

    Following is my environment :
    angular :2.4.7
    @angular/compiler-cli : 2.4.7
    @angular/platform-server : 2.4.7
    typescript:2.1.6
    webpack: 2.1.0-beta.22

    Let me know if there is any extra information needed.

    Also my project is not a angular-cli project
    @vicb @Hirse

  5. angular-automatic-lock-bot commented on Sep 11, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions