public class IcuSyntaxUtils extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableList<SoyMsgPart> |
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.
|
public static com.google.common.collect.ImmutableList<SoyMsgPart> convertMsgPartsToEmbeddedIcuSyntax(List<SoyMsgPart> origMsgParts, boolean allowIcuEscapingInRawText)
origMsgParts - The msg parts to convert.allowIcuEscapingInRawText - If true, then ICU syntax chars needing escaping in will be
escaped. If false, then a SoySyntaxException will be thrown if an ICU syntax char needing
escaping is encountered in raw text.