computerline1z / okapi

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

XLIFF empty "target" elements are interpreted as missing #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps will reproduce the problem:
1. Create an XLIFFFilter
2. Start reading an XLIFF file that has an empty target
3. Check the TEXT_UNIT events
4. tu.getTarget(trgLocale) returns null

Steps will reproduce the problem without coding:
1. Have an xlf that contains a translation-unit with empty source and empty 
target
2. Validate in checkmate
3. "Missing translation." error

I would expect an empty "target" in file to result in an empty target in the 
event, not a null one.

Using m16 on Windows.

Attached test file and fix.

Original issue reported on code.google.com by mihn...@gmail.com on 17 Apr 2012 at 6:04

Attachments:

GoogleCodeExporter commented 9 years ago
Patch applied, and extra unit tests added.
Thank you Mihai.

Original comment by yves.sav...@gmail.com on 18 Apr 2012 at 10:50