| Package | Description |
|---|---|
| com.google.template.soy |
Root package with main API entry point and
Guice module.
|
| com.google.template.soy.jbcsrc.api | |
| com.google.template.soy.jbcsrc.shared | |
| com.google.template.soy.jssrc.internal | |
| com.google.template.soy.msgs |
Support for message translation (i.e. localization).
|
| com.google.template.soy.msgs.internal | |
| com.google.template.soy.msgs.restricted | |
| com.google.template.soy.shared.internal |
Internal shared class among multiple backends.
|
| com.google.template.soy.sharedpasses.render | |
| com.google.template.soy.tofu |
Java Object backend (a.k.a. Tofu).
|
| com.google.template.soy.tofu.internal | |
| com.google.template.soy.xliffmsgplugin |
Message plugin for the
XLIFF file format.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
SoyFileSet.extractMsgs()
Extracts all messages from this Soy file set into a SoyMsgBundle (which can then be turned into
an extracted messages file with the help of a SoyMsgBundleHandler).
|
SoyMsgBundle |
SoyFileSet.pruneTranslatedMsgs(SoyMsgBundle origTransMsgBundle)
Prunes messages from a given message bundle, keeping only messages used in this Soy file set.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
SoyFileSet.compileToJsSrc(SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle)
Compiles this Soy file set into JS source code files and returns these JS files as a list of
strings, one per file.
|
SoyMsgBundle |
SoyFileSet.pruneTranslatedMsgs(SoyMsgBundle origTransMsgBundle)
Prunes messages from a given message bundle, keeping only messages used in this Soy file set.
|
| Modifier and Type | Method and Description |
|---|---|
SoySauce.Renderer |
SoySauce.Renderer.setMsgBundle(SoyMsgBundle msgs)
Configures the bundle of translated messages to use.
|
| Modifier and Type | Method and Description |
|---|---|
RenderContext.Builder |
RenderContext.Builder.withMessageBundle(SoyMsgBundle msgBundle) |
| Modifier and Type | Method and Description |
|---|---|
void |
JsSrcMain.genJsFiles(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
String locale,
SoyMsgBundle msgBundle,
String outputPathFormat,
String inputPathsPrefix,
ErrorReporter errorReporter)
Generates JS source files given a Soy parse tree, an options object, an optional bundle of
translated messages, and information on where to put the output files.
|
List<String> |
JsSrcMain.genJsSrc(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle,
ErrorReporter errorReporter)
Generates JS source code given a Soy parse tree, an options object, and an optional bundle of
translated messages.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SoyMsgBundleWithFullLocale
Wraps SoyMsgBundle along with the original locale that was used to look it up.
|
| Modifier and Type | Field and Description |
|---|---|
static SoyMsgBundle |
SoyMsgBundle.EMPTY
Null object for SoyMsgBundle, assumes English Locale.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
SoyMsgBundleHandler.createFromFile(File inputFile)
Reads a translated messages file and creates a SoyMsgBundle.
|
SoyMsgBundle |
SoyMsgBundleHandler.createFromResource(URL inputResource)
Reads a translated messages resource and creates a SoyMsgBundle.
|
SoyMsgBundle |
SoyMsgBundleWithFullLocale.getInnerSoyMsgBundle() |
SoyMsgBundle |
SoyMsgBundleLoader.getSoyMsgBundleForLocale(Locale locale)
Gets the Message bundle for a particular locale.
|
SoyMsgBundle |
SoyBidirectionalMsgPlugin.parseExtractedMsgsFile(String extractedMsgsFileContent)
Parses the content of an extracted messages file (source messages to be translated) and builds
a message bundle object.
|
SoyMsgBundle |
SoyMsgPlugin.parseTranslatedMsgsFile(String translatedMsgsFileContent)
Parses the content of a translated messages file and builds a message bundle object.
|
static SoyMsgBundle |
SoyMsgBundleWithFullLocale.preservingLocaleIfAllowed(SoyMsgBundle bundle,
Locale locale)
Returns a soy message bundle that exposes `locale` as its locale IF `locale` corresponds to the
same language as `bundle.getLocale()`.
|
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
SoyMsgPlugin.generateExtractedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
ErrorReporter errorReporter)
Builds the content of an extracted messages file (source messages to be translated) from a
given message bundle object containing messages extracted from source files.
|
CharSequence |
SoyBidirectionalMsgPlugin.generateTranslatedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options)
Builds the content of a translated msgs file from a given message bundle object.
|
static SoyMsgBundle |
SoyMsgBundleWithFullLocale.preservingLocaleIfAllowed(SoyMsgBundle bundle,
Locale locale)
Returns a soy message bundle that exposes `locale` as its locale IF `locale` corresponds to the
same language as `bundle.getLocale()`.
|
void |
SoyMsgBundleHandler.writeExtractedMsgs(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
com.google.common.io.ByteSink output,
ErrorReporter errorReporter)
Generates extracted messages (source messages to be translated) from a given message bundle,
and writes it out.
|
void |
SoyMsgBundleHandler.writeToTranslatedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
File outputFile)
Generates an translated messages file (source messages to be translated) from a given message
bundle, and writes it to file.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
ExtractMsgsVisitor.exec(SoyNode node)
Returns a SoyMsgBundle containing all messages extracted from the given SoyFileSetNode or
SoyFileNode (locale string is null).
|
SoyMsgBundle |
ExtractMsgsVisitor.execOnMultipleNodes(Iterable<? extends SoyNode> nodes)
Returns a SoyMsgBundle containing all messages extracted from the given nodes (locale string is
null).
|
| Constructor and Description |
|---|
InsertMsgsVisitor(SoyMsgBundle msgBundle,
ErrorReporter errorReporter) |
| Modifier and Type | Class and Description |
|---|---|
class |
SoyMsgBundleImpl
Represents a full set of messages in some language/locale.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
SoyMsgBundleCompactor.compact(SoyMsgBundle input)
Returns a more memory-efficient version of the internal message bundle.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
SoyMsgBundleCompactor.compact(SoyMsgBundle input)
Returns a more memory-efficient version of the internal message bundle.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
ApiCallScopeUtils.seedSharedParams(GuiceSimpleScope.InScope inScope,
SoyMsgBundle msgBundle)
Helper utility to seed params shared by multiple backends.
|
static void |
ApiCallScopeUtils.seedSharedParams(GuiceSimpleScope.InScope inScope,
SoyMsgBundle msgBundle,
BidiGlobalDir bidiGlobalDir)
Helper utility to seed params shared by multiple backends.
|
| Modifier and Type | Field and Description |
|---|---|
protected SoyMsgBundle |
RenderVisitor.msgBundle
The bundle of translated messages, or null to use the messages from the Soy source.
|
| Modifier and Type | Method and Description |
|---|---|
EvalVisitor |
EvalVisitorFactoryImpl.create(Environment env,
SoyRecord ijData,
SoyCssRenamingMap cssRenamingMap,
SoyIdRenamingMap xidRenamingMap,
SoyMsgBundle msgBundle,
boolean debugSoyTemplateInfo) |
EvalVisitor |
EvalVisitor.EvalVisitorFactory.create(Environment env,
SoyRecord ijData,
SoyCssRenamingMap cssRenamingMap,
SoyIdRenamingMap xidRenamingMap,
SoyMsgBundle msgBundle,
boolean debugSoyTemplateInfo)
Creates an EvalVisitor.
|
| Constructor and Description |
|---|
EvalVisitor(Environment env,
SoyRecord ijData,
SoyCssRenamingMap cssRenamingMap,
SoyIdRenamingMap xidRenamingMap,
SoyMsgBundle msgBundle,
boolean debugSoyTemplateInfo) |
RenderVisitor(EvalVisitor.EvalVisitorFactory evalVisitorFactory,
Appendable outputBuf,
TemplateRegistry templateRegistry,
SoyRecord data,
SoyRecord ijData,
com.google.common.base.Predicate<String> activeDelPackageSelector,
SoyMsgBundle msgBundle,
SoyIdRenamingMap xidRenamingMap,
SoyCssRenamingMap cssRenamingMap,
boolean debugSoyTemplateInfo) |
| Modifier and Type | Method and Description |
|---|---|
String |
SoyTofu.render(SoyTemplateInfo templateInfo,
SoyRecord data,
SoyMsgBundle msgBundle)
Deprecated.
|
String |
SoyTofu.render(String templateName,
Map<String,?> data,
SoyMsgBundle msgBundle)
Deprecated.
|
String |
SoyTofu.render(String templateName,
SoyRecord data,
SoyMsgBundle msgBundle)
Deprecated.
|
SoyTofu.Renderer |
SoyTofu.Renderer.setMsgBundle(SoyMsgBundle msgBundle)
Sets the bundle of translated messages, or null to use the messages from the Soy source.
|
| Modifier and Type | Method and Description |
|---|---|
String |
BaseTofu.render(SoyTemplateInfo templateInfo,
SoyRecord data,
SoyMsgBundle msgBundle)
Deprecated.
|
String |
BaseTofu.render(String templateName,
Map<String,?> data,
SoyMsgBundle msgBundle)
Deprecated.
|
String |
BaseTofu.render(String templateName,
SoyRecord data,
SoyMsgBundle msgBundle)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
XliffMsgPlugin.parseTranslatedMsgsFile(String translatedMsgsFileContent) |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
XliffMsgPlugin.generateExtractedMsgsFile(SoyMsgBundle msgBundle,
SoyMsgBundleHandler.OutputFileOptions options,
ErrorReporter errorReporter) |