aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/DVDBurn
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-13 14:28:44 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-13 14:28:44 +0100
commit7a15f461fce82e3fd6531a22b0bf70fbcd69a878 (patch)
tree2d04afd1a6f610e9e6d44dd81addefbbe44f3d27 /lib/python/Plugins/Extensions/DVDBurn
parentf479fb3234634c7e9464f1af81d64b97a08bb0bb (diff)
downloadenigma2-7a15f461fce82e3fd6531a22b0bf70fbcd69a878.tar.gz
enigma2-7a15f461fce82e3fd6531a22b0bf70fbcd69a878.zip
make texts translateable and add german locale for new DVDBurn changes
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDBurn')
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDProject.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/TitleList.py6
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py82
4 files changed, 45 insertions, 47 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
index 4923d4da..112a221e 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
@@ -32,7 +32,7 @@ class DVDProject:
self.settings = ConfigSubsection()
self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
- self.settings.titlesetmode = ConfigSelection(choices = [("single", ("Simple titleset (compatibility for legacy players)")), ("multi", ("Complex (allows mixing audio tracks and aspects)"))], default="multi")
+ self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
self.settings.dataformat = ConfigSelection(choices = [("iso9660_1", ("ISO9660 Level 1")), ("iso9660_4", ("ISO9660 version 2")), ("udf", ("UDF"))])
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
index 94e5c0f5..b1c627aa 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
@@ -14,7 +14,7 @@ class DVDTitle:
self.DVBname = _("Title")
self.DVBdescr = _("Description")
self.DVBchannel = _("Channel")
- self.properties.aspect = ConfigSelection(choices = [("4:3", "4:3"), ("16:9", "16:9")])
+ self.properties.aspect = ConfigSelection(choices = [("4:3", _("4:3")), ("16:9", _("16:9"))])
self.properties.widescreen = ConfigSelection(choices = [("nopanscan", "nopanscan"), ("noletterbox", "noletterbox")])
self.properties.autochapter = ConfigInteger(default = 0, limits = (0, 60))
self.properties.audiotracks = ConfigSubList()
diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
index 416c14e9..345af877 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
@@ -41,7 +41,7 @@ class TitleList(Screen, HelpableScreen):
self["titleactions"] = HelpableActionMap(self, "DVDTitleList",
{
"addTitle": (self.addTitle, _("Add a new title"), _("Add title")),
- "titleProperties": (self.titleProperties, ("Properties of current title"), _("Title properties")),
+ "titleProperties": (self.titleProperties, _("Properties of current title"), _("Title properties")),
"removeCurrentTitle": (self.removeCurrentTitle, _("Remove currently selected title"), _("Remove title")),
"settings": (self.settings, _("Collection settings"), _("Settings")),
"burnProject": (self.burnProject, _("Burn DVD"), _("Burn DVD")),
@@ -85,9 +85,9 @@ class TitleList(Screen, HelpableScreen):
menu.append((_("DVD media toolbox"), self.toolbox))
menu.append((_("Preview menu"), self.previewMenu))
menu.append((_("Collection settings"), self.settings))
- menu.append(("Reset and renumerate title names", self.resetTitles))
+ menu.append((_("Reset and renumerate title names"), self.resetTitles))
menu.append((_("Edit chapters of current title"), self.editTitle))
- menu.append(("Properties of current title", self.titleProperties))
+ menu.append((_("Properties of current title"), self.titleProperties))
menu.append((_("Add a new title"), self.addTitle))
menu.append((_("Remove title"), self.removeCurrentTitle))
menu.append((_("Exit"), self.leave))
diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py b/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
index 505dd093..d5ba6c16 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
@@ -16,14 +16,12 @@ import DVDTitle
class TitleProperties(Screen,ConfigListScreen):
skin = """
- <screen position="90,83" size="560,445" title="Title properties" >
+ <screen position="90,83" size="560,445" title="Properties of current title" >
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
- <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
<widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
<widget name="config" position="10,50" size="540,300" scrollbarMode="showOnDemand" />
<widget source="serviceinfo_headline" render="Label" position="20,360" size="520,20" font="Regular;20" />
@@ -38,8 +36,7 @@ class TitleProperties(Screen,ConfigListScreen):
self["key_red"] = StaticText(_("Cancel"))
self["key_green"] = StaticText(_("OK"))
- self["key_yellow"] = StaticText(_("Edit Title"))
- self["key_blue"] = StaticText(_("Save"))
+ self["key_blue"] = StaticText(_("Edit Title"))
self["serviceinfo_headline"] = StaticText("DVB info:")
self["serviceinfo"] = StaticText()
@@ -52,50 +49,52 @@ class TitleProperties(Screen,ConfigListScreen):
audiotrack.active.addNotifier(self.initConfigList)
self.initConfigList()
-
+
self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
{
"green": self.exit,
"red": self.cancel,
- #"blue": self.saveProject,
- "yellow": self.editTitle,
+ "blue": self.editTitle,
"cancel": self.cancel,
"ok": self.ok,
}, -2)
def initConfigList(self, element=None):
- self.properties.position = ConfigInteger(default = self.title_idx+1, limits = (1, len(self.project.titles)))
- title = self.project.titles[self.title_idx]
- self.list = []
- self.list.append(getConfigListEntry("DVD " + _("Track"), self.properties.position))
- self.list.append(getConfigListEntry("DVD " + _("Title"), self.properties.menutitle))
- self.list.append(getConfigListEntry("DVD " + _("Description"), self.properties.menusubtitle))
- for audiotrack in self.properties.audiotracks:
- DVB_aud = audiotrack.DVB_lang.getValue() or audiotrack.pid.getValue()
- self.list.append(getConfigListEntry("burn audio track (%s)" % DVB_aud, audiotrack.active))
- if audiotrack.active.getValue():
- self.list.append(getConfigListEntry("audio track (%s) format" % DVB_aud, audiotrack.format))
- self.list.append(getConfigListEntry("audio track (%s) language" % DVB_aud, audiotrack.language))
-
- self.list.append(getConfigListEntry("DVD " + _("Aspect Ratio"), self.properties.aspect))
- if self.properties.aspect.getValue() == "16:9":
- self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.widescreen))
- else:
- self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.crop))
-
- infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
- self["info"] = StaticText(infotext)
-
- if len(title.chaptermarks) == 0:
- self.list.append(getConfigListEntry(_("Auto chapter split every ? minutes (0=never)"), self.properties.autochapter))
- infotext = _("Title") + ': ' + title.DVBname + "\n" + _("Description") + ': ' + title.DVBdescr + "\n" + _("Channel") + ': ' + title.DVBchannel
- chaptermarks = title.getChapterMarks(template="$h:$m:$s")
- chapters_count = len(chaptermarks)
- if chapters_count >= 1:
- infotext += ', ' + str(chapters_count+1) + ' ' + _("chapters") + ' ('
- infotext += ' / '.join(chaptermarks) + ')'
- self["serviceinfo"].setText(infotext)
- self["config"].setList(self.list)
+ try:
+ self.properties.position = ConfigInteger(default = self.title_idx+1, limits = (1, len(self.project.titles)))
+ title = self.project.titles[self.title_idx]
+ self.list = []
+ self.list.append(getConfigListEntry("DVD " + _("Track"), self.properties.position))
+ self.list.append(getConfigListEntry("DVD " + _("Title"), self.properties.menutitle))
+ self.list.append(getConfigListEntry("DVD " + _("Description"), self.properties.menusubtitle))
+ for audiotrack in self.properties.audiotracks:
+ DVB_aud = audiotrack.DVB_lang.getValue() or audiotrack.pid.getValue()
+ self.list.append(getConfigListEntry(_("burn audio track (%s)") % DVB_aud, audiotrack.active))
+ if audiotrack.active.getValue():
+ self.list.append(getConfigListEntry(_("audio track (%s) format") % DVB_aud, audiotrack.format))
+ self.list.append(getConfigListEntry(_("audio track (%s) language") % DVB_aud, audiotrack.language))
+
+ self.list.append(getConfigListEntry("DVD " + _("Aspect Ratio"), self.properties.aspect))
+ if self.properties.aspect.getValue() == "16:9":
+ self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.widescreen))
+ else:
+ self.list.append(getConfigListEntry("DVD " + "widescreen", self.properties.crop))
+
+ infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
+ self["info"] = StaticText(infotext)
+
+ if len(title.chaptermarks) == 0:
+ self.list.append(getConfigListEntry(_("Auto chapter split every ? minutes (0=never)"), self.properties.autochapter))
+ infotext = _("Title") + ': ' + title.DVBname + "\n" + _("Description") + ': ' + title.DVBdescr + "\n" + _("Channel") + ': ' + title.DVBchannel
+ chaptermarks = title.getChapterMarks(template="$h:$m:$s")
+ chapters_count = len(chaptermarks)
+ if chapters_count >= 1:
+ infotext += ', ' + str(chapters_count+1) + ' ' + _("chapters") + ' ('
+ infotext += ' / '.join(chaptermarks) + ')'
+ self["serviceinfo"].setText(infotext)
+ self["config"].setList(self.list)
+ except AttributeError:
+ pass
def editTitle(self):
self.parent.editTitle()
@@ -148,8 +147,7 @@ class LanguageChoices():
def getLanguage(self, DVB_lang):
DVB_lang = DVB_lang.lower()
- isocodes = [ ]
- stripwords = ["stereo", "audio", "description", "2ch"]
+ stripwords = ["stereo", "audio", "description", "2ch", "dolby digital"]
for word in stripwords:
DVB_lang = DVB_lang.replace(word,"").strip()
for key, val in LanguageCodes.iteritems():