l10n.extractor library

Classes

HTMLExtraction
InterpolationVisitor
Given an interpolation, find all of its chunks, validate that they are only simple variable substitutions or else Intl.plural/gender calls, and keep track of the pieces of text so that other parts of the program can deal with the simple string sections and the generated parts separately. Note that this is a SimpleAstVisitor, so it only traverses one level of children rather than automatically recursing. If we find a plural or gender, which requires recursion, we do it with a separate special-purpose visitor.
L10NFindingVisitor
This visits the program source nodes looking for Intl.message uses that conform to its pattern and then creating the corresponding IntlMessage objects. We have to find both the enclosing function, and the Intl.message invocation.
L10NMessageExtraction
A particular message extraction run. [...]
L10NStatementVisitor

Typedefs

OnMessage(String message) → void
A function that takes a message and does something useful with it.

Exceptions / Errors

L10NMessageExtractionException