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

Method extract

packages/compiler/src/i18n/extractor_merger.ts:106–116  ·  view source on GitHub ↗

* Extracts the messages from the tree

(nodes: html.Node[])

Source from the content-addressed store, hash-verified

104 * Extracts the messages from the tree
105 */
106 extract(nodes: html.Node[]): ExtractionResult {
107 this._init(_VisitorMode.Extract);
108
109 nodes.forEach((node) => node.visit(this, null));
110
111 if (this._inI18nBlock) {
112 this._reportError(nodes[nodes.length - 1], 'Unclosed block');
113 }
114
115 return new ExtractionResult(this._messages, this._errors);
116 }
117
118 /**
119 * Returns a tree where all translatable nodes are translated

Callers 1

extractMessagesFunction · 0.95

Calls 4

_initMethod · 0.95
_reportErrorMethod · 0.95
visitMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected