You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.
I'm struggling with getting locale setting to my likings for a node.
The particular problem I have is to get Thunderbird on my Ubuntu 16.04 Desktop host showing dates in Swedish format, while having English(United States) as the preferred format.
I get the wanted behaviour when I have English(United States) as the preferred format in Ubuntu's System Settings...>Language Support>Language and have chosen Swedish in Settings...>Language Support>Regional Formats and unset LC_ALL (e.g. by removing it from /etc/default/locale).
It seems to me that the only way to "unset" LC_ALL, when using the locale cookbook, is to set the attribute locale['lc_all'] to " ". (Resulting in LC_ALL= rather than unsetting it.) .
Setting it to "" (or, I guess nil - have not tested) sets LC_ALL to locale['lang'] which defaults to "en_US.utf8".
At https://wiki.debian.org/Locale it is stated that "Using LC_ALL is strongly discouraged as it overrides everything. Please use it only when testing and never set it in a startup file.".
So, I wonder why the cookbook sets LC_ALL to locale['lang'], which defaults to "en_US.utf8". Wouldn't it be better to unset LC_ALL as default?
Also, I think that it would be good to be able to unset LC_ALL by e.g. setting the attribute locale['lc_all'] to nil.
Steps to Reproduce:
This is how I am currently installing the Swedish language and setting LC_ALL to empty in my recipe. I am using locale-gen 0.0.3:
Cookbook version
2.0.0
Chef-client version
12.17.44
Platform Details
ubuntu 16.04
Scenario:
I'm struggling with getting locale setting to my likings for a node.
The particular problem I have is to get Thunderbird on my Ubuntu 16.04 Desktop host showing dates in Swedish format, while having English(United States) as the preferred format.
I get the wanted behaviour when I have English(United States) as the preferred format in Ubuntu's System Settings...>Language Support>Language and have chosen Swedish in Settings...>Language Support>Regional Formats and unset LC_ALL (e.g. by removing it from /etc/default/locale).
It seems to me that the only way to "unset" LC_ALL, when using the locale cookbook, is to set the attribute locale['lc_all'] to " ". (Resulting in LC_ALL= rather than unsetting it.) .
Setting it to "" (or, I guess nil - have not tested) sets LC_ALL to locale['lang'] which defaults to "en_US.utf8".
At https://wiki.debian.org/Locale it is stated that "Using LC_ALL is strongly discouraged as it overrides everything. Please use it only when testing and never set it in a startup file.".
So, I wonder why the cookbook sets LC_ALL to locale['lang'], which defaults to "en_US.utf8". Wouldn't it be better to unset LC_ALL as default?
Also, I think that it would be good to be able to unset LC_ALL by e.g. setting the attribute locale['lc_all'] to nil.
Steps to Reproduce:
This is how I am currently installing the Swedish language and setting LC_ALL to empty in my recipe. I am using locale-gen 0.0.3:
It gives the following environment setting:
$ env | grep LC_ LC_PAPER=sv_SE.UTF-8 LC_ADDRESS=sv_SE.UTF-8 LC_MONETARY=sv_SE.UTF-8 LC_NUMERIC=sv_SE.UTF-8 LC_ALL= LC_TELEPHONE=sv_SE.UTF-8 LC_IDENTIFICATION=sv_SE.UTF-8 LC_MEASUREMENT=sv_SE.UTF-8 LC_TIME=sv_SE.UTF-8 LC_NAME=sv_SE.UTF-8
This gives the behaviour I want. Unsetting LC_ALL rather than setting it empty also gives the wanted behaviour.
The text was updated successfully, but these errors were encountered: