Improve locale detection

merge-requests/64/head
Hugo Posnic 2016-12-17 14:37:41 +01:00
parent 7ee6c9fe74
commit 6b18a9335f
1 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,10 @@ class ManjaroHello():
if self.sys_locale in locales: if self.sys_locale in locales:
self.preferences["locale"] = self.sys_locale self.preferences["locale"] = self.sys_locale
else: else:
self.preferences["locale"] = self.default_locale if self.sys_locale[:2] in locales:
self.preferences["locale"] = self.sys_locale[:2]
else:
self.preferences["locale"] = self.default_locale
# Select current locale in languages menu # Select current locale in languages menu
self.builder.get_object("languages").set_active_id(self.preferences["locale"]); self.builder.get_object("languages").set_active_id(self.preferences["locale"]);