com.google.template.soy.xliffmsgplugin
Class XliffMsgPlugin

java.lang.Object
  extended by com.google.template.soy.xliffmsgplugin.XliffMsgPlugin
All Implemented Interfaces:
SoyMsgPlugin

public class XliffMsgPlugin
extends Object
implements SoyMsgPlugin

Message plugin for XLIFF format.


Constructor Summary
XliffMsgPlugin()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XliffMsgPlugin

@Inject
public XliffMsgPlugin()
Method Detail

generateExtractedMsgsFile

public CharSequence generateExtractedMsgsFile(SoyMsgBundle msgBundle,
                                              SoyMsgBundleHandler.OutputFileOptions options)
                                       throws SoyMsgException
Description copied from interface: SoyMsgPlugin
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.

Specified by:
generateExtractedMsgsFile in interface SoyMsgPlugin
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

public SoyMsgBundle parseTranslatedMsgsFile(String inputFileContent)
                                     throws SoyMsgException
Description copied from interface: SoyMsgPlugin
Parses the content of an input message file (one that has been translated) and builds a message bundle object.

Specified by:
parseTranslatedMsgsFile in interface SoyMsgPlugin
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.