Skip to content

Commit

Permalink
Update for new messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Nov 14, 2024
1 parent d18bab1 commit 9685369
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Projects/Src/Compression.SevenZipDecoder.pas
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ procedure Extract7ZipArchive(const ArchiveFileName, DestDir: String;

var SaveCurDir := GetCurrentDir;
if not ForceDirectories(False, DestDir) or not SetCurrentDir(DestDir) then
raise Exception.Create(FmtSetupMessage(msgErrorDownloadFailed, ['-1', ''])); //todo: fix message
raise Exception.Create(FmtSetupMessage(msgErrorExtractionFailed, ['-1']));
try
State.ExpandedArchiveFileName := PathExpand(ArchiveFileName);
State.ExpandedDestDir := AddBackslash(PathExpand(DestDir));
Expand All @@ -290,9 +290,9 @@ procedure Extract7ZipArchive(const ArchiveFileName, DestDir: String;
Log(State.LogBuffer);

if State.Aborted then
raise Exception.Create(SetupMessages[msgErrorDownloadAborted]) //todo: fix message
raise Exception.Create(SetupMessages[msgErrorExtractionAborted])
else if Res <> 0 then
raise Exception.Create(FmtSetupMessage(msgErrorDownloadFailed, [Res.ToString, ''])) //todo: fix message
raise Exception.Create(FmtSetupMessage(msgErrorExtractionFailed, [Res.ToString]))
finally
SetCurrentDir(SaveCurDir);
end;
Expand Down
7 changes: 3 additions & 4 deletions Projects/Src/Setup.ScriptDlg.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,7 @@ function TDownloadWizardPage.Download: Int64;

procedure TExtractionWizardPage.AbortButtonClick(Sender: TObject);
begin
//todo: fix msg!
FAbortedByUser := LoggedMsgBox(SetupMessages[msgStopDownload], '', mbConfirmation, MB_YESNO, True, ID_YES) = IDYES;
FAbortedByUser := LoggedMsgBox(SetupMessages[msgStopExtraction], '', mbConfirmation, MB_YESNO, True, ID_YES) = IDYES;
end;

function TExtractionWizardPage.InternalOnExtractionProgress(const ArchiveName, FileName: string; const Progress, ProgressMax: Int64): Boolean;
Expand Down Expand Up @@ -1136,11 +1135,11 @@ procedure TExtractionWizardPage.Initialize;
begin
inherited;

FMsg1Label.Caption := SetupMessages[msgDownloadingLabel]; //todo: fix message
FMsg1Label.Caption := SetupMessages[msgExtractionLabel];

FAbortButton := TNewButton.Create(Self);
with FAbortButton do begin
Caption := SetupMessages[msgButtonStopDownload]; //todo: fix message
Caption := SetupMessages[msgButtonStopExtraction];
Top := FProgressBar.Top + FProgressBar.Height + WizardForm.ScalePixelsY(8);
Width := WizardForm.CalculateButtonWidth([Caption]);
Anchors := [akLeft, akTop];
Expand Down
5 changes: 5 additions & 0 deletions Projects/Src/Shared.SetupMessageIDs.pas
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ interface
msgButtonNoToAll,
msgButtonOK,
msgButtonStopDownload,
msgButtonStopExtraction,
msgButtonWizardBrowse,
msgButtonYes,
msgButtonYesToAll,
Expand Down Expand Up @@ -85,6 +86,8 @@ interface
msgErrorDownloadFailed,
msgErrorDownloadSizeFailed,
msgErrorExecutingProgram,
msgErrorExtractionAborted,
msgErrorExtractionFailed,
msgErrorFileHash1,
msgErrorFileHash2,
msgErrorFileSize,
Expand Down Expand Up @@ -119,6 +122,7 @@ interface
msgExistingFileReadOnlyKeepExisting,
msgExitSetupMessage,
msgExitSetupTitle,
msgExtractionLabel,
msgFileAbortRetryIgnoreSkipNotRecommended,
msgFileAbortRetryIgnoreIgnoreNotRecommended,
msgFileExistsSelectAction,
Expand Down Expand Up @@ -234,6 +238,7 @@ interface
msgStatusRunProgram,
msgStatusUninstalling,
msgStopDownload,
msgStopExtraction,
msgTranslatorNote,
msgUninstallAppFullTitle,
msgUninstallAppTitle,
Expand Down
2 changes: 1 addition & 1 deletion Projects/Src/Shared.Struct.pas
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface
SetupID: TSetupID = 'Inno Setup Setup Data (6.4.0)';
UninstallLogID: array[Boolean] of TUninstallLogID =
('Inno Setup Uninstall Log (b)', 'Inno Setup Uninstall Log (b) 64-bit');
MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (6.0.0) (u)';
MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (6.4.0) (u)';
MessagesLangOptionsID: TMessagesLangOptionsID = '!mlo!001';
ZLIBID: TCompID = 'zlb'#26;
DiskSliceID: TDiskSliceID = 'idska32'#26;
Expand Down
11 changes: 11 additions & 0 deletions whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@

<p>Thanks to Neil Hodgson and Igor Pavlov for their continued work on Scintilla and the LZMA SDK!</p>

<p>Some messages have been added and changed in this version: (<a href="https://github.com/jrsoftware/issrc/commit/d18bab1c9234aa8bba6c8e277121e562724d331c">View differences in Default.isl</a>.)</p>
<ul>
<li><b>New messages:</b>
<ul>
<li>ExtractionLabel, ButtonStopExtraction, StopExtraction, ErrorExtractionAborted, ErrorExtractionFailed.</li>
</ul>
</li>
</ul>

<p>Note: Not all official translations have been updated for these changes at this moment.</li>

<p><a href="files/is6.3-whatsnew.htm">Inno Setup 6.3 Revision History</a></p>

</body>
Expand Down

0 comments on commit 9685369

Please sign in to comment.