[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: question on 11.3 backslash n in strings of the  kde-i18n-howto
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2005-07-28 17:27:34
Message-ID: 200507281927.34155.nicolasg () snafu ! de
[Download RAW message or body]

On Thursday 21 July 2005 02:46, Nicolas Goutte wrote:
> On Wednesday 20 July 2005 23:13, Gary Cramblitt wrote:
> > On Wednesday 20 July 2005 04:56 pm, Nicolas Goutte wrote:
> > > QString message;
> > > // Mostly in reality the following code would be a loop
> > > message += i18n("Item1");
> > > message += "\n"
> > > message += i18n("Item2");
> > > message += "\n"
> > > message += i18n("Item3");
> > > message += "\n"
> > > message += i18n("Item4");
> >
> > Ah, so the problem is one must not use \n at the *end* of an i18n string?
>
> Well, yes, I suppose so.
>
> The example in the tutorial gives the error "msgid' and `msgstr' entries do
> not both end with '\n'". The problem is \n at the end.
>
> As far as I understand transxx, the tool creating the xx translation, seems
> to add "xx" before and after the string, so that the \n is not at the end
> of the translated message anymore. (I let decide others if this is a bug of
> transxx or if it is indeed a wanted behaviour. I am not sure.)

I have taken the time to look at the problem carefuly, I think I have found 
the real problem.

The tool transxx indeed does take care of trainling \n and copies them to the 
msgstr. 

However in the example of 11.3, it backfires as the msgid ends with \\n not 
only with \n. That is why the error message appears.

So it means:
- \n are allowed at the end (but currently not \\n )
- transxx needs to be fixed.

(...)

Have a nice day!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic