fix not-a-string when using english
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 18 Dec 2005 23:21:59 +0000 (23:21 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 18 Dec 2005 23:21:59 +0000 (23:21 +0000)
add some wizard-stuff

data/startwizard.xml
data/tutorialwizard.xml
lib/python/Components/Language.py
lib/python/Components/config.py
lib/python/Screens/TutorialWizard.py

index 37a5b1e..d31765f 100644 (file)
@@ -43,7 +43,6 @@ self["arrowup2"].moveTo(590, 320, 1)
 self["arrowup2"].startMoving()
 self["arrowdown"].moveTo(740, 355, 1)
 self["arrowdown"].startMoving()
 self["arrowup2"].startMoving()
 self["arrowdown"].moveTo(740, 355, 1)
 self["arrowdown"].startMoving()
-
                        </code>
                </step>
                <step number="4">
                        </code>
                </step>
                <step number="4">
@@ -54,16 +53,26 @@ self.condition = nimmanager.nimCount > 1
                        <text value="Please set up tuner B" />
                        <config screen="NimSetup" module="Satconfig" args="1" type="ConfigList" />
                        <code>
                        <text value="Please set up tuner B" />
                        <config screen="NimSetup" module="Satconfig" args="1" type="ConfigList" />
                        <code>
-self["rc"].moveTo(800, 50, 1)
+self["rc"].moveTo(500, 50, 1)
 self["rc"].startMoving()
 self["rc"].startMoving()
-self["arrowup"].moveTo(800, 310, 1)
+self["arrowup"].moveTo(525, 320, 1)
 self["arrowup"].startMoving()
 self["arrowup"].startMoving()
-self["arrowup2"].moveTo(800, 310, 1)
+self["arrowup2"].moveTo(590, 320, 1)
 self["arrowup2"].startMoving()
 self["arrowup2"].startMoving()
+self["arrowdown"].moveTo(740, 355, 1)
+self["arrowdown"].startMoving()
                        </code>
                </step>
                <step number="5">
                        <text value="Do you want to do a service scan?" />
                        </code>
                </step>
                <step number="5">
                        <text value="Do you want to do a service scan?" />
+                       <code>
+self["rc"].moveTo(800, 50, 1)
+self["rc"].startMoving()
+self["arrowup"].moveTo(800, 310, 1)
+self["arrowup"].startMoving()
+self["arrowup2"].moveTo(800, 310, 1)
+self["arrowup2"].startMoving()
+                       </code>
                        <list>
                                <listentry caption="Yes, scan now" step="next" />
                                <listentry caption="No, scan later manually" step="7" />
                        <list>
                                <listentry caption="Yes, scan now" step="next" />
                                <listentry caption="No, scan later manually" step="7" />
index 06d48bc..a63dbb3 100644 (file)
@@ -1,5 +1,13 @@
 <wizard>
                <step number="1">
 <wizard>
                <step number="1">
+                       <text value="Do you want to view a tutorial?" />
+                       <list>
+                               <listentry caption="Yes, view the tutorial" step="next" />
+                               <listentry caption="No, just start my dreambox" step="end" />
+                       </list>
+               </step>
+
+               <step number="2">
                        <text value="By pressing the OK Button on your remote control, the info bar is being displayed." />
                        <code>
 from Screens.InfoBar import InfoBar
                        <text value="By pressing the OK Button on your remote control, the info bar is being displayed." />
                        <code>
 from Screens.InfoBar import InfoBar
@@ -13,7 +21,8 @@ del self.infobardialog
                        </code>
 
                </step>
                        </code>
 
                </step>
-               <step number="2">
+               
+               <step number="3">
                        <text value="This is step number 2." />
                </step>
 </wizard>
                        <text value="This is step number 2." />
                </step>
 </wizard>
index c60b39b..d6e43a5 100644 (file)
@@ -5,7 +5,7 @@ from Tools.Directories import *
 
 class Language:
        def __init__(self):
 
 class Language:
        def __init__(self):
-               gettext.install('enigma2', '/enigma2/po', unicode=1)
+               gettext.install('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), unicode=0, codeset="utf-8")
                self.activeLanguage = 0
                self.lang = []
                # FIXME make list dynamically
                self.activeLanguage = 0
                self.lang = []
                # FIXME make list dynamically
index 3bbdde1..9400565 100644 (file)
@@ -78,6 +78,8 @@ class configSelection:
 
        def __call__(self, selected):                   #needed by configlist
                self.checkValues()
 
        def __call__(self, selected):                   #needed by configlist
                self.checkValues()
+               print "[config.py] orgstring: ", self.parent.vals[self.parent.value]
+               print "[config.py] translation: ", _(self.parent.vals[self.parent.value])
                return ("text", _(self.parent.vals[self.parent.value]))
 
 class configDateTime:
                return ("text", _(self.parent.vals[self.parent.value]))
 
 class configDateTime:
index 0ba97d3..9531872 100644 (file)
@@ -10,8 +10,9 @@ config.misc.firstruntutorial = configElementBoolean("config.misc.firstruntutoria
 
 class TutorialWizard(Wizard):
        skin = """
 
 class TutorialWizard(Wizard):
        skin = """
-               <screen position="0,0" size="720,300" title="Welcome..." flags="wfNoBorder" >
+               <screen position="0,0" size="720,560" title="Welcome..." flags="wfNoBorder" >
                        <widget name="text" position="50,100" size="440,200" font="Arial;23" />
                        <widget name="text" position="50,100" size="440,200" font="Arial;23" />
+                       <widget name="list" position="50,300" zPosition="1" size="440,200" />
                        <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
                        <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
                        <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
                        <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
                        <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
                        <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
@@ -22,7 +23,7 @@ class TutorialWizard(Wizard):
                self.skin = TutorialWizard.skin
                self.xmlfile = "tutorialwizard.xml"
                
                self.skin = TutorialWizard.skin
                self.xmlfile = "tutorialwizard.xml"
                
-               Wizard.__init__(self, session, showSteps=False, showStepSlider=False, showList=False, showConfig=False)
+               Wizard.__init__(self, session, showSteps=False, showStepSlider=False, showList=True, showConfig=False)
                self["rc"] = MovingPixmap()
                self["arrowdown"] = MovingPixmap()
                self["arrowup"] = MovingPixmap()
                self["rc"] = MovingPixmap()
                self["arrowdown"] = MovingPixmap()
                self["arrowup"] = MovingPixmap()