help text: try resource translation without final period
authorClaus Gittinger <cg@exept.de>
Fri, 21 Nov 2003 08:24:13 +0100
changeset 1851 cd617917c687
parent 1850 67d2c8b18c60
child 1852 403d1a48cfe3
help text: try resource translation without final period
ApplicationModel.st
--- a/ApplicationModel.st	Wed Nov 19 20:19:27 2003 +0100
+++ b/ApplicationModel.st	Fri Nov 21 08:24:13 2003 +0100
@@ -1032,17 +1032,29 @@
      key is the symbol associated with some widget or menu item.
      (from my helpSpec); return a language variant (if available)"
 
-    |helpText|
+    |helpText xLated|
 
     helpText := (self helpSpec) at:aKey ifAbsent:nil.
     helpText isNil ifTrue:[
         masterApplication notNil ifTrue:[
             helpText := masterApplication helpTextForKey:aKey
         ].
+        helpText isNil ifTrue:[
+            ^ helpText
+        ].
     ].
 
     "/ translate.
     resources notNil ifTrue:[
+        xLated := resources string:helpText default:nil.
+        xLated isNil ifTrue:[
+            (helpText endsWith:'.') ifTrue:[
+                xLated := resources string:(helpText copyWithoutLast:1) default:nil.
+                xLated notNil ifTrue:[
+                    ^ xLated , '.'
+                ]
+            ].
+        ].
         ^ resources string:helpText
     ].
     ^ helpText
@@ -2710,7 +2722,7 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.192 2003-10-08 14:10:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.193 2003-11-21 07:24:13 cg Exp $'
 ! !
 
 ApplicationModel initialize!