Package org.fedorahosted.tennera.jgettext.catalog.parse

Examples of org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser


            }
        }.run();
    }

    private static void assertPoFileCorrect(String poFileContents) {
        MessageStreamParser messageParser =
                new MessageStreamParser(new StringReader(poFileContents));

        while (messageParser.hasNext()) {
            Message message = messageParser.next();

            if (message.isHeader()) {
                // assert that expected headers are present (with values if
                // needed)
                assertThat(message.getMsgstr(), containsString("MIME-Version:"));
View Full Code Here


        if (translations.length % 2 != 0) {
            throw new AssertionError(
                    "Translation parameters should be given in pairs.");
        }

        MessageStreamParser messageParser =
                new MessageStreamParser(new StringReader(poFileContents));

        List<String> found = new ArrayList<String>(translations.length);

        // Assert that all the given translations are present
        while (messageParser.hasNext()) {
            Message message = messageParser.next();

            if (!message.isHeader()) {
                // Find the message id in the array given to check
                int foundAt = 0;
                while (foundAt < translations.length) {
View Full Code Here

TOP

Related Classes of org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser

Copyright © 2018 www.massapicom. 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.