Dne 14.2.2014 15:49, Burkhard Lück napsal(a):
Am Freitag, 14. Februar 2014, 13:09:19 schrieb Vishesh Handa:
On Thursday, February 13, 2014 11:28:40 AM Burkhard Lück wrote:
That loads the translation catalog, which also contains messages from the
plasmoid outside the library.

Apparently that happens early enough at runtime (at least I see the
catalog
is loaded running milou in plasmoidviewer in locale x-test), so even
messages used only in the plasmoid are translated.

Your plasmoid tries to load a catalog named "plasma_applet_milou_applet"
via plasmoid/applet.h:60:K_EXPORT_PLASMA_APPLET(milou_applet, Applet),
but you extract to milou, so this catalog does not exist.

But then the "milou" catalog would be loaded so the translations should be
there, right?

If not, what would be the correct way of fixing this? One option which I can
think of is extracting the translations to "plasma_applet_milou_applet",
and updating the KCatalogLoader in the case the library is used without the
applet.

This does not make sense to me.

Use two messages catalogs, one for the plasmoid named
"plasma_applet_milou_applet" and loaded via K_EXPORT_PLASMA_APPLET and the
second one for the library named e.g. "libmilou" and loaded via
KCatalogLoader.

BTW, this approach will not work if you switch away from a C++ applet to a pure QML one in the future, just saying...

Btw the fixes from Lukáš Tinkl for the preview plugins are useless, because the
plugins are part of the library, which loads its catalog already via
KCatalogLoader.


How are the plugins part of the library? They are separate plugins and I thought they might actually be used as such (e.g. in Dolphin) but I might be wrong of course...

--
Lukáš Tinkl <lti...@redhat.com>
Software Engineer - KDE desktop team, Brno
KDE developer <lu...@kde.org>
Red Hat Inc.                               http://cz.redhat.com

Reply via email to