|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.javascript.jscomp.XtbMessageBundle
public class XtbMessageBundle
A MessageBundle that parses messages from an XML Translation Bundle (XTB) file.
Constructor Summary | |
---|---|
XtbMessageBundle(InputStream xtb,
String projectId)
Creates an instance and initializes it with the messages in an XTB file. |
|
XtbMessageBundle(InputStream xtb,
String projectId,
boolean unused)
|
Method Summary | |
---|---|
Iterable<JsMessage> |
getAllMessages()
Returns an iterable over the keys that this object has replacements for. |
JsMessage |
getMessage(String id)
Gets a message replacement. |
JsMessage.IdGenerator |
idGenerator()
Gets the message ID generator to use to compute message IDs for this type of bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XtbMessageBundle(InputStream xtb, @Nullable String projectId, boolean unused)
public XtbMessageBundle(InputStream xtb, @Nullable String projectId)
xtb
- the XTB file as a byte streamprojectId
- the translation console project id (i.e. name)Method Detail |
---|
public JsMessage getMessage(String id)
MessageBundle
getMessage
in interface MessageBundle
id
- the id of the message being replaced; the key is message ID
generated by JsMessage.IdGenerator
public JsMessage.IdGenerator idGenerator()
MessageBundle
idGenerator
in interface MessageBundle
public Iterable<JsMessage> getAllMessages()
MessageBundle
getAllMessages
in interface MessageBundle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |