Errai 3.0.1-SNAPSHOT

org.jboss.errai.ui.shared
Class TemplateTranslationVisitor

java.lang.Object
  extended by org.jboss.errai.ui.shared.TemplateVisitor
      extended by org.jboss.errai.ui.shared.TemplateTranslationVisitor
All Implemented Interfaces:
DomVisitor

public class TemplateTranslationVisitor
extends TemplateVisitor

Visits the DOM and translates i18n text.

Author:
Lincoln Baxter, III, Max Barkley

Constructor Summary
TemplateTranslationVisitor(String i18nPrefix)
           
 
Method Summary
protected  void visitAttribute(String i18nKeyPrefix, Element element, String attributeName)
          Translate the text value in an attribute of this element if there is i18n text.
protected  void visitElement(String i18nKeyPrefix, Element element)
          Translate the text in this element if there is i18n text.
 
Methods inherited from class org.jboss.errai.ui.shared.TemplateVisitor
getElementKey, getI18nValues, getOrGenerateTranslationKey, hasAttribute, isTextOnly, setI18nPrefix, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateTranslationVisitor

public TemplateTranslationVisitor(String i18nPrefix)
Method Detail

visitElement

protected void visitElement(String i18nKeyPrefix,
                            Element element)
Translate the text in this element if there is i18n text.

Overrides:
visitElement in class TemplateVisitor
Parameters:
i18nKeyPrefix - The template prefix for the i18n key
element - The element to be translated

visitAttribute

protected void visitAttribute(String i18nKeyPrefix,
                              Element element,
                              String attributeName)
Translate the text value in an attribute of this element if there is i18n text.

Overrides:
visitAttribute in class TemplateVisitor
Parameters:
i18nKeyPrefix - The template prefix for the i18n key
element - The element containing the attribute to be translated
attributeName - The name of the attribute to be translated

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.