#UI_ENHANCEMENT by cg draft
authorClaus Gittinger <cg@exept.de>
Tue, 23 Jul 2019 11:53:57 +0200
changeset 3738 fcd5a6af06d4
parent 3737 951fb445472f
child 3739 9c7040099cfe
#UI_ENHANCEMENT by cg class: ShowMeHowItWorks added: #possiblyTranslate: changed: #doStream:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Tue Jul 23 11:26:32 2019 +0200
+++ b/ShowMeHowItWorks.st	Tue Jul 23 11:53:57 2019 +0200
@@ -1046,13 +1046,13 @@
             self nextCommand.
             Display shiftDown ifTrue:[
                 (IntroShownCount ? 0) > 3 ifFalse:[
-                    self tell:(resources string:'You pressed the SHIFT key.').
+                    self tell:(self possiblyTranslate:'You pressed the SHIFT key.').
                 ].    
-                self tell:(resources string:'Do you want to stop the show?').
+                self tell:(self possiblyTranslate:'Do you want to stop the show?').
                 (Dialog confirm:(resources stringWithCRs:'Stop the demonstration?'))
                 ifTrue:[
-                    self tell:(resources string:'OK,').
-                    self tell:(resources string:(self randomThankYou)).
+                    self tell:(self possiblyTranslate:'OK,').
+                    self tell:(self possiblyTranslate:(self randomThankYou)).
                     ^ AbortOperationRequest raise
                 ].    
             ].    
@@ -1090,7 +1090,7 @@
 END"
 
     "Created: / 19-07-2019 / 10:52:24 / Claus Gittinger"
-    "Modified: / 23-07-2019 / 11:05:39 / Claus Gittinger"
+    "Modified: / 23-07-2019 / 11:48:45 / Claus Gittinger"
 !
 
 nextCommand
@@ -1126,6 +1126,13 @@
 
     "Created: / 19-07-2019 / 10:54:04 / Claus Gittinger"
     "Modified: / 19-07-2019 / 15:35:15 / Claus Gittinger"
+!
+
+possiblyTranslate:aString
+    translate ifTrue:[^ self class classResources string:aString].
+    ^ aString
+
+    "Created: / 23-07-2019 / 11:48:17 / Claus Gittinger"
 ! !
 
 !ShowMeHowItWorks class methodsFor:'documentation'!