KLocale plans

Chusslove Illich caslav.ilic at gmx.net
Sat Nov 24 23:59:59 UTC 2012


> [: David Faure :]
> Porting from KLibrary to QLibrary really brings up only one question, how
> to locate ktranscript.so. But since the idea is that QT_PLUGIN_PATH must
> be set to the KF5 install prefix + /lib/plugins, it might just work out of
> the box (after you add the env var to your setup, of course).

Indeed, it would work if I just replace KLibrary with QLibrary, but for
locating the plugin. If I give absolute path to plugin to QLibrary
constructor, it works. With just the plugin name, no matter how I set
QT_PLUGIN_PATH it does not find it. I tried with PREFIX/lib/plugins, and
PREFIX/lib/plugins/kf5 (since ktranscript.so is installed in there). In the
loading error message, I noticed lib* was prepended to the plugin name, so I
also tried with libktranscript.so symlink, but still nothing.

> [...] I didn't know how to trigger loadTranscript() anyway. Well, maybe
> the unittest does that (and otherwise, that's a bug in the unittest ;).

It doesn't test that yet, no.

I have this general issue of how to provide proper test data for
KLocalizedString unit test. You have sidestepped this by looking for the
already installed French kdelibs4.mo. Since there is nothing scripted in
French kdelibs4.mo, following the same logic, for the scripted translation
test we'd have to look for kdelibs4.mo of a language which does have
something scripted inside.

But, can we instead provide a special test catalog, making unit tests self-
contained? This would involve putting a PO file somewhere in the tests
directory, compiling it to MO when the test is built (I could write CMake
stuff for this), and doing something in the test initialization code to
ensure that QStandardPaths::locate will find the compiled MO (not sure how
to do this). At any rate, I think it's better to wait until ki18n is moved
to proper tier location.

-- 
Chusslove Illich (Часлав Илић)
-------------- 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/20121125/20914c8a/attachment.sig>


More information about the Kde-frameworks-devel mailing list