https://bugs.kde.org/show_bug.cgi?id=395338

--- Comment #38 from Pino Toscano <p...@kde.org> ---
(In reply to Pino Toscano from comment #32)
> Most probably that will require binding i18n()
> to the Python API, or using the Python binding of KI18n (which are not used
> much, though).

This seems to exists already, as there is a binding for i18n() here:
plugins/extensions/pykrita/plugin/krita/__init__.py
OTOH ...

(In reply to Pino Toscano from comment #35)
> Now the task is checking whether the translations actually work, and in case
> mark for translations also the strings of the other Python plugins.

... that binding is not useful, since:
a) it uses QCoreApplication::translate(), instead of i18n() from KI18n
b) the context ("PyKrita") is wrong, as all the strings are matched against the
"krita" domain (see -DTRANSLATION_DOMAIN=\"krita\" in the top-level
CMakeLists.txt)

@krita developers: pykrita needs a proper binding for i18n(), calling the
actual i18n() from KI18n, so translations are properly searched in the same
krita MO catalog as the strings in C++ files. If you have already familiarity
with SIP, a faster patch that what I could do is welcome :-)
(Also, while doing this, adding a binding for i18nc() would be nice too.)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to