aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2007-11-09 01:13:19 +0000
committerFelix Domke <tmbinc@elitedvb.net>2007-11-09 01:13:19 +0000
commit0af48c266741db09f550dd513b5220b188dbb17f (patch)
treeae65205e7f344314a75b4392a9de5c4b4a85b0fe /lib/python
parent612e765ceb09fce886ffc02120f039f7d880048f (diff)
downloadenigma2-0af48c266741db09f550dd513b5220b188dbb17f.tar.gz
enigma2-0af48c266741db09f550dd513b5220b188dbb17f.zip
preliminary translator about screen - can be displayed by pressing 'green' in about screen
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/About.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/python/Screens/About.py b/lib/python/Screens/About.py
index 03fbd106..8db58e73 100644
--- a/lib/python/Screens/About.py
+++ b/lib/python/Screens/About.py
@@ -39,6 +39,45 @@ class About(Screen):
else:
self["hddA"] = StaticText(_("none"))
+ self["actions"] = ActionMap(["SetupActions", "ColorActions"],
+ {
+ "cancel": self.close,
+ "ok": self.close,
+ "green": self.showTranslationInfo
+ })
+
+ def showTranslationInfo(self):
+ self.session.open(TranslationInfo)
+
+class TranslationInfo(Screen):
+ def __init__(self, session):
+ Screen.__init__(self, session)
+ # don't remove the string out of the _(), or it can't be "translated" anymore.
+
+ # TRANSLATORS: Add here whatever should be shown in the "translator" about screen, up to 6 lines (use \n for newline)
+ info = _("TRANSLATOR_INFO")
+
+ if info == "TRANSLATOR_INFO":
+ info = "(N/A)"
+
+ infolines = _("").split("\n")
+ infomap = {}
+ for x in infolines:
+ l = x.split(': ')
+ if len(l) != 2:
+ continue
+ (type, value) = l
+ infomap[type] = value
+ print infomap
+
+ self["TranslationInfo"] = StaticText(info)
+
+ translator_name = infomap.get("Language-Team", "none")
+ if translator_name == "none":
+ translator_name = infomap.get("Last-Translator", "")
+
+ self["TranslatorName"] = StaticText(translator_name)
+
self["actions"] = ActionMap(["SetupActions"],
{
"cancel": self.close,