W3C home > Mailing lists > Public > www-i18n-comments@w3.org > August 2007

XML i18n Best Practices, BP 21 comments

From: Yves Savourel <ysavourel@translate.com>
Date: Mon, 27 Aug 2007 09:38:22 -0600
To: <public-i18n-its@w3.org>, <www-i18n-comments@w3.org>
Cc: <KARA@CA.IBM.COM>
Message-ID: <001e01c7e8c0$4d61ac00$8d05a8c0@BREIZH>

Hello Kara,


> Best Practice 21
>
> The sentence "Error messages, quotations are an example of inserted 
> text that usually would not cause problem." is not correct. Error 
> messages in particular frequently contain automatically inserted text that
> is not independent and therefore problematic to translate. I would remove 
> this sentence.


I don't think error message are more problematic than for example a section title. They are usually grammatically independent from
the surrounding text, etc.

For example, inserting an error message like this:

<p>If you see the error message: "<ref err='er12'/>" call your supervisor.</p>

Seems to me, as OK as inserting a reference to a section title like this:

<p>See "<specref id="DevTerm"/>" for more information.</p>

>From the viewpoint of the caller of the reference, the inserted text is a self-contained phrase.


Yes, many error messages contain themselves inserted text (as any other referenced text), but this is a separate issue that needs to
be resolved separately. For example:

<msg id="nofile">File {0} not found.</msg>

Is a Java-type message where {0} is mark inserted text. Using it directly as a reference would show a glaring problem in the final
result since {0} would be part of the text.

But the issue is not coming from inserting the error message in the referencing text. You would have the same problem (presence of
{0}) if you were just providing the list of the error messages, without inserting them anywhere.

The issue is coming from the fact that the referenced text is not really a text but a piece of code.

I have seen people work around that issue by doing this:

<msg id="nofile">
 <replace by="{0}>[Filename]</replace>
 <text>File [Filename] not found.</msg>
</msg>

And generating their Java properties file from XML.

This way: a) the translator gets some good context; b) the message is translated only once, and c) the doc always consistent with
the software. The cost: one tiny XSLT template to generate the properties file.

I guess I'm trying to show that even error messages with parameters can be used as inserted text. If they are self-contained
sentence they do not break BP10.


Now, all this said, I do agree that using "error message" as an example in the BP may lead to some confusion. So I propose to use
this instead:

"Titles or quotations are examples of inserted text that usually would not cause problem."


Cheers,
-yves
Received on Monday, 27 August 2007 15:38:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:32:36 GMT