computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

Turning off option to use <g></g> and </x> notation seems to cause subfilter to not execute #232

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the same files and setup as from issue #231 (also attached) to add a 
file, set it to use a customer XML filter with an HTML subfilter.  The HTML 
subfilter has a custom regex.  
2. When you goto utilities/Translation Kit Creation and you change selection 
for <g></g> and </x> to be turned off, it appears the HTML subfilter doesn't 
run.

What is the expected output? What do you see instead?

Instead, we see this, where the HTML filter doesn't appear to run.  Note that 
when we run this same command with the option enabled, we get the issue in 
ticket #231, but it does run the subfilter.

<?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">
<file original="/xml-freemarker.xml" source-language="en-us" 
target-language="fr-fr" datatype="xml">
<body>
<group id="P1BC00-1" resname="sub-filter:">
<trans-unit id="tu1" xml:space="preserve">
<source xml:lang="en-us"><ph id="1">

    &amp;lt;strong> this is a bolded text between html strong tags &amp;lt;/strong>

    Here we want to pull out the freemarker into tags, but pass through 
    the text and the brace value: &amp;lt;#if contactInfo??></ph> or 
    ${contactInfo}<ph id="2">&amp;lt;/#if></ph>.

Here we ensure that we get the single else and handle the double quotes:
<ph id="3">&amp;lt;#if smb.maxAlarmLevel == "notice"></ph>Important<ph 
id="4">&amp;lt;#else></ph>Urgent<ph id="5">&amp;lt;/#if></ph> 
information regarding ${sbsName}

Another test with lots of regexee text: 
<ph id="6">&amp;lt;#if commentAuthorURL?has_content></ph> 
<bpt id="7">[#$dp1]</bpt>${commentAuthorName}<ept id="7">&lt;/a></ept>
<ph id="8">&amp;lt;#else></ph>${commentAuthorName}<ph id="9">&amp;lt;/#if></ph> 
<bpt id="10">[#$dp2]</bpt>View all comments on this event<ept 
id="10">&lt;/a></ept>

Ensure we pull don't break early on parentheses: 
${totalTaskCount} upcoming <ph id="11">&amp;lt;#if (overdueTasks.size() > 
0)></ph>
(${overdueTasks.size()} overdue)<ph id="12">&amp;lt;/#if></ph>

</source>
</trans-unit>
</group>
</body>
</file>
</xliff>

What version of the product are you using? On what operating system?

Rainbow - Okapi Localization Toolbox
Version 6.0.17-Snapshot
Windows

Rainbow - Okapi Localization Toolbox
Version 0.17 gtk2 Linux x86 64

Please provide any additional information below.

Original issue reported on code.google.com by esogasim...@gmail.com on 18 May 2012 at 2:50

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by yves.sav...@gmail.com on 20 May 2012 at 2:28