Package org.zanata.adapter.po

Examples of org.zanata.adapter.po.PoReader2


        return editorPage;
    }

    private static List<TextFlow> getTextFlows(File file)
            throws FileNotFoundException {
        return new PoReader2().extractTemplate(
                new InputSource(new FileInputStream(file)), LocaleId.EN_US,
                file.getName()).getTextFlows();
    }
View Full Code Here


                file.getName()).getTextFlows();
    }

    private static List<TextFlowTarget> getTextFlowTargets(File file)
            throws FileNotFoundException {
        return new PoReader2().extractTarget(
                new InputSource(new FileInputStream(file)))
                .getTextFlowTargets();
    }
View Full Code Here

        return path;
    }

    private TranslationsResource parsePoFile(InputStream fileContents,
            boolean offlinePo) {
        PoReader2 poReader = new PoReader2(offlinePo);
        return poReader.extractTarget(new InputSource(fileContents));
    }
View Full Code Here

        return poReader.extractTarget(new InputSource(fileContents));
    }

    private Resource parsePotFile(InputStream fileContents, String docId,
            boolean offlinePo) {
        PoReader2 poReader = new PoReader2(offlinePo);
        // assume english as source locale
        Resource res =
                poReader.extractTemplate(new InputSource(fileContents),
                        new LocaleId("en"), docId);
        return res;
    }
View Full Code Here

TOP

Related Classes of org.zanata.adapter.po.PoReader2

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.