RxFPC:TRxLoginDialog - support for i18n. patch from Michal Gawrycki with small corrections

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6751 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-12-12 06:37:09 +00:00
parent e224f3a826
commit a0367219ee
23 changed files with 220 additions and 223 deletions

View File

@ -88,7 +88,7 @@ type
implementation
uses SysUtils, Forms, rxfduallst, LCLStrConsts, rxconst;
uses SysUtils, Forms, rxfduallst, Buttons, LCLType, rxconst;
{ TDualListDialog }
@ -101,9 +101,9 @@ begin
FList2 := TStringList.Create;
FLabel1Caption := SDualListSrcCaption;
FLabel2Caption := SDualListDestCaption;
OkBtnCaption := rsmbOK;
CancelBtnCaption := rsmbCancel;
HelpBtnCaption := rsmbHelp;
OkBtnCaption := GetButtonCaption(idButtonOk);
CancelBtnCaption := GetButtonCaption(idButtonCancel);
HelpBtnCaption := GetButtonCaption(idButtonHelp);
Title:=SDualListCaption;
end;
@ -136,17 +136,17 @@ end;
function TDualListDialog.IsOkBtnCustom: Boolean;
begin
Result := CompareStr(OkBtnCaption, rsmbOK) <> 0;
Result := CompareStr(OkBtnCaption, GetButtonCaption(idButtonOk)) <> 0;
end;
function TDualListDialog.IsCancelBtnCustom: Boolean;
begin
Result := CompareStr(CancelBtnCaption, rsmbCancel) <> 0;
Result := CompareStr(CancelBtnCaption, GetButtonCaption(idButtonCancel)) <> 0;
end;
function TDualListDialog.IsHelpBtnCustom: Boolean;
begin
Result := CompareStr(HelpBtnCaption, rsmbHelp) <> 0;
Result := CompareStr(HelpBtnCaption, GetButtonCaption(idButtonHelp)) <> 0;
end;
function TDualListDialog.Execute: Boolean;

View File

@ -333,7 +333,7 @@ object RxLoginForm: TRxLoginForm
BorderSpacing.Around = 6
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Отмена'
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
TabOrder = 4
@ -352,7 +352,7 @@ object RxLoginForm: TRxLoginForm
AutoSize = True
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = '&Справка'
Caption = '&Help'
Kind = bkHelp
TabOrder = 5
end

View File

@ -676,11 +676,18 @@ end;
procedure TRxLoginForm.FormCreate(Sender: TObject);
begin
Icon.Assign(Application.Icon);
// if Icon.Empty then Icon.Handle := LoadIcon(0, IDI_APPLICATION);
AppIcon.Picture.Assign(Icon);
AppTitleLabel.Caption := Format(SAppTitleLabel, [Application.Title]);
PasswordLabel.Caption := SPasswordLabel;
UserNameLabel.Caption := SUserNameLabel;
btnOK.Caption := GetButtonCaption(idButtonOk);
btnCancel.Caption := GetButtonCaption(idButtonCancel);
btnHelp.Caption := GetButtonCaption(idButtonHelp);
btnMore.Caption := sRxLoginDlgBtnMore;
DataBaseLabel.Caption := sRxLoginDlgDatabase;
end;
procedure TRxLoginForm.btnMoreClick(Sender: TObject);

View File

@ -264,7 +264,7 @@ const
implementation
uses Messages, RXCtrls, rxconst, rxtooledit, rxlclutils, math, LCLStrConsts, LResources;
uses Messages, RXCtrls, rxconst, rxtooledit, rxlclutils, math, LResources;
{$R pickdate.res}
@ -1348,7 +1348,7 @@ begin
begin
Parent := Control;
SetBounds(0, 0, 112, 21);
Caption := rsmbOK;
Caption := GetButtonCaption(idButtonOk);
ModalResult := mrOk;
end;
@ -1356,7 +1356,7 @@ begin
begin
Parent := Control;
SetBounds(111, 0, 111, 21);
Caption := rsmbCancel;
Caption := GetButtonCaption(idButtonCancel);
ModalResult := mrCancel;
Cancel := True;
end;