private Expression generateSingleMsgVariable(MsgNode msgNode, String tmpVarName) {
    String googMsgVarName = buildGoogMsgVarNameHelper(msgNode);

    // Generate the goog.getMsg call.
    GoogMsgCodeGenInfo googMsgCodeGenInfo = genGoogGetMsgCallHelper(googMsgVarName, msgNode);

    if (!msgNode.isPlrselMsg()) {
      // No postprocessing is needed. Simply use the original goog.getMsg var.
      return googMsgCodeGenInfo.googMsgVar;
    }
    // For plural/select messages, generate the goog.i18n.MessageFormat call.
    // We don't want to output the result of goog.getMsg() directly. Instead, we send that
    // string to goog.i18n.MessageFormat for postprocessing. This postprocessing is where we're
    // handling all placeholder replacements, even ones that have nothing to do with
    // plural/select.
    return VariableDeclaration.builder(tmpVarName)
        .setRhs(getMessageFormatCall(googMsgCodeGenInfo))
        .build()
        .ref();
  }
private Expression generateSingleMsgVariable ( MsgNode msgNode , String tmpVarName ) { String googMsgVarName = buildGoogMsgVarNameHelper ( msgNode ) ; GoogMsgCodeGenInfo googMsgCodeGenInfo = genGoogGetMsgCallHelper ( googMsgVarName , msgNode ) ; if ( ! msgNode . isPlrselMsg ( ) ) { return googMsgCodeGenInfo . googMsgVar ; } return VariableDeclaration . builder ( tmpVarName ) . setRhs ( getMessageFormatCall ( googMsgCodeGenInfo ) ) . build ( ) . ref ( ) ; }
Returns a code chunk representing a variable declaration for an {@link MsgNode} with no
fallback messages.