Closed knm100 closed 1 month ago
The user input prompt is set to whatever the the polkit agent receives (libpolkit-gobject). E.g. see the debug:
$ POLKIT_DEBUG=1 LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:zh lxqt-policykit-agent
New PolkitAgentListener 0x55a1fb70d880
Adding new listener PolkitQt1::Agent::Listener(0x7fff731cf4b0) for 0x55a1fb70d880
Listener adapter polkit_qt_listener_initiate_authentication
GSimpleAsyncResult: 0x55a1fb731300
polkit_qt_listener_initiate_authentication callback for 0x55a1fb70d880
PolkitAgentSession: initiating authentication for identity `unix-user:***', cookie 17-9d2a068993e0df6ac1d189d9444c1435-1-0f31a56f4d3499b278e21b81f8a73f88
PolkitAgentSession: spawned helper with pid 13162
PolkitAgentSession: read `PAM_PROMPT_ECHO_OFF Password: ' from helper
PolkitAgentSession: emitting ::request('Password: ', FALSE)
REQUEST
PolkitAgentSession: canceling authentication
PolkitAgentSession: emitting ::completed(FALSE)
COMPLETED
Listener adapter polkit_qt_listener_initiate_authentication_finish
polkit_qt_listener_initiate_authentication_finish callback for 0x55a1fb70d880
So we don't have any control over the translation here. You need to get sure, that the prompt is sent localized to see it localized in the GUI.
This must be a software issue, because surely the software was not designed to have everything else translated and just leave the password untranslated. If this were true, the TS file would not even list the password's translation Any way, thank you for developing this software for free!
Actually, this is a duplicate of https://github.com/lxqt/lxqt-policykit/issues/127.
If this were true, the TS file would not even list the password's translation
As I said at https://github.com/lxqt/lxqt-policykit/issues/127, our localized text will be used only if nothing replaces it. And as @palinek explained, the localization state of what replaces it is out of our control.
That being said, a simple workaround is possible, such that, if the replacing text is identical to Password:
(in a case-insensitive way), our localized version of Password:
will be kept.
I don't know how many cases will be "corrected" in this way.
I set the locale to zh_TW.UTF-8, which is a locale without TS files, but still some are translated and some aren't.
it is probably not an issue with this program, but with qt itself.
Thank you both for your answers. @tsujan @palinek
Adding a workaround is justified because this happens with any app that calls pkexec
in its code. Reopening...
@knm100 It's "fixed" in git now and will be in LXQt 2.1.0. Thanks for the report!
@tsujan thank your very much!
Expected Behavior
Show the word
password
that have been translatedCurrent Behavior
the word
password
display in english under the locale zh_CN the ts file show the password have been translatedPossible Solution
fixed the ts file
Steps to Reproduce (for bugs)
Context
System Information