"Configure Language" option
Friedrich W. H. Kossebau
kossebau at kde.org
Tue Oct 25 18:49:30 BST 2022
Am Dienstag, 25. Oktober 2022, 17:16:15 CEST schrieb Friedrich W. H. Kossebau:
> Am Montag, 24. Oktober 2022, 23:38:15 CEST schrieb Stefan Gerlach:
> > i noticed that several KDE apps lack the ability to switch the UI language
> > when using the "Configure Language" dialog. The .mo files are correctly
> > installed, all the languages are in the selection box and the
> > configuration
> > is saved in the klanguageoverridesrc file which is read on startup. But
> > somehow (most of) the UI strings are shown in the system language only.
On a second read I see you actually talk about the custom app language
feature. Was getting off the path here by all the other issues I saw in the
normal Step run and the rabbit holes I had to enter there :)
Now gave that another try, with Step, given I was already warm with the
codebase, and tested by using French as custom language over my system German.
And saw that indeed some UI terms were still in German language, despite there
being a French qm file.
Looking into the code, there might be chance for a race condition:
the custom code generated by the cmake macro ecm_create_qm_loader (from
ECMPoQmTools) uses Q_COREAPP_STARTUP_FUNCTION to hook the QTranslator
generation code for that catalog into the startup during the QApp instance
creation.
Though the code from kxmlgui which does checking of the klanguageoverridesrc
config and then trying to adjust things by setting the LANGUAGE env var
respectively also uses Q_COREAPP_STARTUP_FUNCTION.
So there might be some chance of race condition. And things only worked by
chance at least for the tier1 KF libraries which use that because the
registered functions are done in an order after the kxmlgui one, due to the
order of libraries that are loaded and their static data is initialized? But
then fail for anything else whose hook is executed before the kxmlgui one, as
the ecm_create_qm_loader code seems to not have any update logic?
As I dislike the Qt translation system personally, myself have sadly to opt
out here. Hopefully there are others with energy on that matter here.
Cheers
Friedrich
More information about the kde-devel
mailing list