@Override public boolean visit(Element element) { // Developers can mark entire sections of the template as "do not translate" if ("dummy".equals(element.getAttribute("data-role"))) { return false; } // If the element either explicitly enables i18n (via an i18n key) or is a text-only // node, record it. if (hasAttribute(element, "data-i18n-key") || isTextOnly(element)) { visitElement(i18nPrefix, element); return false; } if (hasAttribute(element, "title")) { visitAttribute(i18nPrefix, element, "title"); } if (hasAttribute(element, "placeholder")) { visitAttribute(i18nPrefix, element, "placeholder"); } return true; }
@Override public boolean visit(Element element) { // Developers can mark entire sections of the template as "do not translate" if ("dummy".equals(element.getAttribute("data-role"))) { return false; } // If the element either explicitly enables i18n (via an i18n key) or is a text-only // node, record it. if (hasAttribute(element, "data-i18n-key") || isTextOnly(element)) { visitElement(i18nPrefix, element); return false; } if (hasAttribute(element, "title")) { visitAttribute(i18nPrefix, element, "title"); } if (hasAttribute(element, "placeholder")) { visitAttribute(i18nPrefix, element, "placeholder"); } return true; }