use of org.omegat.filters2.html2.HTMLFilter2 in project omegat by omegat-org.
the class HTMLFilter2Test method testTranslate.
@Test
public void testTranslate() throws Exception {
HTMLFilter2 filter = new HTMLFilter2();
translateText(filter, "test/data/filters/html/file-HTMLFilter2.html");
translateText(filter, "test/data/filters/html/file-HTMLFilter2-SMP.html");
}
use of org.omegat.filters2.html2.HTMLFilter2 in project omegat by omegat-org.
the class HTMLFilter2Test method testTagsOptimization.
@Test
public void testTagsOptimization() throws Exception {
String f = "test/data/filters/html/file-HTMLFilter2-tags-optimization.html";
HTMLFilter2 filter = new HTMLFilter2();
Core.getFilterMaster().getConfig().setRemoveTags(false);
filter.isFileSupported(new File(f), Collections.emptyMap(), new FilterContext(new Language("en"), new Language("be"), false));
IProject.FileInfo fi = loadSourceFiles(filter, f);
checkMultiStart(fi, f);
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), Collections.emptyMap(), new FilterContext(new Language("en"), new Language("be"), false));
fi = loadSourceFiles(filter, f);
checkMultiStart(fi, f);
checkMultiNoPrevNext("<c0>This</c0> is <i1>first</i1> line.", null, null, null);
translateXML(filter, f);
}
Aggregations