private SoyMsgPart compactSelect(SoyMsgSelectPart select) { // TODO: Turn into a non-select message if there's only one unique case. // Select variable names tend to be repeated across many templates, like "gender". return new SoyMsgSelectPart( intern(select.getSelectVarName()), compactCases(select.getCases(), DEFAULT_SELECT_CASE_SPEC)); }
private SoyMsgPart compactSelect(SoyMsgSelectPart select) { // TODO: Turn into a non-select message if there's only one unique case. // Select variable names tend to be repeated across many templates, like "gender". return new SoyMsgSelectPart( intern(select.getSelectVarName()), compactCases(select.getCases(), DEFAULT_SELECT_CASE_SPEC)); }
private SoyMsgPart compactPlural(SoyMsgPluralPart plural) { // Plural variable names tend to be repeated across templates, such as "count". return new SoyMsgPluralPart( intern(plural.getPluralVarName()), plural.getOffset(), compactCases(plural.getCases(), DEFAULT_PLURAL_CASE_SPEC)); }
private SoyMsgPart compactPlural(SoyMsgPluralPart plural) { // Plural variable names tend to be repeated across templates, such as "count". return new SoyMsgPluralPart( intern(plural.getPluralVarName()), plural.getOffset(), compactCases(plural.getCases(), DEFAULT_PLURAL_CASE_SPEC)); }