computerline1z / okapi

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

XMLStreamFilter with HTMLSubfilter doesn't group back the nested translation tags correctly with M22 #375

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following is my source file content -

<SOLUTIONS>
<![CDATA[Attachments in <img width="13" height="15" 
src="mail-p_attach_all_01.png" alt="paper clip" />  end tag]]>
</SOLUTIONS>

This generates the following text units -

  <trans-unit id="1" resname="{group:sd1,tu:sd1_tu1}" xml:space="preserve">
    <source xml:lang="en">Attachments in <ph id="1">[#$sd1_dp1]</ph> end tag</source>
    <target xml:lang="de-DE" state="new"><mrk mid="0" mtype="seg">Attachments in <ph id="1">[#$sd1_dp1]</ph> end tag</mrk></target>
  </trans-unit>
  <trans-unit id="2" resname="{group:sd1,tu:sd1_tu2}" xml:space="preserve">
    <source xml:lang="en">paper clip</source>
    <target xml:lang="de-DE" state="new"><mrk mid="0" mtype="seg">paper clip</mrk></target>
</trans-unit>

It fails to insert the translation for the place holder with the generated file 
content as -

<SOLUTIONS>
<![CDATA[Attachments in -ERR:REF-NOT-FOUND- end tag]]>
</SOLUTIONS>

The yml file used by by my html filter contains -

assumeWellformed: true
global_cdata_subfilter: okf_html
preserve_whitespace: false

elements:
  '.*':
    ruleTypes: [EXCLUDE]
  solutions:
    ruleTypes: [INCLUDE]

Original issue reported on code.google.com by 143.ravi...@gmail.com on 28 Oct 2013 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by yves.sav...@gmail.com on 28 Oct 2013 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by jhargrav...@gmail.com on 28 Oct 2013 at 2:10

GoogleCodeExporter commented 9 years ago
were you able to reproduce it ?
Let me know if you need any more info, will be glad to provide.

Original comment by 143.ravi...@gmail.com on 22 Nov 2013 at 2:40

GoogleCodeExporter commented 9 years ago
God timing. I'm working on similar issues today. I will add a unit test to our 
current dev branch and try to reproduce it. The snippet and rules should be 
enough.

Original comment by jhargr...@lingotek.com on 22 Nov 2013 at 3:19

GoogleCodeExporter commented 9 years ago
When I implement a simple test case I don't see the error. Could this be an 
xliff issue? The tests pass in M22 and M24

See attached unit test

Original comment by jhargrav...@gmail.com on 22 Nov 2013 at 6:17

Attachments:

GoogleCodeExporter commented 9 years ago
even running a full rainbow xliff project this seems to work - at least in the 
latest M24 snapshot

Original comment by jhargrav...@gmail.com on 22 Nov 2013 at 6:45

Attachments: