Пример #1
0
 def languageSelect(self):
     print 'languageSelect'
     newlanguage = language.getActiveLanguageIndex() + 1
     if newlanguage >= len(language.getLanguageList()):
         newlanguage = 0
     language.activateLanguageIndex(newlanguage)
     self.updateTexts()
Пример #2
0
	def updateList(self):
		languageList = language.getLanguageList()
		if not languageList: # no language available => display only english
			list = [ LanguageEntryComponent("en_GB", "English (UK)", "en_GB_GB") ]
		else:
			list = [ LanguageEntryComponent(file = x[1][2].lower(), name = x[1][0], index = x[0]) for x in languageList]
		self.list = list
		self["languages"].list = list
Пример #3
0
 def updateList(self):
     languageList = language.getLanguageList()
     if not languageList:
         list = [LanguageEntryComponent('en', 'English', 'en_EN')]
     else:
         list = [ LanguageEntryComponent(file=x[1][2].lower(), name=x[1][0], index=x[0]) for x in languageList ]
     self.list = list
     self['languages'].list = list
Пример #4
0
	def __init__(self, session, type = 0, needupdate = True):
		Screen.__init__(self, session)
		Screen.setTitle(self, _("Downloadable plugins"))

		self.type = type
		self.needupdate = needupdate
		self.createPluginFilter()
		self.LanguageList = language.getLanguageList()

		self.container = eConsoleAppContainer()
		self.container.appClosed.append(self.runFinished)
		self.container.dataAvail.append(self.dataAvail)
		self.onLayoutFinish.append(self.startRun)
		self.onShown.append(self.setWindowTitle)

		self.list = []
		self["list"] = PluginList(self.list)
		self.pluginlist = []
		self.expanded = []
		self.installedplugins = []
		self.plugins_changed = False
		self.reload_settings = False
		self.check_settings = False
		self.check_bootlogo = False
		self.install_settings_name = ''
		self.remove_settings_name = ''

		if self.type == self.DOWNLOAD:
			self["text"] = Label(_("Downloading plugin information. Please wait..."))
		elif self.type == self.REMOVE:
			self["text"] = Label(_("Getting plugin information. Please wait..."))

		self.run = 0
		self.remainingdata = ""
		self["actions"] = ActionMap(["WizardActions"],
		{
			"ok": self.go,
			"back": self.requestClose,
		})
		if os.path.isfile('/usr/bin/opkg'):
			self.ipkg = '/usr/bin/opkg'
			self.ipkg_install = self.ipkg + ' install --force-overwrite'
			self.ipkg_remove =  self.ipkg + ' remove --autoremove --force-depends'
		else:
			self.ipkg = 'ipkg'
			self.ipkg_install = 'ipkg install --force-overwrite -force-defaults'
			self.ipkg_remove =  self.ipkg + ' remove'
Пример #5
0
	def updateList(self):
		first_time = not self.list

		languageList = language.getLanguageList()
		if not languageList: # no language available => display only english
			list = [ LanguageEntryComponent("en", _cached("en_EN"), "en_EN") ]
		else:
			list = [ LanguageEntryComponent(file = x[1][2].lower(), name = _cached("%s_%s" % x[1][1:3]), index = x[0]) for x in languageList]
		self.list = list

		#list.sort(key=lambda x: x[1][7])

		print "updateList"
		if first_time:
			self["languages"].list = list
		else:
			self["languages"].updateList(list)
		print "done"
Пример #6
0
 def updateLanguageList(self):
     languageList = language.getLanguageList()
     languageCountryList = [x[0] for x in languageList]
     for lang in [("Arabic",      "ar", "AE"),
             ("Български",   "bg", "BG"),
             ("Català",      "ca", "AD"),
             ("Česky",       "cs", "CZ"),
             ("Dansk",       "da", "DK"),
             ("Deutsch",     "de", "DE"),
             ("Ελληνικά",    "el", "GR"),
             ("English",     "en", "EN"),
             ("Español",     "es", "ES"),
             ("Eesti",       "et", "EE"),
             ("Persian",     "fa", "IR"),
             ("Suomi",       "fi", "FI"),
             ("Français",    "fr", "FR"),
             ("Frysk",       "fy", "NL"),
             ("Hebrew",      "he", "IL"),
             ("Hrvatski",    "hr", "HR"),
             ("Magyar",      "hu", "HU"),
             ("Íslenska",    "is", "IS"),
             ("Italiano",    "it", "IT"),
             ("Kurdish",    "ku", "KU"),
             ("Lietuvių",    "lt", "LT"),
             ("Latviešu",    "lv", "LV"),
             ("Nederlands",  "nl", "NL"),
             ("Norsk Bokmål","nb", "NO"),
             ("Norsk",       "no", "NO"),
             ("Polski",      "pl", "PL"),
             ("Português",   "pt", "PT"),
             ("Português do Brasil",  "pt", "BR"),
             ("Romanian",    "ro", "RO"),
             ("Русский",     "ru", "RU"),
             ("Slovensky",   "sk", "SK"),
             ("Slovenščina", "sl", "SI"),
             ("Srpski",      "sr", "YU"),
             ("Svenska",     "sv", "SE"),
             ("ภาษาไทย",     "th", "TH"),
             ("Türkçe",      "tr", "TR"),
             ("Ukrainian",   "uk", "UA")]:
         if str(lang[1] + "_" + lang[2]) not in languageCountryList:
             print 'adding', lang
             languageList.append((str(lang[1] + "_" + lang[2]), lang))
     MyLanguageSelection.LANGUAGE_LIST = languageList
Пример #7
0
	def updateList(self, listname = "languages"):
		print "update list"
		first_time = not self.multicontentlist

		if first_time:
			lang = config.osd.language.value
		else:
			lang = self[listname].getCurrent()[0]

		languageList = language.getLanguageList()
		if not languageList: # no language available => display only english
			list = [ LanguageEntryComponent("en", _cached("en_EN", lang), "en_EN", self.png_cache) ]
		else:
			list = [ LanguageEntryComponent(file = x[1][2].lower(), name = _cached("%s_%s" % x[1][1:3], lang), index = x[0], png_cache = self.png_cache) for x in languageList]
		self.multicontentlist = list

		if first_time:
			self[listname].list = list
		else:
			self[listname].updateList(list)
		print "done"

		return lang
Пример #8
0
	def updateLanguageDescription(self):
		print language.getLanguageList()[language.getActiveLanguageIndex()]
		self["languagetext"].setText(self.getTranslation(language.getLanguageList()[language.getActiveLanguageIndex()][1][0]))
Пример #9
0
 def LanguageWizardCallback(self, key = '1234'):
     print 'languageSelect', key
     self['languagetext'].setText(self.getTranslation(language.getLanguageList()[language.getActiveLanguageIndex()][1][0]))
     self.resetCounter()
Пример #10
0
	def LanguageWizardCallback(self, key="1234"):
		print "languageSelect", key
		self["languagetext"].setText(self.getTranslation(language.getLanguageList()[language.getActiveLanguageIndex()][1][0]))
		self.resetCounter()
Пример #11
0
	def updateLanguageDescription(self):
		print language.getLanguageList()[language.getActiveLanguageIndex()]
		self["languagetext"].setText(self.getTranslation(language.getLanguageList()[language.getActiveLanguageIndex()][1][0]))