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

List:       kde-core-devel
Subject:    Re: Patch for KAboutData for adding information about translators
From:       Matthias Kiefer <matthias.kiefer () gmx ! net>
Date:       2001-01-05 7:13:12
[Download RAW message or body]

Am Donnerstag,  4. Januar 2001 13:31 schrieb David Faure:
> On Wednesday 27 December 2000 20:58, Matthias Kiefer wrote:
> > To enable showing the translators, one have to call
> > KAboutData::setTranslator(const char *names, const char *emails) with
> > some dummy text marked for translation, e.g.
> > aboutData.setTranslator(I18N_NOOP("NAMES OF THE
> > TRANSLATORS"),I18N_NOOP("EMAIL OF THE TRANSLATORS"));
I also spoke to coolo about the possibility to have two standard messages 
added to the po template. So there would be no need to add to every 
application aboutData.setTranslator(...) and there would always be the same 
dummy text. But I think, just for completeness, KAboutData::setTranslator 
should be there anyway.


> > I have added an additional class KAboutTranslator , because KAboutPerson
> > uses internaly const char *, so there would be a memory leak when using
> > it or one would have to keep a reference to the string in the object.
> > Maybe someone has a idea how to solve this?
>
> Hmm, I don't see the point in not using KAboutPerson.
> The char * is allocated for the duration of the program anyway
> since it's set to a litteral string ("blah").
No, the names and the email adresses of the translators are not a litteral 
string, but they come from the i18n() function. And therefore I have to 
convert a QString back to const char * maybe with "QCString QString::utf8()" 
and then cast QCString to const char*. 
But the problem is, that the data is only valid until the QCString goes out 
of scope. And after that, the pointers in KAboutPerson returned with 
QValueList<KAboutPerson> are no longer valid.

Do you see, what I mean?


> I suggest to use KAboutPerson for translators too - yes, they are
> persons too :-)
No doubt about that ;-)

kind regards,
   Matthias
-- 
Matthias Kiefer
E-Mail: matthias.kiefer@gmx.de

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

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