(el: html.Node, message: i18n.Message)
| 450 | // This is used for translating elements / blocks - see `_translateAttributes` for attributes |
| 451 | // no-op when called in extraction mode (returns []) |
| 452 | private _translateMessage(el: html.Node, message: i18n.Message): html.Node[] { |
| 453 | if (message && this._mode === _VisitorMode.Merge) { |
| 454 | const nodes = this._translations.get(message); |
| 455 | |
| 456 | if (nodes) { |
| 457 | return nodes; |
| 458 | } |
| 459 | |
| 460 | this._reportError( |
| 461 | el, |
| 462 | `Translation unavailable for message id="${this._translations.digest(message)}"`, |
| 463 | ); |
| 464 | } |
| 465 | |
| 466 | return []; |
| 467 | } |
| 468 | |
| 469 | // translate the attributes of an element and remove i18n specific attributes |
| 470 | private _translateAttributes(node: html.Element): html.Attribute[] { |
no test coverage detected