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

View File

@ -26,12 +26,15 @@ constructor TColorDialog.Create (AOwner : TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);
fCompStyle := csColorDialog; fCompStyle := csColorDialog;
FTitle:= 'Select color:'; FTitle:= rsSelectcolorTitle;
end; end;
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.2 2002/05/10 06:05:51 lazarus
MG: changed license to LGPL MG: changed license to LGPL

View File

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