MCPcopy Index your code
hub / github.com/angular/angular / _translateMessage

Method _translateMessage

packages/compiler/src/i18n/extractor_merger.ts:481–496  ·  view source on GitHub ↗
(el: html.Node, message: i18n.Message)

Source from the content-addressed store, hash-verified

479 // This is used for translating elements / blocks - see `_translateAttributes` for attributes
480 // no-op when called in extraction mode (returns [])
481 private _translateMessage(el: html.Node, message: i18n.Message): html.Node[] {
482 if (message && this._mode === _VisitorMode.Merge) {
483 const nodes = this._translations.get(message);
484
485 if (nodes) {
486 return nodes;
487 }
488
489 this._reportError(
490 el,
491 `Translation unavailable for message id="${this._translations.digest(message)}"`,
492 );
493 }
494
495 return [];
496 }
497
498 // translate the attributes of an element and remove i18n specific attributes
499 private _translateAttributes(

Callers 2

visitCommentMethod · 0.95
_visitElementLikeMethod · 0.95

Calls 3

_reportErrorMethod · 0.95
getMethod · 0.65
digestMethod · 0.45

Tested by

no test coverage detected