Skip to content

Text missing for empty translation target #15754

@moritz-h

Description

@moritz-h

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

creating a messages.xlf using Angular CLI: ng xi18n
As i don't need to translate English to English I use the generated file to build the English version
ng serve --aot --locale en --i18n-file src/messages.xlf
=> All strings are missing
(i think this comes from empty <target /> in the xfl file)
Same for all other languages. Documentation suggests to copy the messages.xlf to /locale/messages.??.xlf. If I now build the localized version with a incomplete translation, all not translated strings are missing.

Expected behavior

I would expect that missing translations show the original string instead of nothing.

Minimal reproduction of the problem with instructions

see Current behavior

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

Keeping all translation files up to date in time is a complicated workflow and then a not translated string is better than a missing string.

Please tell us about your environment:

  • Angular version: 4.0.1
  • Browser: Firefox/Chrome
  • Language: N/A

  • Node (for AoT issues): v6.10.1

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