[xliff-tools] Another question on PO and XLIFF

Rodolfo M. Raya rodolfo at heartsome.net
Mon May 2 19:14:02 PDT 2005


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

Hi,

I will try to make my reply clearer than before.


> 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 right version, as all characters that appear between double
quotes after msgid are present in the translation unit.



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


Here you added a linefeed not present in the original text, so you
basically altered the source text. As you used xml:space="preserve" in
the translation unit, then there is a contradiction that invalidates
this option. Remember that the xml:space attribute also affects linefeed
characters. 


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


This is absolutely wrong, because here you removed three sequences of
two chars from the text. The sequences "\n" are part of the translatable
text because they appear between the quotes that follow msgid.

The sequence "\n" should not be confused with a linefeed character. The
program that will display the text at runtime will parse the translation
and add the linefeeds at the places indicated by the translator.
Meanwhile, the sequences "\n" must be part of the translatable text.

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/b214b352/attachment.htm


More information about the xliff-tools mailing list