(el: html.Node, message: i18n.Message)
| 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( |
no test coverage detected