| Package | Description |
|---|---|
| com.google.template.soy.msgs.internal | |
| com.google.template.soy.msgs.restricted |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<SoyMsgPart> |
MsgUtils.MsgPartsAndIds.parts
The parts that make up the message content.
|
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableList<SoyMsgPart> |
MsgUtils.buildMsgParts(MsgNode msgNode)
Builds the list of SoyMsgParts for the given MsgNode.
|
static com.google.common.collect.ImmutableList<SoyMsgPart> |
IcuSyntaxUtils.convertMsgPartsToEmbeddedIcuSyntax(List<SoyMsgPart> origMsgParts,
boolean allowIcuEscapingInRawText)
Given a list of msg parts:
(a) if it contains any plural/select parts, then builds a new list of msg parts where
plural/select parts in the original msg parts are all embedded as raw text in ICU format,
(b) if it doesn't contain any plural/select parts, then simply returns the original msg parts
instead of creating a new list of identical msg parts.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
SoyMsgIdComputer.computeMsgId(com.google.common.collect.ImmutableList<SoyMsgPart> msgParts,
String meaning,
String contentType)
Computes the unique message id for a message, given the message parts, the meaning string (if
any), and the content type (if any).
|
static long |
SoyMsgIdComputer.computeMsgIdUsingBracedPhs(com.google.common.collect.ImmutableList<SoyMsgPart> msgParts,
String meaning,
String contentType)
Computes an alternate unique message id for a message, given the message parts, the meaning
string (if any), and the content type (if any).
|
static com.google.common.collect.ImmutableList<SoyMsgPart> |
IcuSyntaxUtils.convertMsgPartsToEmbeddedIcuSyntax(List<SoyMsgPart> origMsgParts,
boolean allowIcuEscapingInRawText)
Given a list of msg parts:
(a) if it contains any plural/select parts, then builds a new list of msg parts where
plural/select parts in the original msg parts are all embedded as raw text in ICU format,
(b) if it doesn't contain any plural/select parts, then simply returns the original msg parts
instead of creating a new list of identical msg parts.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SoyMsgPlaceholderPart
Represents a placeholder within a message.
|
class |
SoyMsgPluralPart
Represents a plural statement within a message.
|
class |
SoyMsgPluralRemainderPart
Represents the placeholder part in the plural statement (The '#' sign in ICU syntax).
|
class |
SoyMsgRawTextPart
Represents a raw text string within a message (the stuff that translators change).
|
class |
SoyMsgSelectPart
Represents a select statement within a message.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<SoyMsgPart> |
SoyMsg.getParts()
Returns the parts that make up the message content.
|
com.google.common.collect.ImmutableList<SoyMsgPart> |
SoyMsgPluralPart.lookupCase(int pluralValue,
com.ibm.icu.util.ULocale locale)
Returns the list of parts to implement the case.
|
com.google.common.collect.ImmutableList<SoyMsgPart> |
SoyMsgSelectPart.lookupCase(String selectValue) |
abstract com.google.common.collect.ImmutableList<SoyMsgPart> |
SoyMsgPart.Case.parts() |
| Modifier and Type | Method and Description |
|---|---|
static <T> SoyMsgPart.Case<T> |
SoyMsgPart.Case.create(T spec,
Iterable<? extends SoyMsgPart> parts) |
static boolean |
MsgPartUtils.hasPlrselPart(List<SoyMsgPart> msgParts)
Checks whether a given list of msg parts has any plural or select parts.
|
| Constructor and Description |
|---|
SoyMsg(long id,
long altId,
String localeString,
String meaning,
String desc,
boolean isHidden,
String contentType,
SourceLocation sourceLocation,
boolean isPlrselMsg,
Iterable<? extends SoyMsgPart> parts) |
SoyMsg(long id,
String localeString,
boolean isPlrselMsg,
Iterable<? extends SoyMsgPart> parts)
Constructor with just enough information for rendering only.
|
SoyMsg(long id,
String localeString,
String meaning,
String desc,
boolean isHidden,
String contentType,
SourceLocation sourceLocation,
Iterable<? extends SoyMsgPart> parts) |