Add some comments

merge-requests/64/head
Hugo Posnic 2016-12-20 00:03:13 +01:00
parent 20b9aca841
commit 7d2174c9a4
1 changed files with 3 additions and 0 deletions

View File

@ -63,12 +63,15 @@ class ManjaroHello():
self.default_texts = {}
# Choose best locale for user
if self.preferences["locale"] not in self.locales:
# If user's locale is supported
if self.sys_locale in self.locales:
self.preferences["locale"] = self.sys_locale
else:
# If two first letters of user's locale is supported (ex: en_US -> en)
if self.sys_locale[:2] in self.locales:
self.preferences["locale"] = self.sys_locale[:2]
else:
# Else use default locale
self.preferences["locale"] = self.default_locale
# Select current locale in languages menu