com.google.template.soy.msgs
Interface SoyMsgPlugin

All Known Implementing Classes:
XliffMsgPlugin

public interface SoyMsgPlugin

Plugin for implementing a specific message file format.


Method Summary
 CharSequence generateExtractedMsgsFile(SoyMsgBundle msgBundle, SoyMsgBundleHandler.OutputFileOptions options)
          Builds the content of an output message file (one that will be sent for translation) from a given message bundle object containing messages extracted from source files.
 SoyMsgBundle parseTranslatedMsgsFile(String inputFileContent)
          Parses the content of an input message file (one that has been translated) and builds a message bundle object.
 

Method Detail

generateExtractedMsgsFile

CharSequence generateExtractedMsgsFile(SoyMsgBundle msgBundle,
                                       SoyMsgBundleHandler.OutputFileOptions options)
                                       throws SoyMsgException
Builds the content of an output message file (one that will be sent for translation) from a given message bundle object containing messages extracted from source files.

Parameters:
msgBundle - The bundle of messages extracted from source files.
options - The options to use for generating the output message file (e.g. the source locale/language of the messages). Not all options will apply to all message plugins.
Returns:
The content of the generated output file.
Throws:
SoyMsgException - If there was an error building the file content.

parseTranslatedMsgsFile

SoyMsgBundle parseTranslatedMsgsFile(String inputFileContent)
                                     throws SoyMsgException
Parses the content of an input message file (one that has been translated) and builds a message bundle object.

Parameters:
inputFileContent - The content of the translated message file.
Returns:
The message bundle object built from the message file.
Throws:
SoyMsgException - If there was an error parsing the file content.