Examples of HeaderEntry


Examples of org.zanata.rest.dto.extensions.gettext.HeaderEntry

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mmZ");

        // Add initial headers to the translations
        PoTargetHeader transHeader = new PoTargetHeader();
        transHeader.getEntries().add(
                new HeaderEntry(HeaderFields.KEY_LastTranslator,
                        "Test User <test@zanata.org>"));
        transHeader.getEntries().add(
                new HeaderEntry(HeaderFields.KEY_PoRevisionDate, dateFormat
                        .format(poRevDate.getTime()))); // Date in the future
        entity.getExtensions(true).add(transHeader);

        // Push the translations
        ClientResponse<String> putResponse =
View Full Code Here

Examples of org.zanata.rest.dto.extensions.gettext.HeaderEntry

        Resource doc = newDoc(id, textflow);
        PoHeader poHeader = new PoHeader();
        poHeader.setComment("poheader comment");
        List<HeaderEntry> poEntries = poHeader.getEntries();
        poEntries.add(new HeaderEntry("Project-Id-Version", "en"));
        poEntries.add(new HeaderEntry("Content-Type",
                "application/x-publican; charset=UTF-8\n"));
        doc.getExtensions(true).add(poHeader);

        log.debug("{}", doc);
        Response response =
View Full Code Here

Examples of org.zanata.rest.dto.extensions.gettext.HeaderEntry

        tr.getTextFlowTargets().add(target);

        PoTargetHeader targetHeader = new PoTargetHeader();
        targetHeader.setComment("target comment");
        List<HeaderEntry> entries = targetHeader.getEntries();
        entries.add(new HeaderEntry("Project-Id-Version", "ja"));
        tr.getExtensions(true).add(targetHeader);

        transResource.putTranslations(id, DE, tr, extGettextComment);

        return tr;
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.