#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Tue, 23 Jul 2019 11:53:57 +0200
changeset 3738fcd5a6af06d4
parent 3737 951fb445472f
child 3739 9c7040099cfe
#UI_ENHANCEMENT by cg
class: ShowMeHowItWorks
added: #possiblyTranslate:
changed: #doStream:
ShowMeHowItWorks.st
     1.1 --- a/ShowMeHowItWorks.st	Tue Jul 23 11:26:32 2019 +0200
     1.2 +++ b/ShowMeHowItWorks.st	Tue Jul 23 11:53:57 2019 +0200
     1.3 @@ -1046,13 +1046,13 @@
     1.4              self nextCommand.
     1.5              Display shiftDown ifTrue:[
     1.6                  (IntroShownCount ? 0) > 3 ifFalse:[
     1.7 -                    self tell:(resources string:'You pressed the SHIFT key.').
     1.8 +                    self tell:(self possiblyTranslate:'You pressed the SHIFT key.').
     1.9                  ].    
    1.10 -                self tell:(resources string:'Do you want to stop the show?').
    1.11 +                self tell:(self possiblyTranslate:'Do you want to stop the show?').
    1.12                  (Dialog confirm:(resources stringWithCRs:'Stop the demonstration?'))
    1.13                  ifTrue:[
    1.14 -                    self tell:(resources string:'OK,').
    1.15 -                    self tell:(resources string:(self randomThankYou)).
    1.16 +                    self tell:(self possiblyTranslate:'OK,').
    1.17 +                    self tell:(self possiblyTranslate:(self randomThankYou)).
    1.18                      ^ AbortOperationRequest raise
    1.19                  ].    
    1.20              ].    
    1.21 @@ -1090,7 +1090,7 @@
    1.22  END"
    1.23  
    1.24      "Created: / 19-07-2019 / 10:52:24 / Claus Gittinger"
    1.25 -    "Modified: / 23-07-2019 / 11:05:39 / Claus Gittinger"
    1.26 +    "Modified: / 23-07-2019 / 11:48:45 / Claus Gittinger"
    1.27  !
    1.28  
    1.29  nextCommand
    1.30 @@ -1126,6 +1126,13 @@
    1.31  
    1.32      "Created: / 19-07-2019 / 10:54:04 / Claus Gittinger"
    1.33      "Modified: / 19-07-2019 / 15:35:15 / Claus Gittinger"
    1.34 +!
    1.35 +
    1.36 +possiblyTranslate:aString
    1.37 +    translate ifTrue:[^ self class classResources string:aString].
    1.38 +    ^ aString
    1.39 +
    1.40 +    "Created: / 23-07-2019 / 11:48:17 / Claus Gittinger"
    1.41  ! !
    1.42  
    1.43  !ShowMeHowItWorks class methodsFor:'documentation'!