Skip to content

i18nMissingTranslation error does not exit process #12770

Description

@lucagouty

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 6.2.4
Node: 8.9.4
Npm : 6.2.0
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.4
@angular-devkit/build-angular     0.8.4
@angular-devkit/build-optimizer   0.8.4
@angular-devkit/build-webpack     0.8.4
@angular-devkit/core              0.8.4
@angular-devkit/schematics        0.8.4
@angular/cli                      6.2.4
@angular/pwa                      0.10.3
@ngtools/webpack                  6.2.4
@schematics/angular               0.8.4
@schematics/update                0.8.4
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.20.2

Repro steps

  • Add a new translation : <span i18n>Bonjour !</span>
  • Run an AOT build : ng build --i18n-missing-translation=error --prod

The log given by the failure

Date: 2018-10-26T12:39:43.453Z
Hash: f184f10ad8cbd81cf64d
Time: 13230ms
chunk {0} runtime.c4f3bae59727b055292b.js (runtime) 1.46 kB [entry] [rendered]
chunk {1} main.9868d9b237c3a48c54da.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills.85f47f0bf59079cbc23a.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} styles.1d1e8e5cd7d1ac411293.css (styles) 236 kB [initial] [rendered]

ERROR in Missing translation for message "7497ecc64d067535778ee27affdf5186e965e604" for locale "fr-FR" ("

  <div i18n>[ERROR ->]
    Bonjour !
  </div>

"): /xx/app/src/app/some-component/some-component.html@1:2

# Here it hangs, process never exit, but compilation does not continue

Desired functionality

Process should exit with error code

Mention any other details that might be useful

I guess the issue actually comes from angular/angular (maybe around translation_bundle.ts) but I thought here would probably be the best place to open an issue

To give you some more context on my use case : today I must set i18nMissingTranslation to warn on CI/CD or else it will hang until it timeouts (20 minutes !).


It's pretty much my first issue on such a big project, please don't be too harsh with me 🙏 I really searched a lot before opening it, and I don't want to bother anyone

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions