From 7d2174c9a4e79be0aab37e7a0d1279e55ce9fb78 Mon Sep 17 00:00:00 2001 From: Hugo Posnic Date: Tue, 20 Dec 2016 00:03:13 +0100 Subject: [PATCH] Add some comments --- src/manjaro_hello.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/manjaro_hello.py b/src/manjaro_hello.py index 9b45a68..58331d9 100644 --- a/src/manjaro_hello.py +++ b/src/manjaro_hello.py @@ -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