openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

Fix locale setting with openhabian.conf not working #1723

Closed florian-h05 closed 1 year ago

florian-h05 commented 1 year ago

Fixes #1721.

@mstormi Am I right with the following assumption? Removed dpkg-reconfigure --frontend=noninteractive locales because it's only generating the locales, which is already done with locale-gen.

I tested the locale setup using openhabian.conf and the openhabian-config tool a few times, seems to work this time. Maybe you could also test.

Signed-off-by: Florian Hotze florianh_dev@icloud.com

mstormi commented 1 year ago

@mstormi Am I right with the following assumption?

I don't know.

I tested the locale setup using openhabian.conf and the openhabian-config tool a few times, seems to work this time.

with that 'reconfigure' line removed ? Did you check locale inside OH e.g. Komma als Trenner für Nachkommastellen ?

florian-h05 commented 1 year ago

with that 'reconfigure' line removed ?

Seems like reconfigure with the noniteractive frontend only generates the locales, see the command output compared to locale-gen:

openhabian@smarthomevm ~> sudo dpkg-reconfigure --frontend=noninteractive locales
[sudo] password for openhabian: 
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.
openhabian@smarthomevm ~> sudo locale-gen
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.

Moreover, the reconfigure line with noniteractive frontend does not change anything in /etc/default/locales, the interactive dialogue allows to select the default system locale LANG=.

florian-h05 commented 1 year ago

Did you check locale inside OH e.g. Komma als Trenner für Nachkommastellen ?

I used the openhabian-configtool to switch to en-EN.UTF-8, rebooted and checked /etc/default/locale as well as the Trenner für Nachkommastellen ist Punkt in OH: changing the locale worked. Then I again used the openhabian-config tool to switch back to de_DE.UTF-8, rebooted and checked the locale file as well as Komma als Trenner für Nachkommastellen in OH: changing the locale worked again.