[xliff-tools] Another question on PO and XLIFF

Rodolfo M. Raya rodolfo at heartsome.net
Mon May 2 06:39:21 PDT 2005


On Mon, 2005-05-02 at 06:54 -0600, Yves Savourel wrote:

Hi,


> I have a new question on XLIFF representation of PO. 
> The guide (http://xliff-
> tools.freedesktop.org/wiki/Projects_2fXliffPoGuideDraft2) does not
> seem to say anything about multi-line entries. 
> 
> msgid "" 
> "Line 1\n line 2\n" 
> "Line 3.\n"
> 
> How this should be represented?
> 
> <trans-unit xml:space="preserve">
> 
> Line 1\n line 2\n 
> Line 3.\n</trans-unit>


This is the correct one.


> <trans-unit xml:space="preserve"> 
> Line 1\n 
>  line 2\n 
> Line 3.\n 
> </trans-unit>


This one is wrong. you added an extra line feed not present in the
source text.


> <trans-unit xml:space="preserve"> 
> Line 1 
>  line 2 
> Line 3. 
> </trans-unit>


This one is also wrong. You removed the "\n" and that's translatable
text. A '\n" is there to be used by a C program when formatting the text
on screen, it is not intended to be interpreted by the filter.


> The third seems more logical to me, but it could cause issues too, for
> example if the line-breaks are not \n but \r or \r\n (if the PO file
> is used for a non-Unix application) how would we know which type of
> line-break notation to put ack when merging.


Line breaks are defined by the translator. When translations are long,
you find things like this:


msgid ""
"Short text in the original"
msgstr ""
"long translation, that spans to perhaps two "
"lines or more in the target language because "
"it does not fit in the dialogue where it has "
"to be displayed"


Translators add the necessary line breaks at translation time in the
editor. Lines are usually kept shorter than 70~80 characters.


> Anyhow, a section on this topic would be good to have in the Guide.


You are right. 

Regards,
Rodolfo
-- 
Rodolfo M. Raya <rodolfo at heartsome.net>
Heartsome Holdings Pte Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xliff-tools/attachments/20050502/7de37e20/attachment.html


More information about the xliff-tools mailing list