aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/SoftwareManager
diff options
context:
space:
mode:
authoracid-burn <acid-burn@opendreambox.org>2010-10-05 13:00:54 +0200
committeracid-burn <acid-burn@opendreambox.org>2010-10-05 13:00:54 +0200
commitbe8ccc9f63c4cd79f8dba84087c7348c23657865 (patch)
treee45dcc397e7ef5e39a64fbd19d74268ab3650a40 /lib/python/Plugins/SystemPlugins/SoftwareManager
parentef8469a63bbe601f4e1ac0bb68226e25070a1ce4 (diff)
parent3b990b579c3f4211994b91ea60f3d9f868ac065a (diff)
downloadenigma2-be8ccc9f63c4cd79f8dba84087c7348c23657865.tar.gz
enigma2-be8ccc9f63c4cd79f8dba84087c7348c23657865.zip
Merge commit 'origin/bug_578_translateable_meta_descriptions'
Conflicts: lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/SoftwareManager')
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py2
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml18
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py39
3 files changed, 21 insertions, 38 deletions
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
index a29a5e99..879bec16 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
@@ -69,7 +69,7 @@ class SoftwareTools(DreamInfoHandler):
else:
self.ImageVersion = 'Stable'
self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
- DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion, language = self.language)
+ DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion)
self.directory = resolveFilename(SCOPE_METADIR)
self.hardware_info = HardwareInfo()
self.list = List([])
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml
index cd425c33..4135a212 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml
@@ -3,27 +3,17 @@
<tag type="Software" />
<tag type="System" />
</prerequisites>
- <info language="en">
+ <info>
<author>Dream Multimedia</author>
<name>SoftwareManager</name>
<packagename>enigma2-plugin-systemplugins-softwaremanager</packagename>
- <shortdescription>SoftwareManager manages your Dreambox software.</shortdescription>
+ <shortdescription>SoftwareManager manages your Dreambox software</shortdescription>
<description>The SoftwareManager manages your Dreambox software.\n
- It's easy to update your receiver's software, install or remove extensions or even backup and restore your system settings.
+ It's easy to update your receiver's software, install or remove plugins or even backup and restore your system settings.
</description>
<screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_en.jpg" />
</info>
- <info language="de">
- <author>Dream Multimedia</author>
- <name>SoftwareManager</name>
- <packagename>enigma2-plugin-systemplugins-softwaremanager</packagename>
- <shortdescription>Der SoftwareManager verwaltet Ihre Dreambox Software.</shortdescription>
- <description>Der SoftwareManager verwaltet Ihre Dreambox Software.\n
- Sie können nun einfach Ihre Dreambox-Software aktualisieren, neue Erweiterungen installieren oder entfernen,
- oder ihre Einstellungen sichern und wiederherstellen.
- </description>
- <screenshot src="http://www.dreamboxupdate.com/preview/plugin_softwaremanager_de.jpg" />
- </info>
+
<files type="package"> <!-- without version, without .ipk -->
<file type="package" name="enigma2-plugin-systemplugins-softwaremanager" />
</files>
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
index 99837678..0cc57776 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
@@ -789,13 +789,13 @@ class PluginManager(Screen, DreamInfoHandler):
status = "remove"
else:
status = "installed"
- self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+ self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
else:
if selectState == True:
status = "install"
else:
status = "installable"
- self.list.append(self.buildEntryComponent(name, details, description, packagename, status, selected = selectState))
+ self.list.append(self.buildEntryComponent(name, _(details), _(description), packagename, status, selected = selectState))
if len(self.list):
self.list.sort(key=lambda x: x[0])
self["list"].style = "default"
@@ -1104,8 +1104,7 @@ class PluginDetails(Screen, DreamInfoHandler):
self.skin_path = plugin_path
self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
self.attributes = None
- self.translatedAttributes = None
- DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, language = self.language)
+ DreamInfoHandler.__init__(self, self.statusCallback, blocking = False)
self.directory = resolveFilename(SCOPE_METADIR)
if packagedata:
self.pluginname = packagedata[0]
@@ -1143,8 +1142,6 @@ class PluginDetails(Screen, DreamInfoHandler):
self.package = self.packageDetails[0]
if self.package[0].has_key("attributes"):
self.attributes = self.package[0]["attributes"]
- if self.package[0].has_key("translation"):
- self.translatedAttributes = self.package[0]["translation"]
self.cmdList = []
self.oktext = _("\nAfter pressing OK, please wait!")
@@ -1154,7 +1151,7 @@ class PluginDetails(Screen, DreamInfoHandler):
self.onLayoutFinish.append(self.setInfos)
def setWindowTitle(self):
- self.setTitle(_("Details for extension: " + self.pluginname))
+ self.setTitle(_("Details for plugin: ") + self.pluginname )
def exit(self):
self.close(False)
@@ -1169,34 +1166,26 @@ class PluginDetails(Screen, DreamInfoHandler):
pass
def setInfos(self):
- if self.translatedAttributes.has_key("name"):
- self.pluginname = self.translatedAttributes["name"]
- elif self.attributes.has_key("name"):
+ if self.attributes.has_key("screenshot"):
+ self.loadThumbnail(self.attributes)
+
+ if self.attributes.has_key("name"):
self.pluginname = self.attributes["name"]
else:
self.pluginname = _("unknown")
- if self.translatedAttributes.has_key("author"):
- self.author = self.translatedAttributes["author"]
- elif self.attributes.has_key("author"):
+ if self.attributes.has_key("author"):
self.author = self.attributes["author"]
else:
self.author = _("unknown")
- if self.translatedAttributes.has_key("description"):
- self.description = self.translatedAttributes["description"]
- elif self.attributes.has_key("description"):
- self.description = self.attributes["description"]
+ if self.attributes.has_key("description"):
+ self.description = _(self.attributes["description"].replace("\\n", "\n"))
else:
self.description = _("No description available.")
- if self.translatedAttributes.has_key("screenshot"):
- self.loadThumbnail(self.translatedAttributes)
- else:
- self.loadThumbnail(self.attributes)
-
self["author"].setText(_("Author: ") + self.author)
- self["detailtext"].setText(self.description.strip())
+ self["detailtext"].setText(_(self.description))
if self.pluginstate in ('installable', 'install'):
self["key_green"].setText(_("Install"))
else:
@@ -1206,6 +1195,10 @@ class PluginDetails(Screen, DreamInfoHandler):
thumbnailUrl = None
if entry.has_key("screenshot"):
thumbnailUrl = entry["screenshot"]
+ if self.language == "de":
+ if thumbnailUrl[-7:] == "_en.jpg":
+ thumbnailUrl = thumbnailUrl[:-7] + "_de.jpg"
+
if thumbnailUrl is not None:
self.thumbnail = "/tmp/" + thumbnailUrl.split('/')[-1]
print "[PluginDetails] downloading screenshot " + thumbnailUrl + " to " + self.thumbnail