function translateHTMLTemplate(template, translate) {
  const isHTML = /<[^>]*>/.test(template);

  if (!isHTML) {
    return translate(template);
  }

  const tempElem = document.createElement('div');
  tempElem.innerHTML = template;

  if (tempElem.innerText && tempElem.children.length) {
    translateDeepTag(tempElem, translate);
    return tempElem.innerHTML;
  }

  return template;
}
Translates text values in html template.
@param {string} template - The template to translate.
@param {Function} translate - The translation function.
@returns {string} - Html template with translated values.