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 |