From d2288d0961fdae0cde61e42ac3ea2f1f8be0470b Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Tue, 25 Nov 2014 17:56:38 +0100 Subject: [PATCH] Write lc locale setting from GlobalStorage. --- src/modules/localecfg/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/localecfg/main.py b/src/modules/localecfg/main.py index 312930502..7b7421331 100644 --- a/src/modules/localecfg/main.py +++ b/src/modules/localecfg/main.py @@ -27,8 +27,9 @@ def run(): """ Create locale """ us = '#en_US' - # locale = libcalamares.globalstorage.value("localeSetting") - locale = 'en_US.UTF-8' + locale = libcalamares.globalstorage.value("localeSetting") + if not locale: + locale = 'en_US.UTF-8 UTF-8' install_path = libcalamares.globalstorage.value("rootMountPoint") @@ -57,6 +58,6 @@ def run(): locale_conf_path = os.path.join(install_path, "etc/locale.conf") with open(locale_conf_path, "w") as locale_conf: - locale_conf.write('LANG=%s\n' % locale) + locale_conf.write('LANG=%s\n' % locale.split(' ')[0]) return None