Set LANGUAGE env variable is set to a non-English locale (#83671)

Fixes: #83608

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde
2024-07-26 15:50:23 -07:00
committed by GitHub
parent a3a92bcc13
commit 8e74cdc7b2
5 changed files with 7 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
---
bugfixes:
- Set LANGUAGE environment variable is set to a non-English locale (https://github.com/ansible/ansible/issues/83608).
+1
View File
@@ -1252,6 +1252,7 @@ def main():
LC_ALL=locale,
LC_MESSAGES=locale,
LC_CTYPE=locale,
LANGUAGE=locale,
)
module.run_command_environ_update = APT_ENV_VARS
+1 -1
View File
@@ -188,7 +188,7 @@ def lang_env(module):
if not hasattr(lang_env, 'result'):
locale = get_best_parsable_locale(module)
lang_env.result = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale)
lang_env.result = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LANGUAGE=locale)
return lang_env.result
+1 -1
View File
@@ -504,7 +504,7 @@ class UbuntuSourcesList(SourcesList):
if self.apt_key_bin:
locale = get_best_parsable_locale(self.module)
APT_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale)
APT_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale, LANGUAGE=locale)
self.module.run_command_environ_update = APT_ENV
rc, out, err = self.module.run_command([self.apt_key_bin, 'export', key_fingerprint], check_rc=True)
found = bool(not err or 'nothing exported' not in err)
+1 -1
View File
@@ -68,7 +68,7 @@ def main():
dpkg = module.get_bin_path('dpkg', True)
locale = get_best_parsable_locale(module)
DPKG_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale)
DPKG_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale, LANGUAGE=locale)
module.run_command_environ_update = DPKG_ENV
name = module.params['name']