KLocale plans (Re: KF5 Unit test results)
Chusslove Illich
caslav.ilic at gmx.net
Sun Nov 4 11:03:18 UTC 2012
While splitting out public methods dealing with translation from KLocale, I
got a doubt about localizedFilePath(). For a given file path, it returns the
localized file path, if available, according to the same language list and
fallback rules as for strings in PO files. Due to this, initially I thought
moving it to ki18n. However, this function was also used internally in
KStandardDirs, so that in a usual KDE program, any file resource could be
localized without doing anything in the code. Now I see that QStandardDirs
is replacing KStandardDirs.
It may not seem that this automatic localizability of file resources is that
much needed, since it is rarely needed, and translator could ask programmer
to wrap whatever path returned by QStandardDirs with localizedFilePath().
Unfortunatelly, sometimes the programmer also does not handle the path
directly (e.g. icons). Any idea here?
In a perfect world, the text translation library would come earlier in the
hierarchy, and QStandardDirs would use it internally, just as it was with
KStandardDirs. Adding this functionality to Qt would make sense, but we will
then have a mismatch in the language resolution and fallback rules, which
are quite specific with Gettext. On the other hand, we will have this
mismatch for text anyway...
--
Chusslove Illich (Часлав Илић)
More information about the Kde-frameworks-devel
mailing list