use of org.omegat.filters3.xml.xhtml.XHTMLFilter in project omegat by omegat-org.
the class XHTMLFilterTest method testTranslate.
@Test
public void testTranslate() throws Exception {
String f = "test/data/filters/xhtml/file-XHTMLFilter.html";
XHTMLFilter filter = new XHTMLFilter();
filter.isFileSupported(new File(f), new TreeMap<String, String>(), new FilterContext(new Language("en"), new Language("be"), false));
translateXML(filter, f);
}
use of org.omegat.filters3.xml.xhtml.XHTMLFilter in project omegat by omegat-org.
the class XHTMLFilterTest method testParse.
@Test
public void testParse() throws Exception {
String f = "test/data/filters/xhtml/file-XHTMLFilter.html";
XHTMLFilter filter = new XHTMLFilter();
filter.isFileSupported(new File(f), new TreeMap<String, String>(), new FilterContext(new Language("en"), new Language("be"), false));
parse(filter, f);
}
use of org.omegat.filters3.xml.xhtml.XHTMLFilter in project omegat by omegat-org.
the class XHTMLFilterTest method testLoad.
@Test
public void testLoad() throws Exception {
String f = "test/data/filters/xhtml/file-XHTMLFilter.html";
XHTMLFilter filter = new XHTMLFilter();
filter.isFileSupported(new File(f), new TreeMap<String, String>(), new FilterContext(new Language("en"), new Language("be"), false));
IProject.FileInfo fi = loadSourceFiles(filter, f);
checkMultiStart(fi, f);
checkMulti("en", null, null, "", "en", null);
checkMulti("en", null, null, "en", "XHTML 1.0 Example", null);
checkMulti("XHTML 1.0 Example", null, null, "en", "Extensible HyperText Markup Language", null);
checkMulti("Extensible HyperText Markup Language", null, null, "XHTML 1.0 Example", "http://www.w3.org/Icons/valid-xhtml10", null);
}
use of org.omegat.filters3.xml.xhtml.XHTMLFilter in project omegat by omegat-org.
the class XHTMLFilterTest method testTagsOptimization.
@Test
public void testTagsOptimization() throws Exception {
String f = "test/data/filters/xhtml/file-XHTMLFilter-tags-optimization.html";
XHTMLFilter filter = new XHTMLFilter();
Core.getFilterMaster().getConfig().setRemoveTags(false);
filter.isFileSupported(new File(f), new TreeMap<String, String>(), new FilterContext(new Language("en"), new Language("be"), false));
IProject.FileInfo fi = loadSourceFiles(filter, f);
checkMultiStart(fi, f);
checkMultiNoPrevNext("en", null, null, null);
checkMultiNoPrevNext("en", null, null, null);
checkMultiNoPrevNext("<i0/><b1><c2>This</c2> is <i3>first</i3> line.</b1>", null, null, null);
translateXML(filter, f);
Core.getFilterMaster().getConfig().setRemoveTags(true);
filter.isFileSupported(new File(f), new TreeMap<String, String>(), new FilterContext(new Language("en"), new Language("be"), false));
fi = loadSourceFiles(filter, f);
checkMultiStart(fi, f);
checkMultiNoPrevNext("en", null, null, null);
checkMultiNoPrevNext("en", null, null, null);
checkMultiNoPrevNext("<c0>This</c0> is <i1>first</i1> line.", null, null, null);
translateXML(filter, f);
}
Aggregations