POChecker: added ability to refresh translations (i.e. sync them with master .po file). Regenerated translations and updated Russian translation.

git-svn-id: trunk@52427 -
This commit is contained in:
maxim 2016-06-02 23:13:21 +00:00
parent f3d729dee2
commit e1a6937cda
17 changed files with 407 additions and 28 deletions

View File

@ -104,6 +104,9 @@ object GraphStatForm: TGraphStatForm
Caption = 'Open file in system PO editor' Caption = 'Open file in system PO editor'
OnClick = POEditorMenuItemClick OnClick = POEditorMenuItemClick
end end
object Separator1MenuItem: TMenuItem
Caption = '-'
end
object ExtEditorMenuItem: TMenuItem object ExtEditorMenuItem: TMenuItem
Caption = 'Open file in external editor' Caption = 'Open file in external editor'
Visible = False Visible = False
@ -114,5 +117,16 @@ object GraphStatForm: TGraphStatForm
Visible = False Visible = False
OnClick = IDEEditorMenuItemClick OnClick = IDEEditorMenuItemClick
end end
object Separator2MenuItem: TMenuItem
Caption = '-'
end
object RefreshCurrMenuItem: TMenuItem
Caption = 'Refresh current translation family'
OnClick = RefreshCurrMenuItemClick
end
object RefreshAllMenuItem: TMenuItem
Caption = 'Refresh all translation families'
OnClick = RefreshAllMenuItemClick
end
end end
end end

View File

@ -11,8 +11,8 @@ uses
{$else} {$else}
Process, Utf8Process, Process, Utf8Process,
{$endif} {$endif}
ExtCtrls, PoFamilies, PoCheckerConsts, LCLProc, StdCtrls, ComCtrls, Menus, ExtCtrls, PoFamilies, PoFamilyLists, PoCheckerConsts, LCLProc, StdCtrls, ComCtrls, Menus,
PoCheckerSettings, LCLIntf; PoCheckerSettings, LCLIntf, Translations;
type type
@ -20,6 +20,10 @@ type
{ TGraphStatForm } { TGraphStatForm }
TGraphStatForm = class(TForm) TGraphStatForm = class(TForm)
Separator1MenuItem: TMenuItem;
RefreshCurrMenuItem: TMenuItem;
RefreshAllMenuItem: TMenuItem;
Separator2MenuItem: TMenuItem;
POEditorMenuItem: TMenuItem; POEditorMenuItem: TMenuItem;
ExtEditorMenuItem: TMenuItem; ExtEditorMenuItem: TMenuItem;
IDEEditorMenuItem: TMenuItem; IDEEditorMenuItem: TMenuItem;
@ -42,16 +46,20 @@ type
procedure IDEEditorMenuItemClick(Sender: TObject); procedure IDEEditorMenuItemClick(Sender: TObject);
procedure ListViewMouseMove(Sender: TObject; {%H-}Shift: TShiftState; X, procedure ListViewMouseMove(Sender: TObject; {%H-}Shift: TShiftState; X,
Y: Integer); Y: Integer);
procedure ListViewMouseUp(Sender: TObject; {%H-}Button: TMouseButton; procedure ListViewMouseUp(Sender: TObject; Button: TMouseButton; Shift:
{%H-}Shift: TShiftState; X, Y: Integer); TShiftState; X, Y: Integer);
procedure POEditorMenuItemClick(Sender: TObject); procedure POEditorMenuItemClick(Sender: TObject);
procedure RefreshAllMenuItemClick(Sender: TObject);
procedure RefreshCurrMenuItemClick(Sender: TObject);
private private
{ private declarations } { private declarations }
FPoFamilyList: TPoFamilyList;
FPoFamilyStats: TPoFamilyStats; FPoFamilyStats: TPoFamilyStats;
FImgList: TImageList; FImgList: TImageList;
FOldHintHidePause: Integer; FOldHintHidePause: Integer;
FSettings: TPoCheckerSettings; FSettings: TPoCheckerSettings;
Fn: string; Fn: string;
CurrentMasterPoFile: string;
procedure LoadConfig; procedure LoadConfig;
Procedure SaveConfig; Procedure SaveConfig;
function CreateBitmap(AStat: TStat): TBitmap; function CreateBitmap(AStat: TStat): TBitmap;
@ -59,8 +67,11 @@ type
procedure DrawGraphs(Cnt: PtrInt); procedure DrawGraphs(Cnt: PtrInt);
procedure MaybeOpenInLazIDE; procedure MaybeOpenInLazIDE;
procedure MaybeOpenInExternalEditor; procedure MaybeOpenInExternalEditor;
procedure RefreshTranslations(All: boolean);
procedure ConfigureContextPopUp(AdvancedMode: boolean);
public public
{ public declarations } { public declarations }
property PoFamilyList: TPoFamilyList read FPoFamilyList write FPoFamilyList;
property PoFamilyStats: TPoFamilyStats read FPoFamilyStats write FPoFamilyStats; property PoFamilyStats: TPoFamilyStats read FPoFamilyStats write FPoFamilyStats;
property Settings: TPoCheckerSettings read FSettings write FSettings; property Settings: TPoCheckerSettings read FSettings write FSettings;
end; end;
@ -105,12 +116,6 @@ begin
Application.HintHidePause := 5000; Application.HintHidePause := 5000;
LoadConfig; LoadConfig;
WindowState := Settings.GraphFormWindowState; WindowState := Settings.GraphFormWindowState;
{$ifdef pocheckerstandalone}
if Settings.ExternalEditorName <> '' then
ExtEditorMenuItem.Visible := true;
{$else}
IDEEditorMenuItem.Visible := true;
{$endif}
Application.QueueAsyncCall(@DrawGraphs, FPoFamilyStats.Count); Application.QueueAsyncCall(@DrawGraphs, FPoFamilyStats.Count);
end; end;
@ -159,6 +164,9 @@ begin
anIndex := anItem.Index; anIndex := anItem.Index;
AStat := FPoFamilyStats.Items[anIndex]; AStat := FPoFamilyStats.Items[anIndex];
Fn := AStat.PoName; Fn := AStat.PoName;
CurrentMasterPoFile := ExtractMasterNameFromChildName(AStat.PoName);
//todo: replace "true" with "ssShift in Shift" when bug 30234 gets fixed
ConfigureContextPopUp(true);
CurrScreenPoint := ListView.ClientToScreen(Point(X, Y)); CurrScreenPoint := ListView.ClientToScreen(Point(X, Y));
ContextPopupMenu.PopUp(CurrScreenPoint.X, CurrScreenPoint.Y); ContextPopupMenu.PopUp(CurrScreenPoint.X, CurrScreenPoint.Y);
end; end;
@ -171,6 +179,80 @@ begin
ShowMessage(Format(SOpenFail,[Fn])); ShowMessage(Format(SOpenFail,[Fn]));
end; end;
procedure TGraphStatForm.RefreshAllMenuItemClick(Sender:
TObject);
begin
RefreshTranslations(true);
end;
procedure TGraphStatForm.RefreshCurrMenuItemClick(Sender: TObject);
begin
RefreshTranslations(false);
end;
procedure TGraphStatForm.RefreshTranslations(All: boolean);
var
i: integer;
AbortUpdate: boolean;
begin
//"All" parameter defines if we refresh current family only (false) or all families (true)
StatusLabel.Visible := true;
RefreshCurrMenuItem.Enabled := false;
RefreshAllMenuItem.Enabled := false;
try
AbortUpdate := false;
i := 0;
while (i<PoFamilyList.Count) and (AbortUpdate=false) do
begin
try
if All=true then
StatusLabel.Caption := Format(sProcessingTranslationFamilyOf, [
IntToStr(i), IntToStr(PoFamilyList.Count)])
else
StatusLabel.Caption := sProcessingTranslationFamily;
StatusLabel.Repaint;
if All=true then
begin
UpdatePoFileTranslations(PoFamilyList.Items[i].MasterName);
inc(i);
end
else
begin
UpdatePoFileTranslations(CurrentMasterPoFile);
AbortUpdate := true;
end;
except
on E: EPOFileError do
if MessageDlg('POChecker', Format(
sCannotWriteFileYouCanPressRetryToRefreshThisTransl, [LineEnding,
E.ResFileName, LineEnding, LineEnding]), mtError, [mbRetry, mbAbort
], 0) = mrAbort then
AbortUpdate := true;
end;
end;
finally
StatusLabel.Visible := false;
RefreshCurrMenuItem.Enabled := true;
RefreshAllMenuItem.Enabled := true;
end;
end;
procedure TGraphStatForm.ConfigureContextPopUp(AdvancedMode: boolean);
begin
//POEditorMenuItem is always shown, others only in advanced mode
Separator1MenuItem.Visible := AdvancedMode;
//ExtEditorMenuItem and IDEEditorMenuItem are invisible by default
{$ifdef pocheckerstandalone}
if Settings.ExternalEditorName <> '' then
ExtEditorMenuItem.Visible := AdvancedMode;
{$else}
IDEEditorMenuItem.Visible := AdvancedMode;
{$endif}
Separator2MenuItem.Visible := AdvancedMode;
RefreshCurrMenuItem.Visible := AdvancedMode;
RefreshAllMenuItem.Visible := AdvancedMode;
end;
procedure TGraphStatForm.LoadConfig; procedure TGraphStatForm.LoadConfig;
var var
ARect: TRect; ARect: TRect;
@ -202,6 +284,8 @@ begin
POEditorMenuItem.Caption := sOpenFileInSystemPOEditor; POEditorMenuItem.Caption := sOpenFileInSystemPOEditor;
ExtEditorMenuItem.Caption := sOpenFileInExternalEditor; ExtEditorMenuItem.Caption := sOpenFileInExternalEditor;
IDEEditorMenuItem.Caption := sOpenFileInIDEEditor; IDEEditorMenuItem.Caption := sOpenFileInIDEEditor;
RefreshCurrMenuItem.Caption := sRefreshCurrentTranslationFamily;
RefreshAllMenuItem.Caption := sRefreshAllTranslationFamilies;
TranslatedShape.Brush.Color := clTranslated; TranslatedShape.Brush.Color := clTranslated;
UnTranslatedShape.Brush.Color := clUntranslated; UnTranslatedShape.Brush.Color := clUntranslated;
FuzzyShape.Brush.Color := clFuzzy; FuzzyShape.Brush.Color := clFuzzy;

View File

@ -133,6 +133,10 @@ msgstr ""
"pro vybraný soubor\n" "pro vybraný soubor\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Zkontrolovat výskyt duplicitních nepřeložených hodnot" msgstr "Zkontrolovat výskyt duplicitních nepřeložených hodnot"
@ -337,6 +341,22 @@ msgstr "Přeloženo: %2.0f%%."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "Nepřeloženo: %2.0f%%." msgstr "Nepřeloženo: %2.0f%%."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Výsledky" msgstr "Výsledky"

View File

@ -131,6 +131,10 @@ msgstr ""
"für die gewählte Datei file\n" "für die gewählte Datei file\n"
"%s nicht finden\n" "%s nicht finden\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Prüfung auf mehrfache, nicht übersetzte Werte" msgstr "Prüfung auf mehrfache, nicht übersetzte Werte"
@ -213,9 +217,9 @@ msgstr ""
msgid "Find troublesome files" msgid "Find troublesome files"
msgstr "Störende Dateien finden" msgstr "Störende Dateien finden"
#: pocheckerconsts.sfuzzy #: pocheckerconsts.sfuzzystringstotal
msgid "Fuzzy" msgid "Fuzzy strings (total: %s)"
msgstr "Ungeklärt" msgstr ""
#: pocheckerconsts.sgrapstatformcaption #: pocheckerconsts.sgrapstatformcaption
msgid "Graphical summary" msgid "Graphical summary"
@ -326,17 +330,39 @@ msgid "Original"
msgstr "Original" msgstr "Original"
#: pocheckerconsts.spercfuzzy #: pocheckerconsts.spercfuzzy
msgid "%s: %4.1f%% fuzzy strings." #, fuzzy
#| msgid "%s: %4.1f%% fuzzy strings."
msgid "%s: %5.1f%% fuzzy strings."
msgstr "%s: %4.1f%% ungeklärte Zeichenketten." msgstr "%s: %4.1f%% ungeklärte Zeichenketten."
#: pocheckerconsts.sperctranslated #: pocheckerconsts.sperctranslated
msgid "%s: %4.1f%% translated strings." #, fuzzy
#| msgid "%s: %4.1f%% translated strings."
msgid "%s: %5.1f%% translated strings."
msgstr "%s: %4.1f%% übersetzte Zeichenketten." msgstr "%s: %4.1f%% übersetzte Zeichenketten."
#: pocheckerconsts.spercuntranslated #: pocheckerconsts.spercuntranslated
msgid "%s: %4.1f%% untranslated strings." #, fuzzy
#| msgid "%s: %4.1f%% untranslated strings."
msgid "%s: %5.1f%% untranslated strings."
msgstr "%s: %4.1f%% nicht übersetzte Zeichenketten." msgstr "%s: %4.1f%% nicht übersetzte Zeichenketten."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Ergebnisse" msgstr "Ergebnisse"
@ -386,11 +412,17 @@ msgid "Show statistics graph"
msgstr "Zeige Statistik-Graphik" msgstr "Zeige Statistik-Graphik"
#: pocheckerconsts.sstathint #: pocheckerconsts.sstathint
#, fuzzy
#| msgid ""
#| "%3d Translated (%3.1f%%)\n"
#| "%3d UnTranslated (%3.1f%%)\n"
#| "%3d Fuzzy (%3.1f%%)\n"
#| "%d Error(s) in Selected Tests\n"
msgid "" msgid ""
"%3d Translated (%3.1f%%)\n" "Translated: %d (%.1f%%)\n"
"%3d UnTranslated (%3.1f%%)\n" "Untranslated: %d (%.1f%%)\n"
"%3d Fuzzy (%3.1f%%)\n" "Fuzzy: %d (%.1f%%)\n"
"%d Error(s) in Selected Tests\n" "Errors in selected tests: %d\n"
msgstr "" msgstr ""
"%3d übersetzt (%3.1f%%)\n" "%3d übersetzt (%3.1f%%)\n"
"%3d nicht übersetzt (%3.1f%%)\n" "%3d nicht übersetzt (%3.1f%%)\n"
@ -409,13 +441,25 @@ msgstr "Folgende %s verwaiste .po-Datei(en) gefunden:"
msgid "Total errors found: %d" msgid "Total errors found: %d"
msgstr "Insgesamt %d Fehler gefunden" msgstr "Insgesamt %d Fehler gefunden"
#: pocheckerconsts.stotalfuzzystrings
msgid "Total fuzzy strings: %s"
msgstr ""
#: pocheckerconsts.stotaltranslatedstrings
msgid "Total translated strings: %s (%.1f%%)"
msgstr ""
#: pocheckerconsts.stotaluntranslatedstrings
msgid "Total untranslated strings: %s"
msgstr ""
#: pocheckerconsts.stotalwarnings #: pocheckerconsts.stotalwarnings
msgid "Total warnings found: %d" msgid "Total warnings found: %d"
msgstr "Insgesamt %d Warnungen gefunden" msgstr "Insgesamt %d Warnungen gefunden"
#: pocheckerconsts.stranslated #: pocheckerconsts.stranslatedstringstotal
msgid "Translated" msgid "Translated strings (total: %s [%.1f%%])"
msgstr "Übersetzt" msgstr ""
#: pocheckerconsts.stranslation #: pocheckerconsts.stranslation
msgid "Translation" msgid "Translation"
@ -437,6 +481,7 @@ msgstr "Alle abwählen"
msgid "Unselect all files" msgid "Unselect all files"
msgstr "Alle Dateien abwählen" msgstr "Alle Dateien abwählen"
#: pocheckerconsts.suntranslated #: pocheckerconsts.suntranslatedstringstotal
msgid "Untranslated" msgid "Untranslated strings (total: %s)"
msgstr "Nicht übersetzt" msgstr ""

View File

@ -129,6 +129,10 @@ msgstr ""
"para el archivo seleccionado\n" "para el archivo seleccionado\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Compruebe valores duplicados sin traducir" msgstr "Compruebe valores duplicados sin traducir"
@ -341,6 +345,22 @@ msgstr "%s: %4.1f%% de cadenas traducidas."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "%s: %4.1f%% de cadenas sin traducir." msgstr "%s: %4.1f%% de cadenas sin traducir."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Resultados" msgstr "Resultados"

View File

@ -131,6 +131,10 @@ msgstr ""
"pour le fichier sélectionné\n" "pour le fichier sélectionné\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Vérifier les doublons de valeurs non traduites" msgstr "Vérifier les doublons de valeurs non traduites"
@ -343,6 +347,22 @@ msgstr "%s : %4.1f%% chaînes traduites."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "%s : %4.1f%% chaînes non traduites." msgstr "%s : %4.1f%% chaînes non traduites."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Résultats" msgstr "Résultats"

View File

@ -131,6 +131,10 @@ msgstr ""
"a kiválasztott fájlhoz:\n" "a kiválasztott fájlhoz:\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Lefordítatlan szövegek ismétlődésének ellenőrzése" msgstr "Lefordítatlan szövegek ismétlődésének ellenőrzése"
@ -343,6 +347,22 @@ msgstr "%s: %4.1f%% lefordított szöveg."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "%s: %4.1f%% lefordítatlan szöveg." msgstr "%s: %4.1f%% lefordítatlan szöveg."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Eredmények" msgstr "Eredmények"

View File

@ -133,6 +133,10 @@ msgstr ""
"per il file scelto\n" "per il file scelto\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Verifica valori duplicati non tradotti" msgstr "Verifica valori duplicati non tradotti"
@ -345,6 +349,22 @@ msgstr "%s: %4.1f%% stringhe tradotte."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "%s: %4.1f%% stringhe non tradotte." msgstr "%s: %4.1f%% stringhe non tradotte."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Risultati" msgstr "Risultati"

View File

@ -131,6 +131,10 @@ msgstr ""
"に対する po ファイルの原本が見つかりません\n" "に対する po ファイルの原本が見つかりません\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "原文のままで翻訳されていない項目の検査" msgstr "原文のままで翻訳されていない項目の検査"
@ -335,6 +339,22 @@ msgstr "翻訳された文字列:%2.0f%%"
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "未翻訳文字列:%2.0f%%" msgstr "未翻訳文字列:%2.0f%%"
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "結果" msgstr "結果"

View File

@ -131,6 +131,10 @@ msgstr ""
"parinktam failui\n" "parinktam failui\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Ieškoti neverstų besidubliuojančių verčių" msgstr "Ieškoti neverstų besidubliuojančių verčių"
@ -331,6 +335,22 @@ msgstr ""
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "" msgstr ""
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Rezultatai" msgstr "Rezultatai"

View File

@ -117,6 +117,10 @@ msgid ""
"%s\n" "%s\n"
msgstr "" msgstr ""
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "" msgstr ""
@ -310,6 +314,22 @@ msgstr ""
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "" msgstr ""
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "" msgstr ""

View File

@ -130,6 +130,10 @@ msgstr ""
"para o arquivo selecionado\n" "para o arquivo selecionado\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Verificar valores não traduzidos duplicados" msgstr "Verificar valores não traduzidos duplicados"
@ -328,6 +332,22 @@ msgstr ""
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "" msgstr ""
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Resultados" msgstr "Resultados"

View File

@ -131,6 +131,10 @@ msgstr ""
"для выбранного файла\n" "для выбранного файла\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr "Невозможно записать файл%s%s%s%sВы можете нажать \"Повтор\", чтобы снова попытаться обновить это семейство переводов и продолжить далее."
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Поиск дублирующихся непереведённых строк" msgstr "Поиск дублирующихся непереведённых строк"
@ -337,6 +341,22 @@ msgstr "%s: %5.1f%% переведённых строк."
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "%s: %5.1f%% непереведённых строк." msgstr "%s: %5.1f%% непереведённых строк."
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr "Обработка семейства переводов..."
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr "Обработка семейства переводов %s из %s"
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr "Обновить все семейства переводов"
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr "Обновить текущее семейство переводов"
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Результаты" msgstr "Результаты"

View File

@ -128,6 +128,10 @@ msgstr ""
"для вибраного файлу\n" "для вибраного файлу\n"
"%s\n" "%s\n"
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
#: pocheckerconsts.scheckforduplicateuntranslatedvalues #: pocheckerconsts.scheckforduplicateuntranslatedvalues
msgid "Check for duplicate untranslated values" msgid "Check for duplicate untranslated values"
msgstr "Перевірити на повторні неперекладені записи" msgstr "Перевірити на повторні неперекладені записи"
@ -328,6 +332,22 @@ msgstr ""
msgid "%s: %5.1f%% untranslated strings." msgid "%s: %5.1f%% untranslated strings."
msgstr "" msgstr ""
#: pocheckerconsts.sprocessingtranslationfamily
msgid "Processing translation family..."
msgstr ""
#: pocheckerconsts.sprocessingtranslationfamilyof
msgid "Processing translation family %s of %s"
msgstr ""
#: pocheckerconsts.srefreshalltranslationfamilies
msgid "Refresh all translation families"
msgstr ""
#: pocheckerconsts.srefreshcurrenttranslationfamily
msgid "Refresh current translation family"
msgstr ""
#: pocheckerconsts.sresults #: pocheckerconsts.sresults
msgid "Results" msgid "Results"
msgstr "Результати" msgstr "Результати"

View File

@ -61,6 +61,13 @@ resourcestring
sOpenFileInSystemPOEditor = 'Open file in system PO editor'; sOpenFileInSystemPOEditor = 'Open file in system PO editor';
sOpenFileInExternalEditor = 'Open file in external editor'; sOpenFileInExternalEditor = 'Open file in external editor';
sOpenFileInIDEEditor = 'Open file in IDE editor'; sOpenFileInIDEEditor = 'Open file in IDE editor';
sRefreshCurrentTranslationFamily = 'Refresh current translation family';
sRefreshAllTranslationFamilies = 'Refresh all translation families';
sProcessingTranslationFamilyOf = 'Processing translation family %s of %s';
sProcessingTranslationFamily = 'Processing translation family...';
sCannotWriteFileYouCanPressRetryToRefreshThisTransl = 'Cannot write file%'
+'s%s%s%sYou can press "Retry" to refresh this translation family again and '
+'continue.';
//PoFamiles //PoFamiles
sOriginal = 'Original'; sOriginal = 'Original';

View File

@ -625,9 +625,15 @@ begin
ResultDlg.Log.Assign(SL); ResultDlg.Log.Assign(SL);
FreeAndNil(SL); //No need to keep 2 copies of this data FreeAndNil(SL); //No need to keep 2 copies of this data
if (pttCheckStatistics in TestTypes) then if (pttCheckStatistics in TestTypes) then
ResultDlg.PoFamilyStats := PoFamilyList.PoFamilyStats begin
ResultDlg.PoFamilyList := PoFamilyList;
ResultDlg.PoFamilyStats := PoFamilyList.PoFamilyStats;
end
else else
begin
ResultDlg.PoFamilyList := nil;
ResultDlg.PoFamilyStats := nil; ResultDlg.PoFamilyStats := nil;
end;
ResultDlg.Settings := FPoCheckerSettings; ResultDlg.Settings := FPoCheckerSettings;
mr := ResultDlg.ShowModal; mr := ResultDlg.ShowModal;
finally finally

View File

@ -7,7 +7,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
ExtCtrls, Buttons, ClipBrd, LCLType, LCLProc, SynEdit, SynHighlighterPo, ExtCtrls, Buttons, ClipBrd, LCLType, LCLProc, SynEdit, SynHighlighterPo,
PoFamilies, GraphStat, PoCheckerConsts, PoCheckerSettings; PoFamilies, PoFamilyLists, GraphStat, PoCheckerConsts, PoCheckerSettings;
type type
@ -32,6 +32,7 @@ type
procedure SaveBtnClick(Sender: TObject); procedure SaveBtnClick(Sender: TObject);
private private
PoHL: TSynPoSyn; PoHL: TSynPoSyn;
FPoFamilyList: TPoFamilyList;
FPoFamilyStats: TPoFamilyStats; FPoFamilyStats: TPoFamilyStats;
FSettings: TPoCheckerSettings; FSettings: TPoCheckerSettings;
procedure SaveToFile; procedure SaveToFile;
@ -45,6 +46,7 @@ type
FTotalFuzzy: Integer; FTotalFuzzy: Integer;
FTotalPercTranslated: Double; FTotalPercTranslated: Double;
property Log: TStringList read FLog write FLog; property Log: TStringList read FLog write FLog;
property PoFamilyList: TPoFamilyList read FPoFamilyList write FPoFamilyList;
property PoFamilyStats: TPoFamilyStats read FPoFamilyStats write FPoFamilyStats; property PoFamilyStats: TPoFamilyStats read FPoFamilyStats write FPoFamilyStats;
property Settings: TPoCheckerSettings read FSettings write FSettings; property Settings: TPoCheckerSettings read FSettings write FSettings;
end; end;
@ -114,6 +116,7 @@ var
begin begin
GraphStatForm := TGraphStatForm.Create(nil); GraphStatForm := TGraphStatForm.Create(nil);
try try
GraphStatForm.PoFamilyList := Self.PoFamilyList;
GraphStatForm.PoFamilyStats := Self.PoFamilyStats; GraphStatForm.PoFamilyStats := Self.PoFamilyStats;
GraphStatForm.Settings := Self.Settings; GraphStatForm.Settings := Self.Settings;