Le dimanche 8 Août 2004 14:15, Georg Baum a écrit : > Am Sonntag, 8. August 2004 00:21 schrieb Jean-Marc Lasgouttes: > > The following patch is supposed to make sure that the qt-internal > > strings like in the FileDialog or menu shortcuts get translated (at > > least in german and french, the only two translations provided by > > trolltech...)/ > > They have also ar, iw and ru, but unsupported.
Yes, you are right. I did not mention this because I thought for some reason that the translations were incomplete. > KDE once translated the qt > messages with gettext (I don't know if they still do). Maybe we can use > their mechanism and qt translations, too? The KTranslator stuff is very complicated and does not translate Qt native dialogs but the K ones. I was looking for something simple... > It works if you make the translator static: > > static QTranslator qt( 0 ); > > The examples do work without a static translator, because it is constructed > in main(). Excellent detective work. I will try that out. > BTW, while trying to debug this I found out that adding the line > > QValueList<QTranslatorMessage> list = qt.messages(); > > destroys the translator (i. e. strings don't get translated anymore), > although QTranslator::messages() is declared const. Good point. Thanks. JMarc