Skip to content

ng-xi18n regression 4.0.2 -> 4.0.3 #16235

Closed

Description

@sebek64

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

The compiler fails with the following error:

ng-xi18n -p src/tsconfig-i18n.json

TypeError: Cannot read property 'toLowerCase' of null
at Extractor.serialize (.../node_modules/@angular/compiler-cli/src/extractor.js:44:32)
at .../node_modules/@angular/compiler-cli/src/extractor.js:32:33
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:508:3
Extraction failed

Expected behavior

Minimal reproduction of the problem with instructions

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

Please tell us about your environment:

  • Angular version: 4.0.3
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: TypeScript 2.2.2

  • Node (for AoT issues): node --version = v6.10.2

Activity

  1. wiwski commented on Apr 21, 2017

    @wiwski

    Got the same error as well

  2. added
    area: i18nIssues related to localization and internationalization
    regressionIndicates than the issue relates to something that worked in a previous version
    on Apr 21, 2017
  3. self-assigned this
    on Apr 24, 2017
  4. ocombe commented on Apr 24, 2017

    @ocombe
    Contributor

    Easy to workaround: you have to specify the format with --i18nFormat (xlf, or xmb).
    I'll work on the fix right now though.

  5. added 5 commits that reference this issue on Apr 24, 2017
    b69f384
  6. yuerdev commented on May 8, 2017

    @yuerdev

    oh,./node_modules/.bin/ng-xi18n --i18nFormat=xmb
    and perfect

  7. added a commit that references this issue on May 12, 2017
    71a7a3b
  8. Safe0 commented on May 16, 2017

    @Safe0

    It's working well for xmb but for xfl I have an unsupported format error. Am I missing something?

  9. ocombe commented on May 16, 2017

    @ocombe
    Contributor

    because it's "xlf", not "xfl"

  10. Safe0 commented on May 17, 2017

    @Safe0

    Wow, I'm so dumb... thanks!

  11. dgroh commented on Jun 22, 2017

    @dgroh

    Also having the same error:

    after running npm run i18n --i18nFormat=xlf

    I got:

    TypeError: Cannot read property 'toLowerCase' of null
    at Extractor.serialize (C:\Projekte\Git\KWKPortal\App\node_modules@angular\compiler-cli\src\extractor.js:47:32)
    at C:\Projekte\Git\KWKPortal\App\node_modules@angular\compiler-cli\src\extractor.js:33:33
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3
    Extraction failed

  12. trotyl commented on Jun 23, 2017

    @trotyl
    Contributor

    @dgroh That way you're passing the i18nFormat option to npm itself, obvious npm doesn't know that. A -- is needed for passing to the inner command. See npm-run-script for more information.

  13. sarat9 commented on Jul 13, 2017

    @sarat9

    For Windows Users:
    "./node_modules/.bin/ng-xi18n" --i18nFormat=xlf

    If the tsconfig.json TypeScript configuration file is located somewhere other than in the root folder, you must identify the path to it with the -p option:
    "./node_modules/.bin/ng-xi18n" --i18nFormat=xlf -p path\to\tsconfig.json

    Also follow the quotes order.

  14. ocombe commented on Nov 3, 2017

    @ocombe
    Contributor

    I believe that this has been solved. Closing the issue. Let me know if that's not the case.

  15. angular-automatic-lock-bot commented on Sep 12, 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.

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

Metadata

Metadata

Assignees

Labels

area: i18nIssues related to localization and internationalizationregressionIndicates than the issue relates to something that worked in a previous versiontype: bug/fixworkaround1: obvious

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions