added resourcestrings

git-svn-id: trunk@9721 -
This commit is contained in:
mattias 2006-08-14 09:19:37 +00:00
parent 58fa336b31
commit 18782104b7
8 changed files with 153 additions and 69 deletions

View File

@ -116,9 +116,9 @@ begin
XMLConfig:=TXMLConfig.Create(Filename);
except
on E: Exception do begin
Result:=MessageDlg('Error loading xml',
'Error loading xml file "'+Filename+'":'#13
+E.Message,mtError,[mbCancel],0);
Result:=MessageDlg(lisIECOErrorLoadingXml,
Format(lisIECOErrorLoadingXmlFile, ['"', Filename, '"', #13, E.Message]
), mtError, [mbCancel], 0);
end;
end;
FreeCompilerOpts:=false;
@ -165,9 +165,9 @@ begin
end;
except
on E: Exception do begin
Result:=MessageDlg('Error accessing xml',
'Error accessing xml file "'+Filename+'":'#13
+E.Message,mtError,[mbCancel],0);
Result:=MessageDlg(lisIECOErrorAccessingXml,
Format(lisIECOErrorAccessingXmlFile, ['"', Filename, '"', #13,
E.Message]), mtError, [mbCancel], 0);
end;
end;
finally
@ -222,13 +222,13 @@ procedure TImExportCompOptsDlg.ImExportCompOptsDlgCREATE(Sender: TObject);
begin
ImExportResult:=iecorCancel;
Caption:='Open or Load Compiler Options';
OpenRecentGroupbox.Caption:='Recent files';
SaveToRecentButton.Caption:='Save to recent';
OpenRecentButton.Caption:='Open recent';
SaveButton.Caption:='Save to file';
OpenButton.Caption:='Load from file';
CancelButton.Caption:='Cancel';
Caption:=lisIECOOpenOrLoadCompilerOptions;
OpenRecentGroupbox.Caption:=lisIECORecentFiles;
SaveToRecentButton.Caption:=lisIECOSaveToRecent;
OpenRecentButton.Caption:=lisIECOOpenRecent;
SaveButton.Caption:=lisIECOSaveToFile;
OpenButton.Caption:=lisIECOLoadFromFile;
CancelButton.Caption:=dlgCancel;
LoadRecentList;
end;
@ -364,10 +364,9 @@ begin
if DirPathExists(AFilename) then exit;
Filename:=AFilename;
if FileExists(AFilename) then begin
MsgResult:=MessageDlg('Export file exists',
'Export file "'+AFilename+'" exists.'#13
+'Open file and replace only compiler options?'#13
+'(Other settings will be kept.)',
MsgResult:=MessageDlg(lisIECOExportFileExists,
Format(lisIECOExportFileExistsOpenFileAndReplaceOnlyCompilerOpti, ['"',
AFilename, '"', #13, #13]),
mtConfirmation,[mbYes,mbCancel],0);
if MsgResult<>mrYes then exit;
end;

View File

@ -32,7 +32,7 @@ uses
Classes, SysUtils, Math, Forms, Controls, Dialogs, Buttons, StdCtrls,
FileUtil, LResources,
// IDE
TransferMacros, InputHistory, IDEProcs;
LazarusIDEStrConsts, TransferMacros, InputHistory, IDEProcs;
type
TInputFileFlag = (iftDirectory, iftFilename, iftCmdLine,
@ -566,7 +566,7 @@ begin
with OkButton do begin
Name:='OkButton';
Parent:=Self;
Caption:='OK';
Caption:=lisIFDOK;
OnClick:=@OkButtonClick;
Visible:=true;
end;
@ -575,7 +575,7 @@ begin
with CancelButton do begin
Name:='CancelButton';
Parent:=Self;
Caption:='Cancel';
Caption:=dlgCancel;
OnClick:=@CancelButtonClick;
Visible:=true;
end;

View File

@ -1,3 +1,29 @@
{ $Id$ }
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
Author: Mattias Gaertner
Abstract:
Dialog to choose an IDE keymapping scheme.
}
unit KeymapSchemeDlg;
{$mode objfpc}{$H+}
@ -39,17 +65,17 @@ end;
procedure TChooseKeySchemeDlg.ChooseKeySchemeDlgCREATE(Sender: TObject);
begin
Caption:='Choose Keymapping scheme';
NoteLabel.Caption:='Note: All keys will be set to the values of the choosen scheme.';
SchemeRadiogroup.Caption:='Keymapping Scheme';
OkButton.Caption:='Ok';
CancelButton.Caption:='Cancel';
Caption:=lisKMChooseKeymappingScheme;
NoteLabel.Caption:=lisKMNoteAllKeysWillBeSetToTheValuesOfTheChoosenScheme;
SchemeRadiogroup.Caption:=lisKMKeymappingScheme;
OkButton.Caption:=lisOkBtn;
CancelButton.Caption:=dlgCancel;
end;
function TChooseKeySchemeDlg.GetKeymapScheme: string;
begin
case SchemeRadiogroup.ItemIndex of
1: Result:='Classic';
1: Result:=lisKMClassic;
else Result:='';
end;
end;

View File

@ -575,6 +575,20 @@ resourcestring
// file dialogs
lisOpenFile = 'Open file';
lisIECOExportFileExists = 'Export file exists';
lisIECOExportFileExistsOpenFileAndReplaceOnlyCompilerOpti = 'Export file %s%'
+'s%s exists.%sOpen file and replace only compiler options?%s(Other '
+'settings will be kept.)';
lisIECOOpenOrLoadCompilerOptions = 'Open or Load Compiler Options';
lisIECOErrorAccessingXml = 'Error accessing xml';
lisIECOErrorLoadingXml = 'Error loading xml';
lisIECOErrorLoadingXmlFile = 'Error loading xml file %s%s%s:%s%s';
lisIECOErrorAccessingXmlFile = 'Error accessing xml file %s%s%s:%s%s';
lisIECORecentFiles = 'Recent files';
lisIECOSaveToRecent = 'Save to recent';
lisIECOOpenRecent = 'Open recent';
lisIECOSaveToFile = 'Save to file';
lisIECOLoadFromFile = 'Load from file';
lisLazarusFile = 'Lazarus File';
lisPascalUnit = 'Pascal unit';
lisPascalSourceFile = 'Pascal source file';
@ -724,6 +738,32 @@ resourcestring
lisLazDoc = 'LazDoc';
lisOkBtn = 'Ok';
dlgCancel = 'Cancel';
lisKMClassic = 'Classic';
lisPEFilename = 'Filename:';
lisPEUnitname = 'Unitname:';
lisPVUTheUnitnameIsUsedWhenTheIDEExtendsUsesClauses = 'The unitname is used '
+'when the IDE extends uses clauses.';
lisPETheUnitnameIsUsedWhenTheIDEExtendsUsesClauses = 'The unitname is used '
+'when the IDE extends uses clauses.';
lisPEInvalidUnitFilename = 'Invalid unit filename';
lisPVUAPascalUnitMustHaveTheExtensionPpOrPas = 'A pascal unit must have the '
+'extension .pp or .pas';
lisPEAPascalUnitMustHaveTheExtensionPpOrPas = 'A pascal unit must have the '
+'extension .pp or .pas';
lisPEInvalidUnitname = 'Invalid unitname';
lisPVUTheUnitnameIsNotAValidPascalIdentifier = 'The unitname is not a valid '
+'pascal identifier.';
lisPVUUnitnameAndFilenameDoNotMatchExampleUnit1PasAndUni = 'Unitname and '
+'Filename do not match.%sExample: unit1.pas and Unit1';
lisPETheUnitnameIsNotAValidPascalIdentifier = 'The unitname is not a valid '
+'pascal identifier.';
lisPEConflictFound = 'Conflict found';
lisPVUThereIsAlreadyAnUnitWithThisNameFile = 'There is already an unit with '
+'this name.%sFile: %s';
lisPEThereIsAlreadyAnUnitWithThisNameFile = 'There is already an unit with '
+'this name.%sFile: %s';
lisPEUnitnameAndFilenameDoNotMatchExampleUnit1PasAndUni = 'Unitname and '
+'Filename do not match.%sExample: unit1.pas and Unit1';
lisOk = '&Ok';
lisCMParameter = 'Parameter';
lisCTPleaseSelectAMacro = 'please select a macro';
@ -3070,6 +3110,12 @@ resourcestring
rsFormDataFileDfm = 'Form data file (*.dfm)|*.dfm';
liswlWatchList = 'Watch list';
liswlExpression = 'Expression';
lisKMChooseKeymappingScheme = 'Choose Keymapping scheme';
lisKMNoteAllKeysWillBeSetToTheValuesOfTheChoosenScheme = 'Note: All keys '
+'will be set to the values of the choosen scheme.';
lisKMKeymappingScheme = 'Keymapping Scheme';
lisIFDOK = 'OK';
lisPVUEditVirtualUnit = 'Edit virtual unit';
implementation
end.

View File

@ -18,7 +18,7 @@ interface
uses
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, LResources,
ComCtrls, StdCtrls, Buttons, ExtCtrls;
ComCtrls, StdCtrls, Buttons, ExtCtrls, ObjInspStrConsts;
type
// TODO create more generic collection editor.
@ -70,7 +70,7 @@ implementation
constructor TColumnDlg.Create(TheOwner: TComponent);
Begin
inherited Create(TheOwner);
Caption := 'Column Editor';
Caption := rscdColumnEditor;
Width := 400;
Height := 340;
OnShow := @FormOnShow;
@ -91,7 +91,7 @@ Begin
with CaptionLabel do
Begin
Parent := self;
Caption := 'Caption';
Caption := rscdCaption;
Left := ColumnsListBox.Left+ColumnsListBox.Width+10;
Top := 15;
end;
@ -111,7 +111,7 @@ Begin
with WidthLabel do
Begin
Parent := self;
Caption := 'Width';
Caption := rscdWidth;
Left := CaptionLabel.Left;
Top := CaptionEdit.Top+CaptionEdit.Height+5;
end;
@ -131,15 +131,15 @@ Begin
with AlignmentRadioGroup do
Begin
Parent := Self;
Caption := 'Alignment';
Caption := rscdAlignment;
Left := CaptionLabel.Left;
Top := WidthEdit.Top+WidthEdit.Height+5;
Columns := 3;
Height := 50;
Width := 200;
Items.Add('Left');
Items.Add('Center');
Items.Add('Right');
Items.Add(rscdLeft);
Items.Add(sccsILEdtCenter);
Items.Add(rscdRight);
ItemIndex := 0;
OnClick := @AlignmentRadioGroupOnClick;
end;
@ -148,7 +148,7 @@ Begin
with cbVisible do
begin
Parent := Self;
Caption := 'Visible';
Caption := rscdVisible;
Left := CaptionLabel.Left;
Top := AlignmentRadioGroup.Top+AlignmentRadioGroup.Height+5;
Height := 25;
@ -160,7 +160,7 @@ Begin
with cbAutoSize do
begin
Parent := Self;
Caption := 'Auto Size';
Caption := rscdAutoSize;
Left := CaptionLabel.Left;
Top := cbVisible.Top + cbVisible.Height + 5;
Height := 25;
@ -172,7 +172,7 @@ Begin
with AddButton do
Begin
Parent := self;
Caption := 'Add';
Caption := oiColEditAdd;
Left := CaptionLabel.Left;
Top := cbAutoSize.Top+cbAutoSize.Height+5;
OnClick := @AddButtonOnClick;
@ -182,7 +182,7 @@ Begin
with DeleteButton do
Begin
Parent := self;
Caption := 'Delete';
Caption := oisDelete;
Left := AddButton.Left+AddButton.Width+5;
Top := AddButton.Top;
OnClick := @DeleteButtonOnClick;
@ -192,7 +192,7 @@ Begin
with MoveUpButton do
Begin
Parent := self;
Caption := 'Move up';
Caption := rscdMoveUp;
Left := 5;
Top := ColumnsListBox.Top+ColumnsListBox.Height+5;
OnClick := @MoveUpButtonOnClick;
@ -202,7 +202,7 @@ Begin
with MoveDownButton do
Begin
Parent := self;
Caption := 'Move down';
Caption := rscdMoveDown;
Left := MoveUpButton.Left+MoveUpButton.Width+5;
Top := MoveUpButton.Top;
OnClick := @MoveDownButtonOnClick;
@ -212,7 +212,7 @@ Begin
with btnOK do
Begin
Parent := self;
Caption := 'OK';
Caption := rscdOK;
Left := CaptionLabel.Left;
Top := MoveUpButton.Top;
kind := bkOK;
@ -222,7 +222,7 @@ Begin
with btnCancel do
Begin
Parent := self;
Caption := 'Cancel';
Caption := oiStdActDataSetCancel1Hint;
Left := btnOK.Left + btnOK.Width + 5;
Top := btnOK.Top;
Kind := bkCancel;
@ -244,7 +244,7 @@ var
Begin
//add
Column := FColumns.Add;
Column.Caption := 'Caption';
Column.Caption := rscdCaption;
FSelectedIndex := Column.Index;
ColumnsListBox.Items.Add(Column.Caption);
ColumnsListBox.Selected[FSelectedIndex] := True;
@ -289,7 +289,7 @@ begin
try
ListColumn.Width := StrToInt(WidthEdit.Caption);
except
showmessage('Invalid numeric Value');
showmessage(rscdInvalidNumericValue);
// revert to previous value
WidthEdit.Caption := IntToStr(ListColumn.Width);
end;

View File

@ -56,6 +56,9 @@ resourcestring
oisCopy = 'Copy';
oisPaste = 'Paste';
oisDelete = 'Delete';
rscdMoveUp = 'Move up';
rscdMoveDown = 'Move down';
rscdOK = 'OK';
oisShowHints = 'Show Hints';
oisShowComponentTree = 'Show Component Tree';
oisOptions = 'Options';
@ -119,6 +122,9 @@ resourcestring
sccsILEdtStretch = 'Stretch';
sccsILEdtCrop = 'Crop';
sccsILEdtCenter = 'Center';
rscdRight = 'Right';
rscdVisible = 'Visible';
rscdAutoSize = 'Auto Size';
sccsILEdtOpenDialog = 'Add Images';
sccsILEdtSaveDialog = 'Save Image';
@ -292,6 +298,12 @@ resourcestring
oisErrorLoadingImage2 = 'Error loading image %s%s%s:%s%s';
oisOk2 = 'Ok';
oisCreateANewPascalUnit = 'Create a new pascal unit.';
rscdColumnEditor = 'Column Editor';
rscdCaption = 'Caption';
rscdInvalidNumericValue = 'Invalid numeric Value';
rscdWidth = 'Width';
rscdAlignment = 'Alignment';
rscdLeft = 'Left';
implementation

View File

@ -22,16 +22,18 @@ type
{ TFindDialogForm }
TFindDialogForm = class(TForm)
ButtonPanel1: TButtonPanel;
CancelButton: TPanelBitBtn;
CaseSensitiveCheckBox: TCheckBox;
DirectionRadioGroup: TRadioGroup;
EditFind: TEdit;
FindButton: TPanelBitBtn;
FindLabel: TLabel;
FindButton: TButton;
CancelButton: TButton;
HelpButton: TButton;
WholeWordsOnlyCheckBox: TCheckBox;
CaseSensitiveCheckBox: TCheckBox;
EditFind: TEdit;
FindLabel: TLabel;
DirectionRadioGroup: TRadioGroup;
procedure EditFindChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
public
end;
procedure TFindDialogForm.EditFindChange(Sender: TObject);
@ -162,7 +164,7 @@ end;
function TFindDialog.CreateForm: TForm;
begin
Result:=TFindDialogForm.Create(nil);
Result:=TFindDialogForm.Create(Self);
with TFindDialogForm(Result) do begin
FindButton.Caption:=rsFind;
CancelButton.Caption:=rsMbCancel;

View File

@ -39,7 +39,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
StdCtrls, FileUtil, PackageDefs;
StdCtrls, FileUtil, LazarusIDEStrConsts, PackageDefs;
type
TEditVirtualUnitDialog = class(TForm)
@ -79,12 +79,12 @@ end;
procedure TEditVirtualUnitDialog.EditVirtualUnitDialogCreate(Sender: TObject);
begin
Caption:='Edit virtual unit';
OkButton.Caption:='Ok';
CancelButton.Caption:='Cancel';
FilenameLabel.Caption:='Filename:';
UnitnameLabel.Caption:='Unitname:';
UnitnameEdit.Hint:='The unitname is used when the IDE extends uses clauses.';
Caption:=lisPVUEditVirtualUnit;
OkButton.Caption:=lisOkBtn;
CancelButton.Caption:=dlgCancel;
FilenameLabel.Caption:=lisPEFilename;
UnitnameLabel.Caption:=lisPEUnitname;
UnitnameEdit.Hint:=lisPVUTheUnitnameIsUsedWhenTheIDEExtendsUsesClauses;
UnitnameEdit.ShowHint:=true;
end;
@ -99,22 +99,21 @@ begin
NewFilename:=FilenameEdit.Text;
NewUnitName:=UnitnameEdit.Text;
if not FilenameIsPascalUnit(NewFilename) then begin
MessageDlg('Invalid unit filename',
'A pascal unit must have the extension .pp or .pas',
MessageDlg(lisPEInvalidUnitFilename,
lisPVUAPascalUnitMustHaveTheExtensionPpOrPas,
mtError,[mbCancel],0);
exit;
end;
NewFilenameOnly:=ExtractFilenameOnly(NewFilename);
if CompareText(NewUnitName,NewFilenameOnly)<>0 then begin
MessageDlg('Invalid unitname',
'Unitname and Filename do not match.'#13
+'Example: unit1.pas and Unit1',
MessageDlg(lisPEInvalidUnitname,
Format(lisPVUUnitnameAndFilenameDoNotMatchExampleUnit1PasAndUni, [#13]),
mtError,[mbCancel],0);
exit;
end;
if (NewUnitName='') or (not IsValidIdent(NewUnitName)) then begin
MessageDlg('Invalid unitname',
'The unitname is not a valid pascal identifier.',
MessageDlg(lisPEInvalidUnitname,
lisPVUTheUnitnameIsNotAValidPascalIdentifier,
mtError,[mbCancel],0);
exit;
end;
@ -122,9 +121,9 @@ begin
if LazPackage<>nil then begin
ConflictUnit:=LazPackage.FindUnit(NewUnitName,true,PkgFile);
if ConflictUnit<>nil then begin
MessageDlg('Conflict found',
'There is already an unit with this name.'#13
+'File: '+ConflictUnit.Filename,
MessageDlg(lisPEConflictFound,
Format(lisPVUThereIsAlreadyAnUnitWithThisNameFile, [#13,
ConflictUnit.Filename]),
mtError,[mbCancel],0);
exit;
end;