Commit 0df06a16 authored by jhargrave's avatar jhargrave

more xliff2 tests with paramters file

parent a780b928
......@@ -51,12 +51,12 @@ public class Xliff2XliffCompareIT
@Test
public void xliffXliffCompareFiles() throws FileNotFoundException, URISyntaxException {
// run top level files (without config)
for (File file : IntegrationtestUtils.getTestFilesNoRecurse("/xliff2/test01.xlf", Arrays.asList(".xliff", ".xlf"))) {
for (File file : IntegrationtestUtils.getTestFilesNoRecurse("/xliff2/test02.xlf", Arrays.asList(".xliff", ".xlf"))) {
runTest(true, file, "okf_xliff2", null, null);
}
// run each subdirectory where we assume there is a custom config)
for(File d : IntegrationtestUtils.getSubDirs(ClassUtil.getResourceParent(IntegrationtestUtils.class, "/xliff2/test01.xlf")))
for(File d : IntegrationtestUtils.getSubDirs(ClassUtil.getResourceParent(IntegrationtestUtils.class, "/xliff2/test02.xlf")))
{
for(File c : IntegrationtestUtils.getConfigFile(d.getPath()))
{
......@@ -78,7 +78,7 @@ public class Xliff2XliffCompareIT
String xliff = root + f + ".xliff_extracted";
String original = root + f;
String sd = ((subDir == null) ? "" : subDir.getName() + "/");
String xliffPrevious = XliffCompareUtils.CURRENT_XLIFF_ROOT + "xliff/" + sd + f + ".xliff_extracted";
String xliffPrevious = XliffCompareUtils.CURRENT_XLIFF_ROOT + "xliff2/" + sd + f + ".xliff_extracted";
List<String> locales = FileUtil.guessLanguages(file.getAbsolutePath());
LocaleId source = LocaleId.fromString(locales.get(0));
......
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" its:version="2.0">
<file original="en-fr.xliff" source-language="en-us" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8" okp:configId="/home/jimh/Code/Okapi/okapi-integration-tests/target/test-classes/xliff2/codefinder/okf_xliff2@codefinder.fprm">
<header><tool tool-id="okapi" tool-name="okapi-tests" tool-version="M29" tool-company="okapi"></tool></header>
<body>
<trans-unit id="at:mention_post">
<source xml:lang="en-us">Hello World: How are you?</source>
<seg-source><mrk mid="body" mtype="seg">Hello World: How are you?</mrk></seg-source>
<target xml:lang="fr"><mrk mid="body" mtype="seg">Bonjour tout le monde: Comment êtes-vous?</mrk></target>
</trans-unit>
<trans-unit id="at:mention_comment">
<source xml:lang="en-us">xliff2 is cool!</source>
<seg-source><mrk mid="body" mtype="seg">xliff2 is cool!</mrk></seg-source>
<target xml:lang="fr"><mrk mid="body" mtype="seg">xliff2 est cool!</mrk></target>
</trans-unit>
</body>
</file>
</xliff>
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" its:version="2.0">
<file original="Graphic Example.psd" source-language="en-us" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8">
<file original="Graphic Example.psd" source-language="en-us" target-language="" datatype="x-undefined" okp:inputEncoding="UTF-8">
<header><tool tool-id="okapi" tool-name="okapi-tests" tool-version="M29" tool-company="okapi"></tool></header>
<body>
<trans-unit id="1">
<source xml:lang="en-us">Quetzal</source>
<seg-source><mrk mid="1" mtype="seg">Quetzal</mrk></seg-source>
<target xml:lang="fr"><mrk mid="1" mtype="seg">Quetzal</mrk></target>
<target xml:lang=""><mrk mid="1" mtype="seg">Quetzal</mrk></target>
</trans-unit>
<trans-unit id="2">
<source xml:lang="en-us">An application to manipulate and process XLIFF documents</source>
<seg-source><mrk mid="1" mtype="seg">An application to manipulate and process XLIFF documents</mrk></seg-source>
<target xml:lang="fr"><mrk mid="1" mtype="seg">Une demande de manipuler et de traiter des documents XLIFF</mrk></target>
<target xml:lang=""><mrk mid="1" mtype="seg">An application to manipulate and process XLIFF documents</mrk></target>
</trans-unit>
<trans-unit id="3">
<source xml:lang="en-us">XLIFF Data Manager</source>
<seg-source><mrk mid="1" mtype="seg">XLIFF Data Manager</mrk></seg-source>
<target xml:lang="fr"><mrk mid="1" mtype="seg">Gestionnaire de données XLIFF</mrk></target>
<target xml:lang=""><mrk mid="1" mtype="seg">XLIFF Data Manager</mrk></target>
</trans-unit>
</body>
</file>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
xsi:schemaLocation="urn:oasis:names:tc:xliff:document:2.0 http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/schemas/xliff_core_2.0.xsd"
srcLang="en-US" trgLang="fr">
<file id="f1" original="en-fr.xliff">
<unit id="at:mention_post">
<segment id="body">
<source>Hello World: How are you?</source>
<target>Bonjour tout le monde: Comment êtes-vous?</target>
</segment>
</unit>
<unit id="at:mention_comment">
<segment id="body">
<source>xliff2 is cool!</source>
<target>xliff2 est cool!</target>
</segment>
</unit>
</file>
</xliff>
#v1
maxValidation.b=true
mergeAsParagraph.b=true
simplifyTags.b=false
useCodeFinder.b=true
codeFinderRules.count.i=4
codeFinderRules.rule0=\{[^}]*?\}
codeFinderRules.rule1=\[[^]]*?\]
codeFinderRules.rule2=%(([-0+#]?)[-0+#]?)((\d\$)?)(([\d\*]*)(\.[\d\*]*)?)[dioxXucsfeEgGpn@]
codeFinderRules.rule3=\$[a-zA-Z_-]+
codeFinderRules.sample=[….]$0a${….}$0a$%@$0a$%s$0a$%1$s$0a$%2$s$0a$%d$0a$%1$d$0a$%2$d$0a$%u$0a$%1$@$0a$%2$@$0a$%3$@$0a$%4$@$0a$%1$s$0a$%2$s$0a$%3$s$0a$%d$0a$%c$0a$$privacy$0a$%3$d$0a$%4$d$0a$%5$d$0a$%6$d$0a$%3$d$0a$%4$d$0a$%5$d$0a$%6$d$0a$%4$s$0a$%5$s$0a$%6$s$0a$%5$@$0a$%6$@
codeFinderRules.useAllRulesWhenTesting.b=true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment