- changed status to open
XLIFFWriter doesn't write all PO comment types
Original [issue 195](https://code.google.com/p/okapi/issues/detail?id=195) created by thry... on 2011-11-15T18:52:24.000Z:
Hi,
I am converting a PO file to XLIFF using the XLIFFWriter. I have noticed that when the PO file contains comments, only extracted comments are being written to the XLIFF file. Additionally, it appears the "from" attribute is left off the XLIFF <note> element.
Looking through the code, POFilter.java defines local properties for the different comment types while XLIFFWriter.java only handles properties defined in Property.java.
Shouldn't the properties defined in POFilter.java be more generic and located in Property.java where XLIFFWriter.java can access them?
My XLIFFWriter is initialized in the following way:
XLIFFWriter writer = new XLIFFWriter(); writer.setCopySource(true); writer.setIncludeAltTrans(true);
Sincerely,
Shane
Comments (4)
-
Account Deleted -
Account Deleted - attached diff.patch
Comment [2.](https://code.google.com/p/okapi/issues/detail?id=195#c2) originally posted by thry... on 2011-11-16T21:03:54.000Z:
As I have an upcoming deadline, I have put a simple patch in place to support the minimum that I need (extracted and translator comments). In the event you want to build off of what I did, I have attached the SVN diff for the files I modified.
-
Account Deleted Comment [3.](https://code.google.com/p/okapi/issues/detail?id=195#c3) originally posted by @ysavourel on 2011-11-16T22:00:38.000Z:
Thanks. That pretty much how we would do it too. -ys
-
Account Deleted - changed status to resolved
Comment [4.](https://code.google.com/p/okapi/issues/detail?id=195#c4) originally posted by @ysavourel on 2011-11-30T18:25:19.000Z:
A new property "transNote" has been added to the common properties. The PO filter now set that property for PO's translator comments. And the XLIFFWriter generates a <note from='translator'> for this property. The change will be in the next snapshot.
- Log in to comment
Comment [1.](https://code.google.com/p/okapi/issues/detail?id=195#c1) originally posted by @ysavourel on 2011-11-15T20:52:53.000Z:
The report is correct: XLIFFWriter does not output PO properties other than the "extracted comment" which is stored in a <note>. It would be nice to have also the translator comments and possibly other of the PO fields. We'll have to see how such properties can be match to other formats. I'll bring the topic to the dev-list and the next meeting (two days from now).