Skip to content

[i18n]: In case of missing translation generate warning instead of crashing #11974

@mstawick

Description

@mstawick

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
If translation is missing (ie. I just added new translations but haven't extracted them yet), application will crash with
Translation unavailable for message id="..."

Running in JIT mode.

Expected behavior
Warning is logged in console and message key / predefined missing translation string is rendered.

Reproduction of the problem
Add new i18n key, don't extract messages, start app.

What is the motivation / use case for changing the behavior?
Making development easier / faster. Preventing application from crashing in case of single translation missing.

  • Angular version: 2.0.1
  • 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 ]
    All browsers
  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Typescript
  • Node (for AoT issues): node --version =

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalizationfeatureLabel used to distinguish feature request from other issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions