View Issue Details

IDProjectCategoryView StatusLast Update
0003977JEDI VCL00 JVCL Componentspublic2006-11-01 07:03
ReporterbhenkerAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.30 
Summary0003977: JvTranslateString: Adding event to control translation
DescriptionAdd an event for translation of user defined commands or modify the translation for default commands
TagsNo tags attached.

Activities

2006-11-01 03:17

 

JvTranslateString.pas.patch (1,703 bytes)
Index: JvTranslateString.pas
===================================================================
--- JvTranslateString.pas	(revision 10998)
+++ JvTranslateString.pas	(working copy)
@@ -55,6 +55,9 @@
   /// PRODUCTVERSION : Product version of the application out of the File-Version-Information
   /// SCREENSIZE : Size of the screen in format widthxheight
   /// DESKTOPSIZE : Size of the desktop in format widthxheight
+  TProcessCommandEvent = procedure(Sender: TObject; const Command: string;
+      var CommandResult: string; var Changed: Boolean) of object;
+
   TJvTranslateString = class(TJvComponent)
   private
     FAppNameHandled: Boolean;
@@ -70,6 +73,7 @@
     FLeftDelimiter: string;
     FRightDelimiter: string;
     FTimeFormat: string;
+    FOnProcessCommand: TProcessCommandEvent;
     function GetFormName: string;
     function GetFormCaption: string;
     function GetVersionInfoAppName: string;
@@ -90,6 +94,7 @@
     property LeftDelimiter: string read FLeftDelimiter write FLeftDelimiter;
     property RightDelimiter: string read FRightDelimiter write FRightDelimiter;
     property TimeFormat: string read FTimeFormat write FTimeFormat;
+    property OnProcessCommand: TProcessCommandEvent read FOnProcessCommand write FOnProcessCommand;
   end;
 
 {$IFDEF UNITVERSIONING}
@@ -353,6 +358,8 @@
                               CommandResult := Format('%dx%d', [Screen.DesktopWidth, Screen.DesktopHeight])
                             else
                               Result := False;
+  if Assigned(FOnProcessCommand) then
+    FOnProcessCommand(Self, UpperCommand, CommandResult, Result);
 end;
 
 procedure TJvTranslateString.SetDateTimeFormat(const Value: string);

Issue History

Date Modified Username Field Change
2006-11-01 03:17 bhenker New Issue
2006-11-01 03:17 bhenker File Added: JvTranslateString.pas.patch
2006-11-01 07:03 obones Status new => resolved
2006-11-01 07:03 obones Fixed in Version => Daily / SVN
2006-11-01 07:03 obones Resolution open => fixed
2006-11-01 07:03 obones Assigned To => obones