[tuxdroid-svn] r4690 - software_suite_v3/smart-core/smart-server/trunk/util/i18n
Status: Beta
Brought to you by:
ks156
|
From: ks156 <c2m...@c2...> - 2009-05-28 08:32:06
|
Author: ks156
Date: 2009-05-28 10:31:55 +0200 (Thu, 28 May 2009)
New Revision: 4690
Modified:
software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
Log:
* Fixed a bug with the locale :
If the locale can't be detected by python, the 'en_US' default value is used.
Modified: software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py 2009-05-27 14:08:31 UTC (rev 4689)
+++ software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py 2009-05-28 08:31:55 UTC (rev 4690)
@@ -24,6 +24,8 @@
"""Constructor of the class.
"""
self.__locale = locale.getdefaultlocale()[0]
+ if self.__locale == None:
+ self.__locale = "en_US"
self.__language = self.__locale.split("_")[0]
self.__country = self.__locale.split("_")[1]
self.__poDirectory = None
|