ResourcePack.st
changeset 4967 978b4be7c3b7
parent 4963 157b9720c9d3
child 5069 2b40d206ba7f
equal deleted inserted replaced
4966:3a8ffabd2fa3 4967:978b4be7c3b7
   702 localAt:aKey
   702 localAt:aKey
   703     "translate a string.
   703     "translate a string.
   704      Some special 'intelligence' has been added:
   704      Some special 'intelligence' has been added:
   705         if no value for aKey is found,
   705         if no value for aKey is found,
   706           lookup aKey with first character caseChanged and change the results first characters case.
   706           lookup aKey with first character caseChanged and change the results first characters case.
       
   707           or aKey starts with a '\', then lookup aKey without '\' and prepend '\' to the result.
       
   708           or aKey ends with a '\', then lookup aKey without '\' and append '\' to the result.
   707           or aKey ends with a ':', then lookup aKey without ':' and append ':' to the result.
   709           or aKey ends with a ':', then lookup aKey without ':' and append ':' to the result.
   708           or aKey ends with a '=', then lookup aKey without '=' and append '=' to the result.
   710           or aKey ends with a '=', then lookup aKey without '=' and append '=' to the result.
   709           or aKey ends with a '.', then lookup aKey without '.' and append '.' to the result.
   711           or aKey ends with a '.', then lookup aKey without '.' and append '.' to the result.
   710           or aKey ends with a ',', then lookup aKey without ',' and append ',' to the result.
   712           or aKey ends with a ',', then lookup aKey without ',' and append ',' to the result.
   711           or aKey ends with a '?', then lookup aKey without '?' and append '?' to the result.
   713           or aKey ends with a '?', then lookup aKey without '?' and append '?' to the result.
   779         ((aKey startsWith:'(') and:[(aKey endsWith:')')]) ifTrue:[
   781         ((aKey startsWith:'(') and:[(aKey endsWith:')')]) ifTrue:[
   780             usedKey := aKey copyFrom:2 to:(aKey size - 1).
   782             usedKey := aKey copyFrom:2 to:(aKey size - 1).
   781 
   783 
   782             val := self localAt:usedKey.        "/ recursion
   784             val := self localAt:usedKey.        "/ recursion
   783             val notNil ifTrue:[^ '(' , val , ')'].
   785             val notNil ifTrue:[^ '(' , val , ')'].
       
   786         ].
       
   787         (aKey startsWith:'\') ifTrue:[
       
   788             usedKey := aKey copyFrom:2.
       
   789 
       
   790             val := self localAt:usedKey.        "/ recursion
       
   791             val notNil ifTrue:[^ '\' , val].
       
   792         ].
       
   793         (aKey endsWith:'\') ifTrue:[
       
   794             usedKey := aKey copyWithoutLast:1.
       
   795 
       
   796             val := self localAt:usedKey.        "/ recursion
       
   797             val notNil ifTrue:[^ val,'\'].
   784         ].
   798         ].
   785         (aKey endsWith:' ') ifTrue:[
   799         (aKey endsWith:' ') ifTrue:[
   786             usedKey := aKey withoutSeparators.
   800             usedKey := aKey withoutSeparators.
   787 
   801 
   788             val := self localAt:usedKey.        "/ recursion
   802             val := self localAt:usedKey.        "/ recursion
  1300 ! !
  1314 ! !
  1301 
  1315 
  1302 !ResourcePack class methodsFor:'documentation'!
  1316 !ResourcePack class methodsFor:'documentation'!
  1303 
  1317 
  1304 version
  1318 version
  1305     ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.130 2008-05-28 09:36:34 stefan Exp $'
  1319     ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.131 2008-05-29 13:26:34 cg Exp $'
  1306 ! !
  1320 ! !
  1307 
  1321 
  1308 ResourcePack initialize!
  1322 ResourcePack initialize!