ResourcePack.st
branchjv
changeset 8224 6d994e1ee4fc
parent 7963 76834c6940c7
child 8420 76e39223f5ab
--- a/ResourcePack.st	Fri Nov 17 11:52:18 2017 -0300
+++ b/ResourcePack.st	Tue Nov 21 15:29:42 2017 +0000
@@ -1442,6 +1442,15 @@
                         ok := false.
                     ].
 
+    "/ Following is a hack, We no longer have Language and LangueageTerritory globals,
+    "/ but in user preferences. However, resource files still access Language global
+    "/ directly.
+    "/ 
+    "/ To workaround this without a need to rewrite them all, we define them here as 
+    "/ theead-local variables so they still can be used when (and only when) reading
+    "/ resource file. Very hacky, ndeed.
+    Processor activeProcess withThreadVariable:#Language boundTo:Smalltalk language do: [
+    Processor activeProcess withThreadVariable:#LanguageTerritory boundTo:Smalltalk languageTerritory do: [
     [inStream atEnd] whileFalse:[
         lineString := inStream nextLine. lineNumber := lineNumber + 1.
         [lineString notNil and:[lineString endsWith:$\]] whileTrue:[
@@ -1559,11 +1568,13 @@
             ]
         ]
     ].
+    ]].
+
     ^ ok
 
     "Modified: / 31-08-1995 / 02:33:45 / claus"
     "Modified: / 18-09-2006 / 20:35:37 / cg"
-    "Modified: / 27-02-2017 / 15:23:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 21-11-2017 / 15:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ResourcePack methodsFor:'printing & storing'!