[xliff-tools] Another question on PO and XLIFF

Fredrik Corneliusson fredrik.corneliusson at gmail.com
Mon May 2 08:26:10 PDT 2005


Hi,
I agree with Rodolfo that the most correct representation is the first one.

However I saw that the translate project's po2xliff filter uses the
last version described, and the xliff2po takes care of recreating the
\n.

This brings up a question about how much help filters can give the translator.
For example if a message uses c-formatting and the placeholders
changes sequence in the translation the XLIFF to PO filter could
automatically add or check the sequence representation (eg. %2$s %1$s)
based on the ph tag id. I think could lower the entry bar for
translators, make translation more efficient and at the provide
functionality not provided by the current PO editors.

What's your take on this?

On 5/2/05, Rodolfo M. Raya <rodolfo at heartsome.net> wrote:
>  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 
> _______________________________________________
> xliff-tools mailing list
> xliff-tools at lists.freedesktop.org
> http://lists.freedesktop.org/cgi-bin/mailman/listinfo/xliff-tools
> 
> 
>


More information about the xliff-tools mailing list