Examples of appendLineStart()


Examples of com.google.template.soy.base.IndentedLinesBuilder.appendLineStart()

    ilb.increaseIndent();

    for (SoyMsg msg : msgBundle) {

      // Begin 'trans-unit'.
      ilb.appendLineStart("<trans-unit id=\"", Long.toString(msg.getId()), "\"");
      String contentType = msg.getContentType();
      if (contentType != null && contentType.length() > 0) {
        String xliffDatatype = CONTENT_TYPE_TO_XLIFF_DATATYPE_MAP.get(contentType);
        if (xliffDatatype == null) {
          xliffDatatype = contentType;  // just use the contentType string
View Full Code Here

Examples of com.google.template.soy.base.IndentedLinesBuilder.appendLineStart()

      }
      ilb.appendLineEnd(">");
      ilb.increaseIndent();

      // Source.
      ilb.appendLineStart("<source>");
      for (SoyMsgPart msgPart : msg.getParts()) {
        if (msgPart instanceof SoyMsgRawTextPart) {
          String rawText = ((SoyMsgRawTextPart) msgPart).getRawText();
          ilb.append(contentEscaper.escape(rawText));
        } else {
View Full Code Here

Examples of com.google.template.soy.base.IndentedLinesBuilder.appendLineStart()

    IndentedLinesBuilder ilb = new IndentedLinesBuilder(2);
    ilb.appendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    ilb.appendLine("<xliff version=\"1.2\" xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">");
    ilb.increaseIndent();
    ilb.appendLineStart(
        "<file original=\"SoyMsgBundle\" datatype=\"x-soy-msg-bundle\"", " xml:space=\"preserve\"",
        " source-language=\"", attributeEscaper.escape(sourceLocaleString), "\"");
    if (hasTarget) {
      ilb.appendParts(" target-language=\"", attributeEscaper.escape(targetLocaleString), "\"");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.