ApplicationModel.st
changeset 4361 35ae4734af0b
parent 4334 48983c9f9f3a
child 4362 8d24b880de6c
--- a/ApplicationModel.st	Tue Oct 01 19:33:52 2019 +0200
+++ b/ApplicationModel.st	Tue Oct 01 20:05:11 2019 +0200
@@ -2941,6 +2941,10 @@
 !
 
 showMeHowItWorks:minorKey inAny:setOfMajorKeys
+    "start a ShowMeHowItWorks presentation.
+     This is controlled by a spec, which is read from the resources/shows folder,
+     and is named <appClassName>_<lang>.show"
+
     |fn rsrcDir spec|
 
     rsrcDir := self class packageDirectory asFilename / 'resources' / 'shows'.
@@ -2956,10 +2960,10 @@
         ].
 
         {
-            ('_',Smalltalk language,'.show') .
-            ('_en','.show') .
-            '.show' .
-        } do:[:rest |
+            { ('_',Smalltalk language,'.show') . Smalltalk language }  .
+            { ('_en','.show') . 'en' }                                 .
+            { '.show' . 'en' }                                        
+        } pairsDo:[:rest :lang |
             |triedFn|
 
             triedFn := fn,rest.
@@ -2967,7 +2971,10 @@
                 (rsrcDir / triedFn) readingFileWithEncoding:#utf8 do:[:s |
                     spec := Array readFrom:s.
                 ].
-                ShowMeHowItWorks do:spec.
+                ShowMeHowItWorks new
+                    application:self;
+                    language:lang;
+                    do:spec.
                 ^ self
             ]
         ].