diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-13 14:28:44 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-13 14:28:44 +0100 |
| commit | 7a15f461fce82e3fd6531a22b0bf70fbcd69a878 (patch) | |
| tree | 2d04afd1a6f610e9e6d44dd81addefbbe44f3d27 /lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py | |
| parent | f479fb3234634c7e9464f1af81d64b97a08bb0bb (diff) | |
| download | enigma2-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/TitleProperties.py')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py | 82 |
1 files changed, 40 insertions, 42 deletions
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(): |
