public Expression generateMsgGroupVariable ( MsgFallbackGroupNode node ) { String tmpVarName = translationContext . nameGenerator ( ) . generateName ( "msg_s" ) ; Expression msg ; if ( node . numChildren ( ) == 1 ) { translationContext . soyToJsVariableMappings ( ) . setIsPrimaryMsgInUse ( node , Expression . LITERAL_TRUE ) ; msg = generateSingleMsgVariable ( node . getChild ( 0 ) , tmpVarName ) ; } else { // has fallbackmsg children msg = generateMsgGroupVariable ( node , tmpVarName ) ; } // handle escaping for ( SoyPrintDirective printDirective : node . getEscapingDirectives ( ) ) { msg = SoyJsPluginUtils . applyDirective ( msg , ( SoyJsSrcPrintDirective ) printDirective , /* args= */ ImmutableList . of ( ) , node . getSourceLocation ( ) , errorReporter ) ; } return msg ; }
Returns a code chunk representing a translated variable .