Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
682 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
from Components.Language import language | ||
from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE | ||
import os, gettext | ||
import os,gettext | ||
|
||
PluginLanguageDomain = "LCD4linux" | ||
PluginLanguagePath = "Extensions/LCD4linux/locale" | ||
|
||
def localeInit(): | ||
lang = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country" | ||
os.environ["LANGUAGE"] = lang # Enigma doesn't set this (or LC_ALL, LC_MESSAGES, LANG). gettext needs it! | ||
# print "[" + PluginLanguageDomain + "] set language to ", lang | ||
gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath)) | ||
|
||
def _(txt): | ||
if gettext.dgettext(PluginLanguageDomain, txt): | ||
return gettext.dgettext(PluginLanguageDomain, txt) | ||
else: | ||
print "[" + PluginLanguageDomain + "] fallback to default translation for " + txt | ||
return gettext.gettext(txt) | ||
t = gettext.dgettext(PluginLanguageDomain, txt) | ||
if t == txt: | ||
# print "[" + PluginLanguageDomain + "] fallback to default translation for ", txt | ||
t = gettext.gettext(txt) | ||
return t | ||
|
||
language.addCallback(localeInit()) | ||
localeInit() | ||
language.addCallback(localeInit) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
7c8c485
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crash vu duo 2
File "/usr/lib/enigma2/python/Plugins/Extensions/LCD4linux/plugin.py", line 7961, in CallCheckRefresh
if L4LElist.getRefresh() == True:
IndexError: tuple index out of range
7c8c485
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug and fix it
7c8c485
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is a problem we just us???