[xliff-tools] Another question on PO and XLIFF
Rodolfo M. Raya
rodolfo at heartsome.net
Mon May 2 09:00:18 PDT 2005
On Mon, 2005-05-02 at 17:26 +0200, Fredrik Corneliusson wrote:
Hi,
> However I saw that the translate project's po2xliff filter uses the
> last version described, and the xliff2po takes care of recreating the
> \n.
What does that filter do when the translator adds an extra line feed in
the translated version because the text is too long?
For example:
msgid ""
"Line 1\n line 2\n"
"Line 3.\n"
converted as
<trans-unit xml:space="preserve">
<source>
Line 1
line 2
Line 3.
</source>
</trans-unit>
could be translated as:
<trans-unit xml:space="preserve">
<source>
Line 1
line 2
Line 3.
</source>
<target>
Línea 1
línea 2
Long line here
3.
</target>
</trans-unit>
is this converted to
msgid ""
"Line 1\n line 2\n"
"Line 3.\n"
msgstr ""
"Línea 1\n línea 2\n Long line here\n 3\n."
?
How does that filter know when to break a long line? For example, from
msgstr ""
"Línea 1\n línea 2\n Long line here\n 3\n."
to
msgstr ""
"Línea 1\n línea 2\n "
"Long line here\n 3\n."
or to
msgstr ""
"Línea 1\n "
"línea 2\n "
"Long line "
"here\n 3\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?
When translating XLIFF files you can reorder tags because some source
formats allow this. An XLIFF editor does not care about the original
format. It deals with XLIFF files only and the only important thing is
to check that all tags are in place.
It is possible to check sequences in the filters at reverse conversion
time, but only for files that have c-format flags. When Python or PHP
files are converted to XLIFF formatting codes are not treated as tags.
If someone updates the Reference guide explaining how to handle other
languages, I will happily update the Java filters accordingly. FWIW, I
did not do this myself before because I know nothing about Python or PHP
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/43e10ce1/attachment.htm
More information about the xliff-tools
mailing list