function translateDeepTag(tag, translate) {
  const children = tag.children.length && [...tag.children];
  const shouldTranslateEntireContent = children && children.every(child =>
    child.children.length === 0
    && inTextTags.some(tag => child.nodeName === tag)
  );

  if (!children || shouldTranslateEntireContent) {
    tag.innerHTML = translateElemValue(tag, translate);
  }
  else {
    children.forEach(child => translateDeepTag(child, translate));
  }
}
Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.
@param {HTMLElement} tag - The tag to translate.
@param {Function} translate - The translation function.
@returns {void}