Investigating missing translations in Krita/other KDE-built binaries

Halla Rempt boud at valdyas.org
Mon Jan 25 13:00:03 GMT 2021


On Monday, 25 January 2021 05:23:57 CET Tyson Tan wrote:
> Hi everyone,
> 
> For many years, the binary packages we provided on krita.org have been 
> missing some basic translations. Notably the "OK", "Cancel" and "Apply" 
> buttons. They remain English regardless of what translation you choose. 
> However, in a recent investigation, I found out that it's not just 
> Krita, digiKam, Kdenlive...literally every KDE application's 
> downloadable binary package that built by KDE's buildsystem has the same 
> issue.
> 
> The buttons CAN be displayed as translated under the following 
> condition:
> 1) GNU/Linux
> 2) KDE Plasma DE, system-wide locale set to target language (important)
> 3) The KDE application must be provided by the distro
> 4) Application language also set to target language (actually, when (2) 
> is set, (4) becomes useless on archlinux).
> 
> What I've found is that, these missing translations are not included in 
> the application's pot file. They are actually scattered across many KF5 
> components. Notably:
> 
> # kwidgetsaddons
> This is the treasure trove of everything with over 500 entries, Stuff 
> like KStandardGuiItem/KMessageDialog/KCharSelectData are located here. 
> This is the only place you can find strings for: 
> &OK/&Cancel/&Apply/&Defaults.

We actually ship those translations: 

./bin/locale/ru/LC_MESSAGES/kconfig5_qt.qm
./bin/locale/ru/LC_MESSAGES/kitemviews5_qt.qm
./bin/locale/ru/LC_MESSAGES/kwindowsystem5_qt.qm
./bin/locale/ru/LC_MESSAGES/kcoreaddons5_qt.qm
./bin/locale/ru/LC_MESSAGES/kcompletion5_qt.qm
./bin/locale/ru/LC_MESSAGES/kwidgetsaddons5_qt.qm
./bin/locale/ru/LC_MESSAGES/seexpr2_qt.qm

and for Qt

./bin/translations/qt_ru.qm

> # kio-extras (kio-extras._desktop_.pot)
> Holds the clusive "Krita Document" filetype entry in Krita's file 
> dialogue. Also holds the names for thumbnail/network types.

But we don't ship this in our binaries.

> # kxmlgui (kaboutapplicationdialog/kswitchlanguagedialog)
> Holds the About/Switch Language dialogue stuff for applications that use 
> common dialogues, notably digiKam.

We've got a fork of kxmlgui in Krita itself.

> > # kcoreaddons (licenses/units...)
> # kconfig (KStandardShortcut: Open/New/Close/Quit/Undo/Redo/Cut/Copy...)
> # kconfigwidgets5 (kstandardaction: &New/&Open/Save &As...)
> Although these components holds many basic strings, applications often 
> have their own translations for those.
> 
> Dispite of this, all KDE-built binaries still include translations from 
> non-KF5 libraries. Notably Marble (marble_qt.pot) used by digiKam can 
> still display translations properly.
> 
> All these make me think that the missing translation issue is caused by 
> KDE buildsystem's configuration/script, either the translations for KF5 
> is not installed, or they are simply unused.
> 
> Those missing translations, although not many, gives an amaturish 
> impression over an otherwise professionally translated application. 
> Windows/macOS users currently have no workaround to this issue, and they 
> make up of the majority of our applications' userbase. I wish we can 
> look into this and find a solution, or someone can relay my message to 
> the related kdeadmins. On top of that, some guidance could be made to 
> help translators finding those out-of-application strings I mentioned 
> across KF5.
> 
> If this issue should be reported as a bug, please tell me where/which to 
> report to. Thank you!

One problem seems to be that .qm translations are loaded in a different way from .mo translations. KDE's translation framework is built on gettext, Qt's is homegrown, and I haven't figured out how to harmonize the two systems on all platforms, in the case where the application language is the same as the platform language, and the case where a different language is chosen.


-- 
https://www.krita.org




More information about the kimageshop mailing list