Le 30 sept. 07 à 18:32, Martin Vermeer a écrit :
On Sun, Sep 30, 2007 at 04:51:36PM +0200, Ran Rutenberg wrote:
Hi,

After much work I've isolated the string that is causing the trouble. The string id is 3569. The string itself is "[[Replace with the code of your language]]". No matter what I'm writing as a translation (I even tried to omit the square brackets) I'm getting the error I've described. If I don't
translate the string the error disappears.
I hope someone can help me get around this problem.


As martin pointed out, using 'he' as translation is a fix. However, there is code in Message.cpp to remove [[text]] from the translated string. I am not sure why it does not work.

namespace {
boost::regex const reg("^([^\\[]*)\\[\\[[^\\]]*\\]\\]$");
};

qnd then

                // Some english words have different translations,
                // depending on context. In these cases the original
                // string is augmented by context information (e.g.
                // "To:[[as in 'From page x to page y']]" and
                // "To:[[as in 'From format x to format y']]".
                // This means that we need to filter out everything
                // in double square brackets at the end of the
                // string, otherwise the user sees bogus messages.
                // If we are unable to honour the request we just
                // return what we got in.
                boost::smatch sub;
                if (regex_match(m, sub, reg))
                        translated = from_ascii(sub.str(1));
                else
                        translated = from_ascii(tmp);

JMarc

Reply via email to