--- a/ResourcePack.st Thu Jun 09 20:05:47 2016 +0200
+++ b/ResourcePack.st Thu Jun 09 20:10:28 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -85,7 +87,7 @@
all those strings. (find the keys by looking at users of resource or senders
of 'string:*').
Notice, that the grammar of different languages may imply a reordering,
- so the above string becomes the german 'wollen Sie %1 wirklich löschen';
+ so the above string becomes the german 'wollen Sie %1 wirklich löschen';
so using percent-placeholders is much better than simple concatenations of
arguments to the question.
@@ -393,9 +395,12 @@
|newPack|
newPack := self new.
+ KeepStatisticsOnUsedKeys == true ifTrue:[
+ newPack rememberUsedKeys.
+ ].
newPack readFromFile:aFileName directory:dirName.
cached ifTrue:[
- self addToCache:newPack.
+ self addToCache:newPack.
].
^ newPack
! !
@@ -1243,6 +1248,12 @@
!ResourcePack methodsFor:'accessing-internals'!
+forgetUsedKeys
+ "stop keeping a statistic on which kes are actually used"
+
+ usedKeys := nil.
+!
+
name:aKey
"translate a string"
@@ -1285,6 +1296,12 @@
"Created: / 29.1.1998 / 22:43:09 / cg"
!
+rememberUsedKeys
+ "start keeping a statistic on which kes are actually used"
+
+ usedKeys := Set new.
+!
+
superPack
^ superPack