use of org.omegat.filters2.text.magento.MagentoFilter in project omegat by omegat-org.
the class MagentoFilterTest method testAlign.
@Test
public void testAlign() throws Exception {
final AlignResultHolder alignResult = new AlignResultHolder();
align(new MagentoFilter(), "magento/MagentoFilterAlign.csv", "magento/MagentoFilterAlign-tr.csv", new IAlignCallback() {
public void addTranslation(String id, String source, String translation, boolean isFuzzy, String comment, IFilter filter) {
alignResult.aligned = id.equals("code") && source.equals("original") && translation.equals("translated");
}
});
assertTrue(alignResult.aligned);
}
use of org.omegat.filters2.text.magento.MagentoFilter in project omegat by omegat-org.
the class MagentoFilterTest method testParse.
@Test
public void testParse() throws Exception {
List<String> entries = parse(new MagentoFilter(), "test/data/filters/magento/MagentoFilter.csv");
assertEquals(5, entries.size());
int i = 0;
assertEquals("Tr: %s", entries.get(i++));
assertEquals("Tr: There are <a href=\"\"%s\"\">%s items</a> in your cart.", entries.get(i++));
assertEquals("Tr: Separate by \"\",\"\".", entries.get(i++));
assertEquals("Tr: After selecting a new media storage location, press the Synchronize button", entries.get(i++));
assertEquals("Tr: The reader repaired", entries.get(i++));
}
Aggregations