[Kde-pim] i18n bugs in akonadi

Albert Astals Cid aacid at kde.org
Fri Dec 19 22:00:52 GMT 2008


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.

>
> > 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 :-)

Albert

>
> > Attached patch for selftestdialog makes the translations in the GUI for
> > this dialog visible, but with it the error report is translated too.
>
> Looks good. I got some hints from Albert on how to get the self-test report
> untranslated without duplicating the strings, I'll try to implement that as
> soon as I have time.
>
> Btw, feel free to commit whatever necessary to fix the translation bugs, I
> don't know enough about this stuff anyway ;-)
>
> regards
> Volker


_______________________________________________
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