mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:36:17 +02:00
PoChecker: display summary form even if statistics showing is disabled (in this case it is simply not added to log). This allows user to always see translation completion status and get access to graphical summary.
git-svn-id: trunk@57546 -
This commit is contained in:
parent
20834ad1f1
commit
085dd5ef9f
@ -541,39 +541,27 @@ begin
|
||||
PoFamilyList.RunTests(ErrorCount, WarningCount, TotalTranslatedCount, TotalUntranslatedCount, TotalFuzzyCount, SL);
|
||||
//debugln('RunSelectedTests: ', Format(sTotalErrors, [ErrorCount]));
|
||||
//debugln(' ', Format(sTotalWarnings, [WarningCount]));
|
||||
if (ErrorCount > 0) or (WarningCount > 0) or
|
||||
(pttCheckStatistics in TestTypes) then
|
||||
begin
|
||||
TotalPercTranslated := 100 * TotalTranslatedCount / (TotalTranslatedCount + TotalUntranslatedCount + TotalFuzzyCount);
|
||||
SL.Add(Format(sTotalErrors, [ErrorCount]));
|
||||
SL.Add(Format(sTotalWarnings, [WarningCount]));
|
||||
SL.Add(Format(sTotalUntranslatedStrings, [IntToStr(TotalUntranslatedCount)]));
|
||||
SL.Add(Format(sTotalFuzzyStrings, [IntToStr(TotalFuzzyCount)]));
|
||||
SL.Add('');
|
||||
SL.Add(Format(sTotalTranslatedStrings, [IntToStr(TotalTranslatedCount), TotalPercTranslated]));
|
||||
ResultDlg := TResultDlgForm.Create(nil);
|
||||
try
|
||||
ResultDlg.FTotalTranslated := TotalTranslatedCount;
|
||||
ResultDlg.FTotalUntranslated := TotalUntranslatedCount;
|
||||
ResultDlg.FTotalFuzzy := TotalFuzzyCount;
|
||||
ResultDlg.FTotalPercTranslated := TotalPercTranslated;
|
||||
ResultDlg.Log.Assign(SL);
|
||||
FreeAndNil(SL); //No need to keep 2 copies of this data
|
||||
if (pttCheckStatistics in TestTypes) then
|
||||
begin
|
||||
ResultDlg.PoFamilyList := PoFamilyList;
|
||||
ResultDlg.PoFamilyStats := PoFamilyList.PoFamilyStats;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ResultDlg.PoFamilyList := nil;
|
||||
ResultDlg.PoFamilyStats := nil;
|
||||
end;
|
||||
ResultDlg.Settings := FPoCheckerSettings;
|
||||
mr := ResultDlg.ShowModal;
|
||||
finally
|
||||
ResultDlg.Free;
|
||||
end;
|
||||
TotalPercTranslated := 100 * TotalTranslatedCount / (TotalTranslatedCount + TotalUntranslatedCount + TotalFuzzyCount);
|
||||
SL.Add(Format(sTotalErrors, [ErrorCount]));
|
||||
SL.Add(Format(sTotalWarnings, [WarningCount]));
|
||||
SL.Add(Format(sTotalUntranslatedStrings, [IntToStr(TotalUntranslatedCount)]));
|
||||
SL.Add(Format(sTotalFuzzyStrings, [IntToStr(TotalFuzzyCount)]));
|
||||
SL.Add('');
|
||||
SL.Add(Format(sTotalTranslatedStrings, [IntToStr(TotalTranslatedCount), TotalPercTranslated]));
|
||||
ResultDlg := TResultDlgForm.Create(nil);
|
||||
try
|
||||
ResultDlg.FTotalTranslated := TotalTranslatedCount;
|
||||
ResultDlg.FTotalUntranslated := TotalUntranslatedCount;
|
||||
ResultDlg.FTotalFuzzy := TotalFuzzyCount;
|
||||
ResultDlg.FTotalPercTranslated := TotalPercTranslated;
|
||||
ResultDlg.Log.Assign(SL);
|
||||
FreeAndNil(SL); //No need to keep 2 copies of this data
|
||||
ResultDlg.PoFamilyList := PoFamilyList;
|
||||
ResultDlg.PoFamilyStats := PoFamilyList.PoFamilyStats;
|
||||
ResultDlg.Settings := FPoCheckerSettings;
|
||||
mr := ResultDlg.ShowModal;
|
||||
finally
|
||||
ResultDlg.Free;
|
||||
end;
|
||||
NoErrLabel.Visible := (ErrorCount = 0);
|
||||
finally
|
||||
|
@ -938,10 +938,7 @@ begin
|
||||
TranslatedCount := FChild.NrTranslated;
|
||||
UntranslatedCount := FChild.NrUntranslated;
|
||||
FuzzyCount := FChild.NrFuzzy;
|
||||
if (pttCheckStatistics in FTestTypes) then
|
||||
begin
|
||||
CheckStatistics(ThisErrCnt);
|
||||
end;
|
||||
CheckStatistics(ThisErrCnt);
|
||||
{
|
||||
if (ptt in FTestTypes) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user