Package com.google.template.soy.base

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


        " source-language=\"", attributeEscaper.escape(sourceLocaleString), "\"");
    if (hasTarget) {
      ilb.appendParts(" target-language=\"", attributeEscaper.escape(targetLocaleString), "\"");
    }
    ilb.appendLineEnd(">");
    ilb.increaseIndent();
    ilb.appendLine("<body>");
    ilb.increaseIndent();

    for (SoyMsg msg : msgBundle) {
View Full Code Here


      ilb.appendParts(" target-language=\"", attributeEscaper.escape(targetLocaleString), "\"");
    }
    ilb.appendLineEnd(">");
    ilb.increaseIndent();
    ilb.appendLine("<body>");
    ilb.increaseIndent();

    for (SoyMsg msg : msgBundle) {

      // Begin 'trans-unit'.
      ilb.appendLineStart("<trans-unit id=\"", Long.toString(msg.getId()), "\"");
View Full Code Here

          xliffDatatype = contentType;  // just use the contentType string
        }
        ilb.appendParts(" datatype=\"", attributeEscaper.escape(xliffDatatype), "\"");
      }
      ilb.appendLineEnd(">");
      ilb.increaseIndent();

      // Source.
      ilb.appendLineStart("<source>");
      for (SoyMsgPart msgPart : msg.getParts()) {
        if (msgPart instanceof SoyMsgRawTextPart) {
View Full Code Here

    boolean hasTarget = targetLocaleString != null && targetLocaleString.length() > 0;

    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.