[Qt-creator] [PATCH] i18n support for Qt Creator

Oswald Buddenhagen oswald.buddenhagen at trolltech.com
Wed Feb 4 14:41:16 CET 2009


hi,

thanks for the patches. they need some more work, though:

On Wed, Feb 04, 2009 at 04:59:29PM +0900, axasia wrote:
> a.Add function call that QTranslator.load() and installTranslator().
>   see also src/app/main.cpp
> 
this should also load the qt translations (and the two should be
error-handled, so one never ends up with only one being loaded).

> b.Add translation file

> and translations.pro.
>
this is a complete maintenance nightmare.
maybe that will work: create a create separate .ts file from each .pro
file (so no file lists are duplicated) and then run lupdate over the .ts
files to create the final .ts (yes, in theory that works with qt 4.5).
the new lconvert tool would also work if we decide to do the actual
translations on the separate .ts files and merge only for the lrelease.

> c.Putting a TRANSLATOR comment because work around lupdate limitation.
> 
yeah ... we need to make lupdate smarter. whatever. :-/
i only glanced over the patch, but i wonder whether you should not use
QApplication::translate() with a proper context instead of QObject::tr()
in some places.

regards



More information about the Qt-creator-old mailing list