diff --git a/applications/lazedit/editorpagecontrol.pp b/applications/lazedit/editorpagecontrol.pp
index 8be63c3ca..25f2c6eb7 100644
--- a/applications/lazedit/editorpagecontrol.pp
+++ b/applications/lazedit/editorpagecontrol.pp
@@ -45,7 +45,7 @@ uses
SynHighlighterPython, SynHighlighterBat, SynHighlighterIni, SynHighlighterJava,
SynHighlighterUnixShellScript, SynHighLighterPo,
SynEditMouseCmds, SynEditKeyCmds,
- EPlus_Commons;
+ EPlus_Commons, lazedit_translations;
@@ -153,6 +153,7 @@ type
property HighLighters[Index: TEditorFileType]: TSynCustomHighlighter read GetHighLighter;
//property FileTypeMaskList: TFileTypeMaskList read FFileTypeMaskList write SetFiletypeMaskList;
public
+ IsCreating: Boolean;
function AddPage: TEditor;
function ClosePage(Index: Integer): Boolean;
function EditorAtPage(const Index: Integer): TEditor;
@@ -175,7 +176,6 @@ type
const
EmptyStr = '';
- NoName = 'Naamloos';
implementation
@@ -233,7 +233,7 @@ begin
if (Utf8Fn <> EmptyStr) then
FPage.Caption := ExtractFileName(Utf8Fn)
else
- FPage.Caption := NoName;
+ FPage.Caption := vTranslations.NoName;
//Debugln('TEditor.SetFileName: setting FPageCaption to ',FPage.Caption);
end;
//debugln('TEditor.SetFileName: calling DoOnStatusChange(scAll)');
@@ -602,7 +602,7 @@ begin
if AsTemplate then
begin//blank out internal filename and update caption
FFileName := EmptyStr;
- if Assigned(FPage) then FPage.Caption := NoName;
+ if Assigned(FPage) then FPage.Caption := vTranslations.NoName;
DoOnStatusChange([scFileName]);
end;
//DebugLn('TEditor.LoadFromFile: FileType = ',eftNames[FileType]);
@@ -923,7 +923,7 @@ begin
NrOfNoNames := 0;
Suffix := '';
for i := 0 to PageCount - 1 do
- if Pos(NoName, Pages[i].Caption) = 1 then Inc(NrOfNoNames);
+ if Pos(vTranslations.NoName, Pages[i].Caption) = 1 then Inc(NrOfNoNames);
if NrOfNoNames > 0 then Suffix := ' [' + IntToStr(NrOfNoNames + 1) + ']';
TS := TTabSheet.Create(Self);
@@ -931,7 +931,7 @@ begin
TS.PageControl := Self;
PgIdx := TS.PageIndex;
- TS.Caption := NoName + Suffix;
+ TS.Caption := vTranslations.NoName + Suffix;
// exit;//<-------------------------------------------------------------
@@ -990,6 +990,10 @@ begin
InternalEditorStatusChange(E, [scCaretX,scCaretY,scModified,scInsertMode,scFileName]);
ActivePage := Pages[PgIdx];
+
+ // Don't try to set focus when creating the first page in TForm.OnCreate or else an exception comes
+ if Self.IsCreating then Exit;
+
try
E.SetFocus;
except
diff --git a/applications/lazedit/lazedit.lpi b/applications/lazedit/lazedit.lpi
index 7ed377106..a429beb1b 100644
--- a/applications/lazedit/lazedit.lpi
+++ b/applications/lazedit/lazedit.lpi
@@ -4,11 +4,11 @@
+
-
@@ -16,7 +16,7 @@
-
+
@@ -75,15 +75,11 @@
-
+
-
-
-
-
@@ -91,917 +87,83 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1035,15 +197,6 @@
-
-
-
-
-
-
-
-
-
diff --git a/applications/lazedit/lazedit.lpr b/applications/lazedit/lazedit.lpr
index 6e8f307eb..4a1333af6 100644
--- a/applications/lazedit/lazedit.lpr
+++ b/applications/lazedit/lazedit.lpr
@@ -7,8 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
- Forms, main,
-lazedit_translations {,newtableform, test_ed, eplus_commons, CopyLeft, eplus_config, HtmlCharMap,
+ Forms, main, lazedit_translations, EditorPageControl, HtmlCode {,newtableform, test_ed, eplus_commons, CopyLeft, eplus_config, HtmlCharMap,
HtmlDialogs, NewHtmlDlgForm, AnchorDlgForm, PictureDlgForm}
{ you can add units after this };
diff --git a/applications/lazedit/lazedit_translations.pas b/applications/lazedit/lazedit_translations.pas
index 4d8707844..3ddde3810 100644
--- a/applications/lazedit/lazedit_translations.pas
+++ b/applications/lazedit/lazedit_translations.pas
@@ -94,20 +94,20 @@ type
mnuLayoutH3: TMenuItem;
mnuLayoutH4: TMenuItem;
mnuLayoutH5: TMenuItem;
- mnuLayoutH6: TMenuItem;
- mnuLayoutAlign: TMenuItem;
- mnuLayoutAlignLeft: TMenuItem;
- mnuLayoutAlignRight: TMenuItem;
- mnuLayoutAlignCenter: TMenuItem;
- mnuLayoutCode: TMenuItem;
- mnuLayoutQuote: TMenuItem;
- mnuLayoutBlockQuote: TMenuItem;
- mnuLayoutPreformatted: TMenuItem;}
+ mnuLayoutH6: TMenuItem;}
+ mnuLayoutAlign,
+ mnuLayoutAlignLeft,
+ mnuLayoutAlignRight,
+ mnuLayoutAlignCenter,
+ mnuLayoutCode,
+ mnuLayoutQuote,
+ mnuLayoutBlockQuote,
+ mnuLayoutPreformatted: string;
//Grouping menu
mnuGrouping,
mnuGroupingParagraph,
mnuGroupingDiv,
- mnuGroupingSpan,
+ mnuGroupingSpan: string;
//View menu
mnuView,
mnuViewFontsize: string;
@@ -147,6 +147,21 @@ type
mnuPopupLayoutH3: TMenuItem;
mnuPopupLayoutH2: TMenuItem;
mnuPopupLayoutH1: TMenuItem; }
+ // Other main.pp constants
+ SLine, SCol, SModified, SIns, SOvr,
+ msgOpenError, msgSaveError, msgSaveAllError, msgFileIsNotText,
+ msgFileNotFound, msgModifiedSave, msgMruIndexOutOfBound,
+ msgFileTypeNotForBrowser, msgFileHasNoName, msgErrorBrowser,
+ msgTextNotFound: string;
+ // main.pp hints in toolbar buttons
+ NewFromTemplateBtn, NewPlainBtn, OpenBtn, SaveBtn, SaveAllBtn,
+ CopyBtn, PasteBtn, FindBtn, InfoBtn,
+ AnchorBtn, ImageBtn, UListBtn, NListBtn, ListItemBtn, TableBtn,
+ BoldBtn, ItalicBtn, UnderlineBtn, EmBtn, StrongBtn, SupBtn, SubBtn,
+ HeadingBtn, LeftAlignBtn, RightAlignBtn, CenterAlignBtn, JustifyAlignBtn,
+ ParaBtn, DivBtn, SpanBtn: string;
+ // Other constants
+ NoName: string;
{ About box strings }
// lpSupport, lpSupportInfo, lpLicense, lpLicenseInfo, lpAuthors,
// lpContributorsTitle, lpAboutWindow, lpClose, lpInformation: string;
@@ -241,16 +256,16 @@ begin
mnuLayoutH3: TMenuItem;
mnuLayoutH4: TMenuItem;
mnuLayoutH5: TMenuItem;
- mnuLayoutH6: TMenuItem;
- mnuLayoutAlign: TMenuItem;
- mnuLayoutAlignLeft: TMenuItem;
- mnuLayoutAlignRight: TMenuItem;
- mnuLayoutAlignCenter: TMenuItem;
- mnuLayoutAlignJustify := 'Volledig uitlijnen';
- mnuLayoutCode: TMenuItem;
- mnuLayoutQuote: TMenuItem;
- mnuLayoutBlockQuote: TMenuItem;
- mnuLayoutPreformatted: TMenuItem;}
+ mnuLayoutH6: TMenuItem;}
+ mnuLayoutAlign := 'Alignment';
+ mnuLayoutAlignLeft := 'left aligned';
+ mnuLayoutAlignRight := 'right aligned';
+ mnuLayoutAlignCenter := 'Centralized';
+ mnuLayoutAlignJustify := 'Justified';
+ mnuLayoutCode := 'Code';
+ mnuLayoutQuote := 'Quote';
+ mnuLayoutBlockQuote := 'Block Quote';
+ mnuLayoutPreformatted := 'Preformatted';
//Grouping menu
mnuGrouping := '&Grouping';
mnuGroupingParagraph := 'Paragraph';
@@ -259,6 +274,60 @@ begin
//View menu
mnuView := '&View';
mnuViewFontsize := '&Font Size';
+
+ SLine := 'Line';
+ SCol := 'Col';
+ SModified := 'Modified';
+ SIns := 'INS';
+ SOvr := 'OVR';
+ msgOpenError := 'The following open file error has occured:'^m'%s';
+ msgSaveError := 'The following save file error has occured:'^m'%s';
+ msgSaveAllError := 'The following save all error has occured:'^m'%s';
+ msgFileIsNotText := 'The selected file '^m'%s'^m' does not seam to be a text file.';
+ msgFileNotFound := 'File not found:'^m'%s';
+ msgModifiedSave := 'The following file was modified:'^m'%s'^m'Should it be saved?';
+ msgMruIndexOutOfBound := 'Index out of bounds [%d]'^m;
+ msgFileTypeNotForBrowser := 'The file type is not suited for a browser.'^m+'Continue anyway?';
+ msgFileHasNoName := 'The file has no name.'^m +
+ 'U moet het bestand eerst opslaan om het in de browser te openen.';
+ msgErrorBrowser := 'Er is een fout opgetreden tijdens het openen van'^m+
+ '%s'^m'in de browser.';
+ msgTextNotFound := 'Text not found:'^m'"%s"';
+
+ // main.pp hints in toolbar buttons
+ NewFromTemplateBtn := mnuFileNewFromTemplate;
+ NewPlainBtn := mnuFileNew;
+ OpenBtn := mnuFileOpen;
+ SaveBtn := mnuFileSave;
+ SaveAllBtn := mnuFileSaveAll;
+ CopyBtn := mnuEditCopy;
+ PasteBtn := 'Paste';
+ FindBtn := 'Find';
+ InfoBtn := 'Help';
+ AnchorBtn := 'Insert Hyperlink';
+ ImageBtn := 'Image';
+ UListBtn := 'Bullets List';
+ NListBtn := 'Numeric List';
+ ListItemBtn := 'List item';
+ TableBtn := 'Table';
+ BoldBtn := mnuLayoutBold;
+ ItalicBtn := mnuLayoutItalic;
+ UnderlineBtn := mnuLayoutUnderline;
+ EmBtn := mnuLayoutEmphasis;
+ StrongBtn := mnuLayoutStrong;
+ SupBtn := mnuLayoutSub;
+ SubBtn := mnuLayoutSup;
+ HeadingBtn := 'Heading (H1..H6)';
+ LeftAlignBtn := mnuLayoutAlignLeft;
+ RightAlignBtn:= mnuLayoutAlignRight;
+ CenterAlignBtn:= mnuLayoutAlignCenter;
+ JustifyAlignBtn:= mnuLayoutAlignJustify;
+ ParaBtn := mnuGroupingParagraph;
+ DivBtn := mnuGroupingDiv;
+ SpanBtn := mnuGroupingSpan;
+
+ // Other constants
+ NoName := 'Untitled';
end;
procedure TTranslations.TranslateToDutch;
@@ -356,6 +425,62 @@ begin
//View menu
mnuView := 'Bee&ld';
mnuViewFontsize := '&Tekengrootte';
+
+ SLine := 'Rg';
+ SCol := 'Kol';
+ SModified := 'Gewijzigd';
+ SIns := 'INS';
+ SOvr := 'OVR';
+ msgOpenError := 'Fout bij openen van bestand:'^m'%s';
+ msgSaveError := 'Fout bij opslaan van bestand:'^m'%s';
+ msgSaveAllError := 'De volgende bestanden zijn niet opgeslagen:'^m'%s';
+ msgFileIsNotText := 'Dit bestand lijkt geen tekstbestand te zijn'^m'%s'^m'Wilt u het toch openen?';
+ msgFileNotFound := 'Bestand niet gevonden:'^m'%s';
+ msgModifiedSave := 'Bestand is gewijzigd:'^m'%s'^m'Bestand opslaan?';
+ msgMruIndexOutOfBound := 'Index voor recent geopende bestanden ligt buiten de grenzen [%d]'^m+
+ 'Dit is uiteraard een fout van de programmeur';
+ msgFileTypeNotForBrowser := 'Dit bestandstype lijkt niet geschikt om te openen in een browser.'^m+
+ 'Wilt u toch doorgaan?';
+ msgFileHasNoName := 'Dit bestand heeft nog geen naam.'^m +
+ 'U moet het bestand eerst opslaan om het in de browser te openen.';
+ msgErrorBrowser := 'Er is een fout opgetreden tijdens het openen van'^m+
+ '%s'^m'in de browser.';
+ msgTextNotFound := 'Tekst niet gevonden:'^m'"%s"';
+
+ // main.pp hints in toolbar buttons
+ NewFromTemplateBtn := mnuFileNewFromTemplate;
+ NewPlainBtn := mnuFileNew;
+ OpenBtn := mnuFileOpen;
+ SaveBtn := mnuFileSave;
+ SaveAllBtn := mnuFileSaveAll;
+ CopyBtn := mnuEditCopy;
+ PasteBtn := 'Paste';
+ FindBtn := 'Find';
+ InfoBtn := 'Help';
+ AnchorBtn := 'Hyperlink invoegen';
+ ImageBtn := 'Plaatje invoegen';
+ UListBtn := 'Ongenummerde lijst';
+ NListBtn := 'Genummerde ljst';
+ ListItemBtn := 'Lijstitem invoegen ((on)genummerde lijst)';
+ TableBtn := 'Tabel invoegen';
+ BoldBtn := mnuLayoutBold;
+ ItalicBtn := mnuLayoutItalic;
+ UnderlineBtn := mnuLayoutUnderline;
+ EmBtn := mnuLayoutEmphasis;
+ StrongBtn := mnuLayoutStrong;
+ SupBtn := mnuLayoutSub;
+ SubBtn := mnuLayoutSup;
+ HeadingBtn := 'Heading (H1..H6)';
+ LeftAlignBtn := mnuLayoutAlignLeft;
+ RightAlignBtn:= mnuLayoutAlignRight;
+ CenterAlignBtn:= mnuLayoutAlignCenter;
+ JustifyAlignBtn:= mnuLayoutAlignJustify;
+ ParaBtn := mnuGroupingParagraph;
+ DivBtn := mnuGroupingDiv;
+ SpanBtn := mnuGroupingSpan;
+
+ // Other constants
+ NoName := 'Naamloos';
end;
procedure TTranslations.TranslateToPortuguese;
diff --git a/applications/lazedit/main.lfm b/applications/lazedit/main.lfm
index 8d6e44ff6..1d7ecc24d 100644
--- a/applications/lazedit/main.lfm
+++ b/applications/lazedit/main.lfm
@@ -1,7 +1,7 @@
object EPlusForm: TEPlusForm
- Left = 634
+ Left = 286
Height = 418
- Top = 143
+ Top = 121
Width = 575
AllowDropFiles = True
Caption = 'Lazarus Text Editor'
@@ -1486,7 +1486,7 @@ object EPlusForm: TEPlusForm
end
end
object mnuHTMLTools: TMenuItem
- Caption = '&Invoegen'
+ Caption = '&HTML Tools'
OnClick = TopLevelMenuClick
object mnuInsertAnchor: TMenuItem
Action = acInsertAnchor
diff --git a/applications/lazedit/main.pp b/applications/lazedit/main.pp
index 1f2b4a26c..b9d944682 100644
--- a/applications/lazedit/main.pp
+++ b/applications/lazedit/main.pp
@@ -439,7 +439,9 @@ type
MruMenuItems: Array[0..MruEntries-1] of TMenuItem;
procedure SetUpAndConfigureLazEdit;
- procedure DoTranslate;
+ procedure DoTranslateAll;
+ procedure DoTranslateMenus;
+ procedure DoTranslateHints;
procedure SaveEplusConfiguration;
procedure CleanUp;
@@ -534,33 +536,11 @@ const pXY = 0; //Panels constanten
pMod = 1;
pIns = 2;
pName = 3;
- SLine = 'Rg';
- SCol = 'Kol';
- SModified = 'Gewijzigd';
- SIns = 'INS';
- SOvr = 'OVR';
tgNeedsEditor = $01;
tgNeedsSelection = $02;
tgNeedsClipPaste = $04;
-
- msgOpenError = 'Fout bij openen van bestand:'^m'%s';
- msgSaveError = 'Fout bij opslaan van bestand:'^m'%s';
- msgSaveAllError = 'De volgende bestanden zijn niet opgeslagen:'^m'%s';
- msgFileIsNotText = 'Dit bestand lijkt geen tekstbestand te zijn'^m'%s'^m'Wilt u het toch openen?';
- msgFileNotFound = 'Bestand niet gevonden:'^m'%s';
- msgModifiedSave = 'Bestand is gewijzigd:'^m'%s'^m'Bestand opslaan?';
- msgMruIndexOutOfBound = 'Index voor recent geopende bestanden ligt buiten de grenzen [%d]'^m+
- 'Dit is uiteraard een fout van de programmeur';
- msgFileTypeNotForBrowser = 'Dit bestandstype lijkt niet geschikt om te openen in een browser.'^m+
- 'Wilt u toch doorgaan?';
- msgFileHasNoName = 'Dit bestand heeft nog geen naam.'^m +
- 'U moet het bestand eerst opslaan om het in de browser te openen.';
- msgErrorBrowser = 'Er is een fout opgetreden tijdens het openen van'^m+
- '%s'^m'in de browser.';
- msgTextNotFound = 'Tekst niet gevonden:'^m'"%s"';
-
//Initial text for FileNew commands
itXml = '';
itBat = '@echo off';
@@ -578,7 +558,10 @@ const pXY = 0; //Panels constanten
procedure TEPlusForm.FormCreate(Sender: TObject);
begin
SetUpAndConfigureLazEdit;
- Self.DoTranslate();
+ DoTranslateAll();
+ NoteBook.IsCreating := True;
+ DoFileNewByType(eftNone);
+ NoteBook.IsCreating := False;
end;
procedure TEPlusForm.FormDestroy(Sender: TObject);
@@ -615,7 +598,7 @@ begin
begin
if not TryFileOpen(FileNames[i]) then ShowError(Format('Fout bij openen van bestand'^m,[FileNames[i]]));
end
- else ShowError(Format(msgFileNotFound,[FileNames[i]]));
+ else ShowError(Format(vTranslations.msgFileNotFound,[FileNames[i]]));
end;
end;
@@ -628,7 +611,7 @@ end;
procedure TEPlusForm.mnuLanguageChangeClick(Sender: TObject);
begin
vTranslations.TranslateToLanguageID(Abs(TMenuItem(Sender).Tag));
- DoTranslate();
+ DoTranslateAll();
end;
@@ -1163,8 +1146,15 @@ begin
end;
-procedure TEPlusForm.DoTranslate;
+procedure TEPlusForm.DoTranslateAll;
begin
+ DoTranslateMenus();
+ DoTranslateHints();
+end;
+
+procedure TEPlusForm.DoTranslateMenus;
+begin
+ { MENUS }
{ mnuEditPasteTableContentTab: TMenuItem;
mnuEditPasteSpecial: TMenuItem;
mnuAbout: TMenuItem;
@@ -1300,6 +1290,41 @@ begin
mnuPopupLayoutH1: TMenuItem; }
end;
+procedure TEPlusForm.DoTranslateHints;
+begin
+ { HINTS }
+ NewFromTemplateBtn.Hint := vTranslations.NewFromTemplateBtn;
+ NewPlainBtn.Hint := vTranslations.NewPlainBtn;
+ OpenBtn.Hint := vTranslations.OpenBtn;
+ SaveBtn.Hint := vTranslations.SaveBtn;
+ SaveAllBtn.Hint := vTranslations.SaveAllBtn;
+ CopyBtn.Hint := vTranslations.CopyBtn;
+ PasteBtn.Hint := vTranslations.PasteBtn;
+ FindBtn.Hint := vTranslations.FindBtn;
+ InfoBtn.Hint := vTranslations.InfoBtn;
+ AnchorBtn.Hint := vTranslations.AnchorBtn;
+ ImageBtn.Hint := vTranslations.ImageBtn;
+ UListBtn.Hint := vTranslations.UListBtn;
+ NListBtn.Hint := vTranslations.NListBtn;
+ ListItemBtn.Hint := vTranslations.ListItemBtn;
+ TableBtn.Hint := vTranslations.TableBtn;
+ BoldBtn.Hint := vTranslations.BoldBtn;
+ ItalicBtn.Hint := vTranslations.ItalicBtn;
+ UnderlineBtn.Hint := vTranslations.UnderlineBtn;
+ EmBtn.Hint := vTranslations.EmBtn;
+ StrongBtn.Hint := vTranslations.StrongBtn;
+ SupBtn.Hint := vTranslations.SupBtn;
+ SubBtn.Hint := vTranslations.SubBtn;
+ HeadingBtn.Hint := vTranslations.HeadingBtn;
+ LeftAlignBtn.Hint := vTranslations.LeftAlignBtn;
+ RightAlignBtn.Hint := vTranslations.RightAlignBtn;
+ CenterAlignBtn.Hint := vTranslations.CenterAlignBtn;
+ JustifyAlignBtn.Hint := vTranslations.JustifyAlignBtn;
+ ParaBtn.Hint := vTranslations.ParaBtn;
+ DivBtn.Hint := vTranslations.DivBtn;
+ SpanBtn.Hint := vTranslations.SpanBtn;
+end;
+
procedure TEPlusForm.SaveEplusConfiguration;
begin
GatherAppOptions(AppOptions);
@@ -1702,7 +1727,7 @@ begin
begin
Fn := Ed.FileName;
if Fn = EmptyStr then Fn := Sender.Caption; //this will differentiate between Noname and Noname [2]
- Res := MessageDlg(AppName, Format(msgModifiedSave,[Fn]), mtConfirmation, [mbYes,mbNo,mbCancel], 0);
+ Res := MessageDlg(AppName, Format(vTranslations.msgModifiedSave,[Fn]), mtConfirmation, [mbYes,mbNo,mbCancel], 0);
case Res of
mrNo: Cancel := False;
mrCancel: Cancel := True;
@@ -1732,17 +1757,17 @@ begin
begin
Col := CaretX;
Line := CaretY;
- StatusBar.Panels[pXY].Text := Format('%s %-3d %s %-3d',[SLine,Line,SCol,Col]);
+ StatusBar.Panels[pXY].Text := Format('%s %-3d %s %-3d',[vTranslations.SLine,Line,vTranslations.SCol,Col]);
end;
if (scModified in Changes) then
begin
- if Modified then StatusBar.Panels[pMod].Text := SModified
+ if Modified then StatusBar.Panels[pMod].Text := vTranslations.SModified
else StatusBar.Panels[pMod].Text := '';
end;
if (scInsertMode in Changes) then
begin
- if InsertMode then StatusBar.Panels[pIns].Text := SIns
- else StatusBar.Panels[pIns].Text := SOvr;
+ if InsertMode then StatusBar.Panels[pIns].Text := vTranslations.SIns
+ else StatusBar.Panels[pIns].Text := vTranslations.SOvr;
end;
if (scFileName in Changes) then
begin
@@ -1992,10 +2017,10 @@ begin
if (Fn = EmptyStr) then Exit;
if FileExistsUtf8(Fn) then
begin
- if not TryFileOpen(Fn, False) then ShowError(Format(msgOpenError,[Fn]));
+ if not TryFileOpen(Fn, False) then ShowError(Format(vTranslations.msgOpenError,[Fn]));
end
else
- ShowError(Format(msgFileNotFound,[Fn]));
+ ShowError(Format(vTranslations.msgFileNotFound,[Fn]));
end;
procedure TEPlusForm.DoMruOpen(const Index: Integer);
@@ -2004,12 +2029,12 @@ var
begin
if (Index < 0) or (Index > MruList.Count - 1) then
begin
- ShowError(Format(msgMruIndexOutOfBound,[Index]));
+ ShowError(Format(vTranslations.msgMruIndexOutOfBound,[Index]));
end;
Fn := MruList.Strings[Index];
if (Fn <> '') then
begin
- if not TryFileOpen(Fn, False) then ShowError(Format(msgOpenError,[Fn]));
+ if not TryFileOpen(Fn, False) then ShowError(Format(vTranslations.msgOpenError,[Fn]));
end
end;
@@ -2021,17 +2046,17 @@ begin
if (Fn = EmptyStr) then Exit;
if FileExistsUtf8(Fn) then
begin
- if not TryFileOpen(Fn, True) then ShowError(Format(msgOpenError,[Fn]));
+ if not TryFileOpen(Fn, True) then ShowError(Format(vTranslations.msgOpenError,[Fn]));
end
else
- ShowError(Format(msgFileNotFound,[Fn]));
+ ShowError(Format(vTranslations.msgFileNotFound,[Fn]));
end;
procedure TEPlusForm.DoFileSave(Editor: TEditor);
begin
if Assigned(Editor) then
begin
- if (TryFileSave(Editor, Editor.FileName) = IoFail) then ShowError(Format(msgSaveError,[Editor.FileName]));
+ if (TryFileSave(Editor, Editor.FileName) = IoFail) then ShowError(Format(vTranslations.msgSaveError,[Editor.FileName]));
end;
end;
@@ -2044,7 +2069,7 @@ begin
Fn := AskFileNameSave(Editor.FileName, Editor.FileType);
if (Fn <> EmptyStr) then
begin
- if (TryFileSave(Editor, Fn) = IoFail) then ShowError(Format(msgSaveError,[Fn]));
+ if (TryFileSave(Editor, Fn) = IoFail) then ShowError(Format(vTranslations.msgSaveError,[Fn]));
end;
end;
end;
@@ -2058,7 +2083,7 @@ begin
Fn := AskFileNameSaveTemplate;
if (Fn <> EmptyStr) then
begin
- if (TryFileSave(Editor, Fn) = IoFail) then ShowError(Format(msgSaveError,[Fn]));
+ if (TryFileSave(Editor, Fn) = IoFail) then ShowError(Format(vTranslations.msgSaveError,[Fn]));
end;
end;
end;
@@ -2071,7 +2096,7 @@ begin
if not TryFileSaveAll(S) then
begin
S := Trim(S); //get rid of trailing LineEndings
- ShowError(Format(msgSaveAllError,[S]));
+ ShowError(Format(vTranslations.msgSaveAllError,[S]));
end;
end;
@@ -2105,15 +2130,15 @@ begin
begin
if (Ed.FileName = EmptyStr) then
begin
- ShowError(msgFileHasNoName);
+ ShowError(vTranslations.msgFileHasNoName);
Exit;
end;
if not (Ed.FileType in [eftHtml, eftXml]) then
begin
- if (MessageDlg(AppName, msgFileTypeNotForBrowser, mtConfirmation, [mbYes,mbNo], 0, mbNo) <> mrYes) then
+ if (MessageDlg(AppName, vTranslations.msgFileTypeNotForBrowser, mtConfirmation, [mbYes,mbNo], 0, mbNo) <> mrYes) then
Exit;
end;
- if not OpenUrl(Ed.FileName) then ShowError(Format(msgErrorBrowser, [Ed.FileName]));
+ if not OpenUrl(Ed.FileName) then ShowError(Format(vTranslations.msgErrorBrowser, [Ed.FileName]));
end;
end;
@@ -2213,7 +2238,7 @@ begin
sOpt := FindOptions;
sOpt := sOpt - [ssoBackWards];
if Ed.SearchReplace(FindText,'',sOpt) = 0 then
- ShowError(Format(msgTextNotFound,[FindText]));
+ ShowError(Format(vTranslations.msgTextNotFound,[FindText]));
end;
end;
@@ -2229,7 +2254,7 @@ begin
sOpt := FindOptions;
sOpt := sOpt + [ssoBackWards];
if Ed.SearchReplace(FindText,'',sOpt) = 0 then
- ShowError(Format(msgTextNotFound,[FindText]));
+ ShowError(Format(vTranslations.msgTextNotFound,[FindText]));
end;
end;
@@ -2282,7 +2307,7 @@ begin
FindText := Dlg.FindText;
if Ed.SearchReplace(FindText,'',FindOptions) = 0 then
- ShowError(Format(msgTextNotFound,[FindText]));
+ ShowError(Format(vTranslations.msgTextNotFound,[FindText]));
end;
end;
@@ -2309,7 +2334,7 @@ begin
ReplaceText := Dlg.ReplaceText;
if Ed.SearchReplace(FindText,ReplaceText,ReplaceOptions) = 0 then
- ShowError(Format(msgTextNotFound,[FindText]))
+ ShowError(Format(vTranslations.msgTextNotFound,[FindText]))
else
if (ssoReplace in ReplaceOptions) and not (ssoReplaceAll in ReplaceOptions) then
begin