[Kde-pim] i18n bugs in akonadi

Volker Krause vkrause at kde.org
Sat Dec 20 10:25:40 GMT 2008


On Friday 19 December 2008 23:00:52 Albert Astals Cid wrote:
> A Divendres 19 Desembre 2008, Volker Krause va escriure:
> > On Thursday 18 December 2008 14:16:11 Burkhard Lück wrote:
> > > the translations for some akonadi stuff in kdepim/kdepimlibs are not
> > > used at runtime.
> > >
> > > 1. KControl module in kdepim/akonadi/kcm/
> > > All messages in this directory are extracted to the
> > > catalog "kcm_akonadi_resources".
> > > In serverconfigmodule.cpp the plugin is exported with the different
> > > catalogname "kcm_akonadi".
> > >
> > > So we will never see any translation at runtime.
> > >
> > > Possible solution could be renaming the messages target in Messages.sh
> > > to "kcm_akonadi".
> >
> > There are actually three KCMs in that directory, the two tabs of
> > kcm_akonadi are separately available for embedding in applications
> > (kcm_akonadi_resources and kcm_akonadi_server), kcm_akonadi does not have
> > any strings itself. What is the prefered way of handling that? A single
> > catalog for all of them or one for each KCM?
>
> I'd go with a single catalog and loading it from all the kcm that need it.

done

> > > 2. Dialogs in kdepim/akonadi
> > > All messages are extracted to the catalog "libakonadi".
> > >
> > > But nothing in kdepim or kdepimlibs uses the translations in this
> > > catalog eg via .KGlobal::locale()->insertCatalog( "libakonadi" ).
> > >
> > > Anyone knows a better way how to fix this than use insertCatalog () in
> > > every dialog here?
> >
> > There is no code in libakonadi that is guaranteed to be executed by every
> > application using it, so I guess that's the only way. I assume the
> > insertCatalog() call is cheap for an already loaded catalog, if not we
> > can probably work around that by an internal singleton.
>
> It's a search over the list of already catalogs, that usually is around 5,
> so it should be cheap.
>
> > We probably have the same problem with some of the other libraries in
> > kdepimlibs as well. We might want to add a krazy check for those to check
> > if every class using i18n() also has a insertCatalog() call.
>
> well, insertCatalog is cheap but that is an overkill, just make sure your
> application loads libakonadi in your main.cpp if you link to libakonadi,
> it's easy :-)

I thought about this a bit more and added the insertCatalog() call to two 
places in libakonadi that should be executed by the majority of Akonadi 
applications. So, the manually loading should now only be necessary in some 
special cases, like the KCMs.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081220/8a429e86/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list