HTML-like markup and implicit restrictions on syntax



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).

So what do we do?

 * Report this as a bug against evolution (because that's where the
example comes from)?

 * Never use \" ever again ever in any translation in case it happens
to be illegal in that particular string?  I suppose we could go with
those fancy unicode quotation marks that are increasingly popular
these days.

 * Would the \" somehow magically have worked anyway?

 * Hope someone somewhere implements an XML-format flag in gettext?

In general:  Given an ordinary-looking message without gettext flags,
how can we know if there are implicit requirements to character types?

Best regards
Ask


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