mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Merge pull request #3671 from bobhy/pr_3658_v2
Fix regression with LC_MESSAGES, don't add to environment unconditionally [no news article needed].
This commit is contained in:
commit
70150ddc74
1 changed files with 11 additions and 9 deletions
|
@ -677,7 +677,7 @@ Var.__new__.__defaults__ = (
|
|||
# Please keep the following in alphabetic order - scopatz
|
||||
@lazyobject
|
||||
def DEFAULT_VARS():
|
||||
return {
|
||||
dv = {
|
||||
"ANSICON": Var(
|
||||
is_string,
|
||||
ensure_string,
|
||||
|
@ -986,14 +986,6 @@ def DEFAULT_VARS():
|
|||
ensure_string,
|
||||
locale.setlocale(locale.LC_CTYPE),
|
||||
),
|
||||
"LC_MESSAGES": Var(
|
||||
always_false,
|
||||
locale_convert("LC_MESSAGES"),
|
||||
ensure_string,
|
||||
locale.setlocale(locale.LC_MESSAGES)
|
||||
if hasattr(locale, "LC_MESSAGES")
|
||||
else "",
|
||||
),
|
||||
"LC_MONETARY": Var(
|
||||
always_false,
|
||||
locale_convert("LC_MONETARY"),
|
||||
|
@ -1676,6 +1668,16 @@ def DEFAULT_VARS():
|
|||
),
|
||||
}
|
||||
|
||||
if hasattr(locale, "LC_MESSAGES"):
|
||||
dv["LC_MESSAGES"] = Var(
|
||||
always_false,
|
||||
locale_convert("LC_MESSAGES"),
|
||||
ensure_string,
|
||||
locale.setlocale(locale.LC_MESSAGES),
|
||||
)
|
||||
|
||||
return dv
|
||||
|
||||
|
||||
#
|
||||
# actual environment
|
||||
|
|
Loading…
Add table
Reference in a new issue