Author: remi
Date: 2009-03-23 15:24:41 +0100 (Mon, 23 Mar 2009)
New Revision: 4182
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/Gadget.py
Log:
* moved the languages list of i18n to a global constant
Modified:
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/Gadget.py
===================================================================
---
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/Gadget.py
2009-03-23 13:39:08 UTC (rev 4181)
+++
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/Gadget.py
2009-03-23 14:24:41 UTC (rev 4182)
@@ -18,6 +18,10 @@
from GadgetParameter import GadgetParameter
from GadgetToken import GadgetToken
+# Default list of the supported language.
+SUPPORTED_LANGUAGES_LIST = ["en", "fr", "nl", "es", "it", "pt", "ar", "da",
+ "de", "no", "sv",]
+
#
------------------------------------------------------------------------------
# Gadget class.
#
------------------------------------------------------------------------------
@@ -255,12 +259,10 @@
"""Update the i18n objects list of the gadget.
"""
self.__i18nList = {}
- languages = ["en", "fr", "nl", "es", "it", "pt", "ar", "da", "de",
"no",
- "sv",]
language = self.__parent.getLanguage()
- if language not in languages:
- languages.append(language)
- for language in languages:
+ if language not in SUPPORTED_LANGUAGES_LIST:
+ SUPPORTED_LANGUAGES_LIST.append(language)
+ for language in SUPPORTED_LANGUAGES_LIST:
i18n = I18n()
i18n.setPoDirectory(os.path.join(self.__workingPath, "resources"))
i18n.setLocale(language)
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn