pykrita: expose the real i18n() function
ClosedPublic

Authored by pino on Jun 23 2018, 8:53 AM.

Details

Summary

Using QCoreApplication.translate() as i18n() function in pykrita does
not work, since the translations are not in Qt .qm files, but in
Gettext .po files.

Hence, create an helper krita_i18n() function in libkis, bind it with
SIP, and set it as builtin i18n() function for pykrita (and thus for
all the Python plugins). This fixes most of the lack of translations
in Python plugins.

Test Plan

Builds fine, and Python plugins are translated properly
(mostly, since there are few more issues, but unrelated to this).

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pino created this revision.Jun 23 2018, 8:53 AM
Restricted Application added a project: Krita. · View Herald TranscriptJun 23 2018, 8:53 AM
pino requested review of this revision.Jun 23 2018, 8:53 AM
rempt accepted this revision.Jun 24 2018, 11:02 AM
rempt added a subscriber: rempt.

Awesome, thank you!

This revision is now accepted and ready to land.Jun 24 2018, 11:02 AM
This revision was automatically updated to reflect the committed changes.