Finding local translations?

Chusslove Illich caslav.ilic at gmx.net
Sat Apr 9 20:21:59 UTC 2016


>> [: Boudewijn Rempt :]
>> However, KCatalog::catalogLocaleDir is run before the main runs, and uses
>> QStandardPaths to find the location of the translations. That's before
>> the XDG_DATA_DIRS environment variable is set.
>
> [: Alexander Potashev :]
> You can use a wrapper application that runs Krita with XDG_DATA_DIRS set
> to whatever appropriate. Of course this is dirty, and we should instead
> support custom paths to .mo files in KI18n.

I don't think there should be specific support in KI18n for setting custom
paths. What makes KI18n special compared to other code that uses
QStandardPaths?

Regarding KCatalog::catalogLocaleDir being called before main runs in Krita,
I don't know why that is happening. KCatalog::catalogLocaleDir should first
execute when the first translation call happens (or first
availableDomainTranslations/availableApplicationTranslations call). I
checked it now with KWrite, and that is what is happening. I could happily
munge XDG_DATA_DIRS before QApplication in KWrite is created, and KCatalog
would heed it.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160409/d68ea1f3/attachment.sig>


More information about the Kde-frameworks-devel mailing list