There were reports that the tooltips are untranslated
KWin KCM 5.15 (Russian locale):
davidedmundson |
KWin | |
Localization |
There were reports that the tooltips are untranslated
KWin KCM 5.15 (Russian locale):
Open the KWin KCM in some non-en locale and hover the mouse pointer over the pencil or minus button at the right. Not tested by myself.
Lint OK |
No Unit Test Coverage |
Buildable 8015 | |
Build 8033: arc lint + arc unit |
Please leave the existing context, so there is no string change, and this can be fixed in stable branches (in case it applies there).
I was sure that it is not because the "Add" button translation below "just works". But the reporter insists that it does not work otherwise. Translation black magic...
I cannot test by myself because KWin from git/master does not compile on my KF 5.54. Can somebody test it?
I'm also not sure why the change would be necessary, but it seems harmless enough to add the domain.
, but it seems harmless enough to add the domain.
It might be harmless, but if there is a bug it needs to be identified and understood.
After changing the lines to
i18ndc("kcm_kwin_virtualdesktops", "@info:tooltip", "Remove")
i18ndc("kcm_kwin_virtualdesktops", "@info:tooltip", "Rename")
translation works
There are three KDeclarative with their three KLocalizedContexts being created when "executing" this QML file.
Only one of them has a call to setDomainTranslation, the other two are "outside" main.qml so don't get that call, that's fine.
I think the problem lies in kirigami's DelegateRecycler that is using the wrong context and thus the wrong translation domain for those i18nc calls.
In fact commenting out these lines
if (QQmlEngine *eng = qmlEngine(this)) { //share context object in order to never lose track of global i18n() ctx->setContextObject(eng->rootContext()->contextObject()); }
fixes the problem, which makes sense because it stops using the global i18n and uses the "correct" i18n. the question is what bug was those lines supposed to fix.
@mart any idea?