Loading Qt 5 translations

Martin Graesslin mgraesslin at kde.org
Mon Jun 9 15:52:00 UTC 2014


On Monday 09 June 2014 00:04:03 Albert Astals Cid wrote:
> El Dimarts, 27 de maig de 2014, a les 07:08:45, Aurélien Gâteau va escriure:
> > On Mon, May 26, 2014, at 9:41, Alexander Potashev wrote:
> > > 2014-05-26 18:17 GMT+04:00 Aurélien Gâteau <agateau at kde.org>:
> > > > Not sure where we could put this. Frameworks load their translations,
> > > > I
> > > > believe it should be up to Qt to load its own translations. The only
> > > > framework where it could maybe make sense to add such feature is in
> > > > KI18n, but even there it feels a bit out of place.
> > > 
> > > Aurélien,
> > > 
> > > You can't put .qm loading code in KI18n because Tier 1 frameworks
> > > should not depend on KI18n.
> > 
> > I know, but I think we can assume devs who only use Qt and tier 1
> > frameworks are aware that they need to load Qt translations themselves.
> > This problem is not limited to frameworks: if you create a Qt-only
> > application and make use of QDialogButtonBox or QMessageBox, then you
> > already have to load Qt translations yourself, regardless of whether you
> > are using KDE frameworks or not.
> 
> So we have a cmake macro that loads code to load your own Qt catalog. Can we
> have one cmake macro that creates the code to load the Qt "default"
> catalogs?
> 
> Would that help? I don't want to make it hard, otherwise most devels will
> forget.

Yes that would help. From my tests on language support in ported applications:
* none loads the Qt "default" catalog
* finding the documentation on how to do it is extremely difficult
* the pattern in the Qt docs doesn't fit with what has been done in ECM

We have to face it: that code will be copied from one application to another. 
If it's generated the quality will be higher (and no bugs will be copied) and 
the cmake stuff is the first to adjust. So if we get that porting guide right, 
it will work from the start - otherwise there are chances that it gets 
forgotten (why cares about translations if the app doesn't compile?).

Also having the loading in KApplication for porting would be good.

Cheers
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140609/94dba0b3/attachment.sig>


More information about the Kde-frameworks-devel mailing list