Just to finish this whole discussion:

Turns out our qt3 way of using the de.po translation does not work at all 
under qt4. Instead, I had to add our own implementation of the 
QTranslator::translate() method, which is possible because that method is 
virtual. In our own implementation, we use the normal gettext() call to 
obtain the actual translation from gettext's .mo file and not through 
qt's .qm file. This is now included in aqbanking-2.3.1 and it works just fine 
both on qt4/Unix and qt4/Windows. The nice part of this implementation is 
that each call to the translator does not have to be changed at all; the 
required change is rather small and our normal source code didn't have to be 
changed at all. Thinking about it, the solution is almost elegant. :-)

>From what the QTranslator documentation says, the whole method of using a .qm 
file that has been created by gettext's msgfmt program should not have been 
working to begin with, neither in qt3 nor in qt4. Nevertheless it did work in 
qt3 but now it doesn't in qt4. I've reported this as a bug to trolltech. 

On the other hand the newly introduced workaround would work both in qt4 and 
qt3, albeit currently it is only used in qt4. We could think of enabling it 
for both versions, which would mean we can throw out the de.qm file 
altogether and use only the standard gettext de.mo file. This wouldn't change 
the behaviour anymore but only be some code cleanup. Maybe I'll do that 
later, but for now I'll leave the code untouched in the current working 
state. :-)

Regards,

Christian

Am Dienstag, 19. Juni 2007 22:23 schrieb Christian Stimming:
> As I've already mentioned in
> http://thread.gmane.org/gmane.comp.finance.aqbanking.devel/1300 , the
> German translation of the qt3-wizard.exe on win32 is not working. It turns
> out qt4's QObject::tr("") translation function behaves differently on
> Windows compared to Linux and I will propose a workaround below.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Aqbanking-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to