<!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">
</HEAD>
<BODY>
On Tue, 2005-05-03 at 11:29 +1000, Asgeir Frimannsson wrote:<BR>
<BR>
Hi
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Mon, 2 May 2005 23:39, Rodolfo M. Raya wrote:</FONT>
<FONT COLOR="#000000">> Line breaks are defined by the translator. When translations are long,</FONT>
<FONT COLOR="#000000">> you find things like this:</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> msgid ""</FONT>
<FONT COLOR="#000000">> "Short text in the original"</FONT>
<FONT COLOR="#000000">> msgstr ""</FONT>
<FONT COLOR="#000000">> "long translation, that spans to perhaps two "</FONT>
<FONT COLOR="#000000">> "lines or more in the target language because "</FONT>
<FONT COLOR="#000000">> "it does not fit in the dialogue where it has "</FONT>
<FONT COLOR="#000000">> "to be displayed"</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> Translators add the necessary line breaks at translation time in the</FONT>
<FONT COLOR="#000000">> editor. Lines are usually kept shorter than 70~80 characters.</FONT>
<FONT COLOR="#000000">I might have misunderstood you here, but in this example the msgstr at runtime </FONT>
<FONT COLOR="#000000">would be one long line without newline characters. But I assume you here </FONT>
<FONT COLOR="#000000">meant that translators add the necessary '\n' characters to break the target </FONT>
<FONT COLOR="#000000">string into multiple lines at runtime.</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
I know that the text is seen as a long string by the program at runtime. But the program needs to parse the escape characters embedded in the string, so you should never remove the escape characters as Yves and you proposed.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">In an XLIFF editor, instead of manually adding newlines to be able to see the </FONT>
<FONT COLOR="#000000">whole *long* string in the editor window, shouldn't it be word-wrapped (and </FONT>
<FONT COLOR="#000000">visually indicated some how),</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
I know that. Heartsome's XLIFF editor has automatic word wrapping. I don't care if the translated document says <BR>
<BR>
<BLOCKQUOTE>
<TT>msgstr ""</TT><BR>
<TT>"line 1 "</TT><BR>
<TT>"line 2"</TT><BR>
<BR>
</BLOCKQUOTE>
or <BR>
<BR>
<BLOCKQUOTE>
<TT>msgstr "line 1 line 2"</TT><BR>
</BLOCKQUOTE>
<BR>
but when the entry is <BR>
<BR>
<BLOCKQUOTE>
msgid "line 1\n line 2\n"<BR>
</BLOCKQUOTE>
<BR>
the translated version should be<BR>
<BR>
<BLOCKQUOTE>
msgid "line1\n line2\n"<BR>
msgstr "linea 1\n linea 2\n"<BR>
</BLOCKQUOTE>
<BR>
or <BR>
<BR>
<BLOCKQUOTE>
<TT>msgid </TT>""<BR>
<TT>"line1\n</TT><TT> </TT>"<BR>
"<TT>line2\n"</TT><BR>
<TT>msgstr ""</TT><BR>
<TT>"linea 1\n"</TT><BR>
<TT>" linea 2\n"</TT><BR>
</BLOCKQUOTE>
<BR>
To achieve that, it is important that all characters that are inside double quotes in the msgid appear in the <source> element. Do not assume that some magic can recreate them at reverse conversion if they are not present in the source.<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>