PolicyKit: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 28 16:54:31 UTC 2023
src/polkitbackend/polkitbackendinteractiveauthority.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit bdd28348becd8b42757175ae533b5f03407d0d7a
Author: liudun <liudun at kylinos.cn>
Date: Thu Feb 16 13:45:33 2023 +0800
if LANGUAGE have been set in /etc/default, set LANG is invalid, gettext cannot be used normally
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
index 1cfc88e..0baab54 100644
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
@@ -2076,7 +2076,8 @@ get_localized_data_for_challenge (PolkitBackendInteractiveAuthority *authority,
{
g_printerr ("Invalid locale '%s'\n", locale);
}
- g_setenv ("LANG", locale, TRUE);
+ /* if LANGUAGE have been set in /etc/default, set LANG is invalid. */
+ g_setenv ("LANGUAGE", locale, TRUE);
gettext_domain = polkit_details_lookup (details, "polkit.gettext_domain");
message_to_use = polkit_details_lookup (details, "polkit.message");
@@ -2107,7 +2108,7 @@ get_localized_data_for_challenge (PolkitBackendInteractiveAuthority *authority,
/* Back to C! */
setlocale (LC_ALL, "C");
- g_setenv ("LANG", "C", TRUE);
+ g_setenv ("LANGUAGE", "C", TRUE);
out:
if (message == NULL)
More information about the hal-commit
mailing list