Re: HTML-like markup and implicit restrictions on syntax



On Mon, 2012-09-17 at 00:34 +0200, Ask Hjorth Larsen wrote:
> Hi internationalizers
> 
> A troubling technical question follows.  In Danish we usually use "
> rather than ' as quotation marks.  As an example, we would make the
> following translation:
> 
> #: ../calendar/calendar.error.xml.h:64
> msgid "Delete memo list '{0}'?"
> msgstr "Slet memolisten \"{0}\"?"
> 
> This is all good and well.
> 
> But a few lines later we encounter the nightmarish horror:
> 
> #: ../calendar/calendar.error.xml.h:66
> msgid "Delete remote calendar "{0}"?"
> msgstr ""
> 
> Oh dear.  It must have been very wrong to use \" in the previous
> translation, because we see now that we need to use the XML escape
> " to get that character.  But we couldn't have known this if the
> English version had not revealed it, as there is no flag like C-format
> or Python-format to tell us which characters are allowed (although the
> source reference does end with xml.h, but that doesn't prove
> anything).

The only time you have to use " or ' in XML is inside
attribute values that are quoted with the respective character.
I just checked, and these strings are in elements, so the entity
isn't needed. It's not wrong to use it. It's not wrong not to
use it.

I personally think intltool should substitute entities before
handing strings to translators. That's how itstool works.

> So what do we do?
>  * Hope someone somewhere implements an XML-format flag in gettext?

I asked about this on the gettext mailing list:

http://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00013.html

I got no response.

--
Shaun




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]