<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
<TITLE>Another question on PO and XLIFF</TITLE>
</HEAD>
<BODY>
On Mon, 2005-05-02 at 06:54 -0600, Yves Savourel wrote:<BR>
<BR>
Hi,<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000">I have a new question on XLIFF representation of PO.</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">The guide (</FONT></FONT><U><FONT SIZE="2"><FONT COLOR="#0000ff"><A HREF="http://xliff-tools.freedesktop.org/wiki/Projects_2fXliffPoGuideDraft2">http://xliff-tools.freedesktop.org/wiki/Projects_2fXliffPoGuideDraft2</A></FONT></FONT></U><FONT SIZE="2"><FONT COLOR="#000000">) does not seem to say anything about multi-line entries. </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">msgid ""</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">"Line 1\n line 2\n"</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">"Line 3.\n"</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">How this should be represented?</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000"><trans-unit xml:space="preserve"></FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 1\n line 2\n</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 3.\n</trans-unit></FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
This is the correct one.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000"><trans-unit xml:space="preserve"></FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 1\n</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000"> line 2\n</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 3.\n</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000"></trans-unit></FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
This one is wrong. you added an extra line feed not present in the <FONT COLOR="#000000">source text.</FONT><BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000"><trans-unit xml:space="preserve"></FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 1</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000"> line 2</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000">Line 3.</FONT></FONT><FONT COLOR="#000000"> </FONT><BR>
<FONT SIZE="2"><FONT COLOR="#000000"></trans-unit></FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
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.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000">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.</FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
Line breaks are defined by the translator. When translations are long, you find things like this:<BR>
<BR>
<PRE>
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"
</PRE>
<BR>
Translators add the necessary line breaks at translation time in the editor. Lines are usually kept shorter than 70~80 characters.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#000000">Anyhow, a section on this topic would be good to have in the Guide.</FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
You are right. <BR>
<BR>
Regards,<BR>
Rodolfo<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Rodolfo M. Raya <<A HREF="mailto:rodolfo@heartsome.net">rodolfo@heartsome.net</A>><BR>
Heartsome Holdings Pte Ltd
</TD>
</TR>
</TABLE>
</BODY>
</HTML>