<commit_before>unit form_addon_report;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
  ExtCtrls, StdCtrls, IniFiles,
  ATStringProc,
  proc_globdata,
  proc_msg;

type
  { TfmAddonReport }

  TfmAddonReport = class(TForm)
    ButtonPanel1: TButtonPanel;
    ListBox1: TListBox;
    PanelInfo: TPanel;
    procedure FormShow(Sender: TObject);
  private
  public
  end;

procedure DoDialogAddonInstalledReport(const SItems, SMsg: string);

implementation

{$R *.lfm}

procedure DoDialogAddonInstalledReport(const SItems, SMsg: string);
var
  F: TfmAddonReport;
  SAll, S: string;
begin
  F:= TfmAddonReport.Create(nil);
  try
    SAll:= SItems;
    repeat
      S:= SGetItem(SAll, #10);
      if S='' then Break;
      F.ListBox1.Items.Add(S);
    until false;

    F.PanelInfo.Caption:= SMsg;
    F.PanelInfo.Visible:= SMsg<>'';
    F.ShowModal;
  finally
    FreeAndNil(F);
  end;
end;

procedure DoLocalize_FormAddonReport(F: TfmAddonReport);
begin
  with F do Caption:= msgStatusAddonInstalled;
  with F.ButtonPanel1.OKButton do Caption:= msgButtonOk;
end;

{ TfmAddonReport }

procedure TfmAddonReport.FormShow(Sender: TObject);
begin
  DoLocalize_FormAddonReport(Self);
  ButtonPanel1.OKButton.SetFocus;
end;

end.

<commit_msg>fix #773<commit_after>unit form_addon_report;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
  ExtCtrls, StdCtrls, IniFiles,
  ATStringProc,
  proc_globdata,
  proc_msg;

type
  { TfmAddonReport }

  TfmAddonReport = class(TForm)
    ButtonPanel1: TButtonPanel;
    ListBox1: TListBox;
    PanelInfo: TPanel;
    procedure FormShow(Sender: TObject);
  private
  public
  end;

procedure DoDialogAddonInstalledReport(const SItems, SMsg: string);

implementation

{$R *.lfm}

procedure DoDialogAddonInstalledReport(const SItems, SMsg: string);
var
  F: TfmAddonReport;
  SAll, S: string;
begin
  F:= TfmAddonReport.Create(nil);
  try
    SAll:= SItems;
    repeat
      S:= SGetItem(SAll, #10);
      if S='' then Break;

      S:= StringReplace(S, '&', '', [rfReplaceAll]);
      S:= StringReplace(S, '\', ': ', [rfReplaceAll]);

      F.ListBox1.Items.Add(S);
    until false;

    F.PanelInfo.Caption:= SMsg;
    F.PanelInfo.Visible:= SMsg<>'';
    F.ShowModal;
  finally
    FreeAndNil(F);
  end;
end;

procedure DoLocalize_FormAddonReport(F: TfmAddonReport);
begin
  with F do Caption:= msgStatusAddonInstalled;
  with F.ButtonPanel1.OKButton do Caption:= msgButtonOk;
end;

{ TfmAddonReport }

procedure TfmAddonReport.FormShow(Sender: TObject);
begin
  DoLocalize_FormAddonReport(Self);
  ButtonPanel1.OKButton.SetFocus;
end;

end.


{'fraction_non_alphanumeric': 0.11279026907482492, 'fraction_numerical': 0.006266126059712496, 'mean_word_length': 4.280155642023346, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5771005', 'n_tokens_mistral': 1050, 'n_tokens_neox': 999, 'n_words': 217}