lcl localization from Olivier

git-svn-id: trunk@2468 -
This commit is contained in:
mattias 2002-08-17 23:41:24 +00:00
parent ebeab3334a
commit a7841a6f56
3 changed files with 30 additions and 20 deletions

View File

@ -37,7 +37,7 @@ interface
{$ASSERTIONS ON}
{$endif}
uses StdCtrls, VCLGlobals, Classes, LCLType, LCLProc, LCLLinux, LCLStrConsts,
uses StdCtrls, VCLGlobals, Classes, LCLType, LCLProc, LCLLinux,LCLStrConsts,
GraphType, Graphics, SysUtils, Controls, lMessages, Forms, Messages;
type
@ -155,6 +155,9 @@ type
Procedure SetKind(Value : TBitBtnKind);
Procedure SetLayout(Value : TButtonLayout);
Procedure SetSpacing(Value : Integer);
//Return the caption associed with the akind value.
function GetCaptionOfKind(aKind :TBitBtnKind) : String;
protected
Procedure Click; override;
procedure GlyphChanged(Sender : TObject);
@ -259,14 +262,14 @@ implementation
const
BitBtnModalResults : array[TBitBtnKind] of TModalResult = (
0, mrOK, mrCancel, 0, mrYes, mrNo,
0, mrAbort, mrRetry, mrIgnore, mrAll);
BitbtnCaption : array[TBitBtnKind] of String = (
'', rsmbOK, rsmbCancel, rsmbHelp, rsmbYes, rsmbNo,
rsmbClose, rsmbAbort, rsmbRetry, rsmbIgnore, rsmbAll);
BitBtnModalResults : array[TBitBtnKind] of TModalResult = (
0, mrOK, mrCancel, 0, mrYes, mrNo,
0, mrAbort, mrRetry, mrIgnore, mrAll);
BitBtnImages : array[TBitBtnKind] of Longint = (
idButtonOk, idButtonOk, idButtonCancel, idButtonHelp, idButtonYes,
idButtonNo, idButtonClose, idButtonAbort, idButtonRetry, idButtonIgnore,
@ -287,6 +290,9 @@ end.
{ =============================================================================
$Log$
Revision 1.36 2003/02/28 10:21:16 mattias
lcl localization from Olivier
Revision 1.35 2003/02/06 06:33:57 mattias
fixed message

View File

@ -26,12 +26,15 @@ constructor TColorDialog.Create (AOwner : TComponent);
begin
inherited Create(AOwner);
fCompStyle := csColorDialog;
FTitle:= 'Select color:';
FTitle:= rsSelectcolorTitle;
end;
{ =============================================================================
$Log$
Revision 1.3 2003/02/28 10:21:16 mattias
lcl localization from Olivier
Revision 1.2 2002/05/10 06:05:51 lazarus
MG: changed license to LGPL

View File

@ -138,32 +138,30 @@ begin
and (not FileExists(Filename)) then begin
Filename:=Filename+DefaultExt;
end;
if (ofOverwritePrompt in Options) and FileExists(Filename) then begin
Result:=MessageDlg('Overwrite file?',
'The file "'+Filename+'" already exists.'#13
+'Overwrite?',mtConfirmation,[mbOk,mbCancel],0)=mrOk;
if (ofOverwritePrompt in Options) and FileExists(Filename) then
begin
Result:=MessageDlg(rsfdOverwriteFile,Format(rsfdFileAlreadyExists,[FileName]),
mtConfirmation,[mbOk,mbCancel],0)=mrOk;
if not Result then exit;
end;
if (ofPathMustExist in Options)
and (not FileExists(ExtractFilePath(Filename))) then begin
Result:=false;
MessageDlg('Path must exist',
'The path "'+ExtractFilePath(Filename)+'" does not exist.'
,mtError,[mbCancel],0);
MessageDlg(rsfdPathMustExist,Format(rsfdPathNoExist,[ExtractFilePath(Filename)]),
mtError,[mbCancel],0);
exit;
end;
if (ofFileMustExist in Options)
and (not FileExists(Filename)) then begin
and (not FileExists(Filename)) then
begin
Result:=false;
MessageDlg('File must exist',
'The file "'+Filename+'" does not exist.',mtError,[mbCancel],0);
MessageDlg(rsfdFileMustExist,Format(rsfdFileNotExist,[FileName]),mtError,[mbCancel],0);
exit;
end;
if (ofNoReadOnlyReturn in Options)
and (not FileIsWritable(Filename)) then begin
Result:=false;
MessageDlg('File is not writable',
'The file "'+Filename+'" is not writable.',mtError,[mbCancel],0);
MessageDlg(rsfdFileReadOnlyTitle,Format(rsfdFileReadOnly,[FileName]),mtError,[mbCancel],0);
exit;
end;
end;
@ -179,7 +177,7 @@ end;
constructor TOpenDialog.Create (AOwner : TComponent);
begin
inherited Create(AOwner);
FTitle:= 'Open existing file:';
FTitle:= rsfdOpenFile;
FOptions := [ofEnableSizing, ofViewDetail];
end;
@ -197,12 +195,15 @@ constructor TSaveDialog.Create (AOwner : TComponent);
begin
inherited Create(AOwner);
fCompStyle := csFileDialog;
FTitle:= 'Save file as:';
FTitle:= rsfdFileSaveAs;
end;
{ =============================================================================
$Log$
Revision 1.7 2003/02/28 10:21:16 mattias
lcl localization from Olivier
Revision 1.6 2002/05/30 14:11:11 lazarus
MG: added filters and history to TOpenDialog