Here on screenshot You can see:
And how can I fix it?regards.
Posted 9 October 2012 - 15:01
... # import locale ... # Get diacritics to handle FILTERin = [] FILTERout = [] FILTERidx = 0 LANGUAGE = language.getLanguage()[:2] #locale.setlocale(locale.LC_ALL, language.getLanguage()) if fileExists(USR_PATH + "/Filter.cfg"): file = open(USR_PATH + "/Filter.cfg","r") for line in file: regel = str(line) if regel[:2] == LANGUAGE: if regel[4] == "Y": FILTERidx += 1 FILTERin.append(regel[7:15].strip()) FILTERout.append(regel[17:].strip()) file.closeand everything seems to be back to normal...
Posted 9 October 2012 - 15:59
Edited by blzr, 9 October 2012 - 16:00.
Posted 9 October 2012 - 16:46
loc = locale.getlocale() locale.setlocale(locale.LC_ALL, loc)and it works.
locale.setlocale(locale.LC_ALL, 'cs_CZ')and same problem, but it is legal using of this (dont know, if under py2.7)...
Edited by ims, 9 October 2012 - 17:20.
Posted 10 October 2012 - 17:10
FILTERidx = 0 -LANGUAGE = language.getLanguage()[:2] -locale.setlocale(locale.LC_ALL, language.getLanguage()) +try: + LANGUAGE = language.getActiveLanguage()[:2] + locale.setlocale(locale.LC_COLLATE, language.getLanguage()) + print pluginPrintname, "Language (determined by getLanguage):", LANGUAGE +except: + lang = locale.getlocale() + if lang[0] is None: + LANGUAGE = "en" + print pluginPrintname, "Language undeterminable; set to default:", LANGUAGE + else: + LANGUAGE = lang[0][:2] + locale.setlocale(locale.LC_COLLATE, lang) + print pluginPrintname, "Language (determined by getlocale):", lang +tested it out of curiosity, and it breaks (or maybe better 'will break from tommorow' ) displaying of national characters in Foreca on OpenPLi image...
Posted 10 October 2012 - 17:43
LANGUAGE = language.getLanguage()[:2] try: locale.setlocale(locale.LC_ALL, language.getLanguage()) except: locale.setlocale(locale.LC_ALL, locale.getlocale())
Posted 10 October 2012 - 17:54
what's the reason this plugin tries to modify locales?
Shouldn't the e2 language selection be responsible for that?
LANGUAGE = language.getLanguage()[:2]
Edited by ims, 10 October 2012 - 17:58.
0 members, 5 guests, 0 anonymous users