@@ -32,9 +32,9 @@ def Setup(self):
3232 def OnStartButtonHandler (self ):
3333 try :
3434 self .logging .DebugLog ("Start Button Pressed" )
35- if self .gui .selectedProfileName .get () == "" or self .gui .selectedProfileName .get () == self .translations .currentTexts [ "Gui SelectProfile" ] :
35+ if self .gui .selectedProfileName .get () == "" or self .gui .selectedProfileName .get () == self .translations .GetTranslation ( "Gui SelectProfile" ) :
3636 self .RecordActivity (
37- self .translations .currentTexts [ "Message NeedProfileBeforeStart" ] )
37+ self .translations .GetTranslation ( "Message NeedProfileBeforeStart" ) )
3838 return
3939 self .profiles .SetCurrentProfile (self .gui .selectedProfileName .get ())
4040 self .gui .OnStarted ()
@@ -65,7 +65,7 @@ def _OnStartButtonPostStreamlabsConnection(self):
6565 self .streamlabs .connecting = False
6666 self .UpdateStatus ()
6767 self .RecordActivity (
68- self .translations .currentTexts [ "Message Started" ] )
68+ self .translations .GetTranslation ( "Message Started" ) )
6969 except Exception as ex :
7070 self .logging .RecordException (
7171 ex , "Start Button Post Connection Critical Error" )
@@ -84,10 +84,10 @@ def OnStreamlabsDisconnectHandler(self):
8484 self .gui .OnStopped ()
8585 if not self .streamlabs .disconnecting :
8686 self .RecordActivity (
87- self .translations .currentTexts [ "Message StreamlabsUnexpectedStop" ] )
87+ self .translations .GetTranslation ( "Message StreamlabsUnexpectedStop" ) )
8888 else :
8989 self .RecordActivity (
90- self .translations .currentTexts [ "Message Stopped" ] )
90+ self .translations .GetTranslation ( "Message Stopped" ) )
9191 self .streamlabs .disconnecting = False
9292 self .UpdateStatus ()
9393 except Exception as ex :
@@ -120,11 +120,11 @@ def OnStreamlabsEventHandler(self, data):
120120 "Streamlabs raw event data: " + str (data ))
121121 if not event .IsHandledEvent ():
122122 self .RecordActivity (
123- self .translations .currentTexts [ "StreamlabsEvent UnrecognisedEvent" ] + event .GetEventRawTitlesAsPrettyString ())
123+ self .translations .GetTranslation ( "StreamlabsEvent UnrecognisedEvent" ) + event .GetEventRawTitlesAsPrettyString ())
124124 return
125125 if not event .PopulateNormalisedData ():
126126 self .RecordActivity (
127- self .translations .currentTexts [ "StreamlabsEvent ErrorProcessingEvent" ] + event .GetEventRawTitlesAsPrettyString ())
127+ self .translations .GetTranslation ( "StreamlabsEvent ErrorProcessingEvent" ) + event .GetEventRawTitlesAsPrettyString ())
128128 return
129129 self .logging .DebugLog (
130130 "Streamlabs processed event: " + str (event ))
@@ -133,7 +133,7 @@ def OnStreamlabsEventHandler(self, data):
133133 event )
134134 if actionText == None :
135135 self .RecordActivity (
136- self .translations .currentTexts [ "StreamlabsEvent NoProfileAction" ] + event .GetEventRawTitlesAsPrettyString ())
136+ self .translations .GetTranslation ( "StreamlabsEvent NoProfileAction" ) + event .GetEventRawTitlesAsPrettyString ())
137137 self .logging .DebugLog (
138138 "No profile action for: " + event .GetEventRawTitlesAsPrettyString ())
139139 return
@@ -150,13 +150,13 @@ def OnStreamlabsEventHandler(self, data):
150150 except Exception as ex :
151151 self .logging .RecordException (ex , "Rcon event failed" )
152152 self .RecordActivity (
153- self .translations .currentTexts [ "Rcon CommandError" ] + actionText )
153+ self .translations .GetTranslation ( "Rcon CommandError" ) + actionText )
154154 return
155155 self .RecordActivity (
156- self .translations .currentTexts [ "StreamlabsEvent EventHandled" ] + event .GetEventRawTitlesAsPrettyString () + " : " + event .bestName + " : value " + str (event .value ) + " : " + actionType )
156+ self .translations .GetTranslation ( "StreamlabsEvent EventHandled" ) + event .GetEventRawTitlesAsPrettyString () + " : " + event .bestName + " : value " + str (event .value ) + " : " + actionType )
157157 if response != "" :
158158 self .RecordActivity (
159- self .translations .currentTexts [ "Rcon CommandResponseWarning" ] + response )
159+ self .translations .GetTranslation ( "Rcon CommandResponseWarning" ) + response )
160160 self .logging .DebugLog ("Action done: " + actionText )
161161 except Exception as ex :
162162 self .logging .RecordException (
@@ -165,13 +165,13 @@ def OnStreamlabsEventHandler(self, data):
165165 def UpdateStatus (self ):
166166 if self .streamlabs .connecting :
167167 self .gui .UpdateStatusText (
168- self .translations .currentTexts [ "Status OBSConnecting" ] )
168+ self .translations .GetTranslation ( "Status OBSConnecting" ) )
169169 elif self .streamlabs .sio .eio .state == "connected" :
170170 self .gui .UpdateStatusText (
171- self .translations .currentTexts [ "Status Running" ] )
171+ self .translations .GetTranslation ( "Status Running" ) )
172172 else :
173173 self .gui .UpdateStatusText (
174- self .translations .currentTexts [ "Status Stopped" ] )
174+ self .translations .GetTranslation ( "Status Stopped" ) )
175175
176176 def Run (self ):
177177 self .logging .Log ("App Started" )
0 commit comments