In file session-child.c in function session_child_run() variable `locale_var_names` contains explicit list of locale environment variables to inherit. This list lacks of some LC_* variables: LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and LC_IDENTIFICATION. As a result, these variables are not inherited by child session. Therefore, processes inside desktop session set these variables to the value of LANG, instead of appropriate values configured in /etc/locale.conf.
In file session-child.c in function session_child_run() variable `locale_var_names` contains explicit list of locale environment variables to inherit. This list lacks of some LC_* variables: LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and LC_IDENTIFICATION. As a result, these variables are not inherited by child session. Therefore, processes inside desktop session set these variables to the value of LANG, instead of appropriate values configured in /etc/locale.conf.
$ more /etc/locale.conf pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 en_US.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 ON=pl_PL. UTF-8
LANG=en_US.UTF-8
LC_CTYPE=
LC_NUMERIC=
LC_TIME=pl_PL.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=pl_PL.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
Inside desktop session:
$ locale pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 pl_PL.UTF- 8 en_US.UTF- 8 "en_US. utf8" "en_US. utf8" "en_US. utf8" "en_US. utf8" "en_US. utf8" ON="en_ US.utf8"
LANG=en_US.utf8
LC_CTYPE=
LC_NUMERIC=
LC_TIME=pl_PL.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
Notice wrong values of LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and LC_IDENTIFICATION (en_US.utf8 instead pl_PL.UTF-8).
Fix:
Add LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT and LC_IDENTIFICATION to the `locale_var_names` array in file session-child.c.