mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 20:20:36 +02:00
PoChecker: refactor.
- Drop the listbox for translated po-files - Now possible to test multiple master po-files - Language filter controls setting of "Find All Translated PoFiles" - Regenerated language files. git-svn-id: trunk@46475 -
This commit is contained in:
parent
dd86099d37
commit
7c9f2ba5c3
@ -69,7 +69,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="8">
|
<Units Count="9">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="pochecker.lpr"/>
|
<Filename Value="pochecker.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -118,6 +118,11 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="PoCheckerSettings"/>
|
<UnitName Value="PoCheckerSettings"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
|
<Unit8>
|
||||||
|
<Filename Value="..\pofamilylists.pp"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="PoFamilyLists"/>
|
||||||
|
</Unit8>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -8,7 +8,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, pocheckermain, pofamilies, resultdlg, simplepofiles, pocheckerconsts,
|
Forms, pocheckermain, pofamilies, resultdlg, simplepofiles, pocheckerconsts,
|
||||||
graphstat, pocheckersettings;
|
graphstat, pocheckersettings, pofamilylists;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
@ -99,9 +99,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Chyby / varování nahlášené %s pro:"
|
msgstr "Chyby / varování nahlášené %s pro:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Najít všechny přeložené po soubory"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -144,15 +146,9 @@ msgstr "Identifikátor [%s] nalezen v %s, ale neexistuje v %s"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Žádné chyby nenalezeny"
|
msgstr "Žádné chyby nenalezeny"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vybraný název souboru\n"
|
|
||||||
"%s\n"
|
|
||||||
"nevypadá jako korektní jméno po souboru\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -72,8 +72,7 @@ msgstr "[Zeile %d] %s"
|
|||||||
|
|
||||||
#: pocheckerconsts.sduplicateoriginals
|
#: pocheckerconsts.sduplicateoriginals
|
||||||
msgid "The (untranslated) value \"%s\" is used for more than 1 entry:"
|
msgid "The (untranslated) value \"%s\" is used for more than 1 entry:"
|
||||||
msgstr ""
|
msgstr "Der (nicht übersetzte) Wert \"%s\" wird für mehr als 1 Eintrag verwendet:"
|
||||||
"Der (nicht übersetzte) Wert \"%s\" wird für mehr als 1 Eintrag verwendet:"
|
|
||||||
|
|
||||||
#: pocheckerconsts.serroroncleanup
|
#: pocheckerconsts.serroroncleanup
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -97,9 +96,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Fehler / Warnungen gemeldet von %s für:"
|
msgstr "Fehler / Warnungen gemeldet von %s für:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Alle übersetzten po-Dateien finden"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,16 +142,9 @@ msgstr "Bezeichner [%s] gefunden in %s, aber er existiert nicht in %s"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Keine Fehler gefunden"
|
msgstr "Keine Fehler gefunden"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Gewählter Dateiname\n"
|
|
||||||
"%s\n"
|
|
||||||
"sieht nicht wie ein geeigneter Name für eine po-file\n"
|
|
||||||
" aus\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
@ -325,3 +319,4 @@ msgstr "Abwählen"
|
|||||||
#: pocheckerconsts.suntranslated
|
#: pocheckerconsts.suntranslated
|
||||||
msgid "Untranslated"
|
msgid "Untranslated"
|
||||||
msgstr "Nicht übersetzt"
|
msgstr "Nicht übersetzt"
|
||||||
|
|
||||||
|
@ -95,9 +95,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Errores / advertencias reportadas por %s para:"
|
msgstr "Errores / advertencias reportadas por %s para:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Encontrar todos los archivos PO traducidos"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,15 +143,9 @@ msgstr "Identificador [%s] se encuentra en %s, pero no existe en %s"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "No se encontraron errores"
|
msgstr "No se encontraron errores"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Seleccionado archivo\n"
|
|
||||||
"%s\n"
|
|
||||||
"no parece ser un nombre apropiado para un archivo po\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -97,9 +97,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "A(z) %s hibákat / figyelmeztetéseket jelzett ezzel kapcsolatban:"
|
msgstr "A(z) %s hibákat / figyelmeztetéseket jelzett ezzel kapcsolatban:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Az összes lefordított po-fájl megkeresése"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,15 +143,9 @@ msgstr "A(z) [%s] azonosító megtalálható itt: %s, de nem található meg itt
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Nincsenek hibák"
|
msgstr "Nincsenek hibák"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"A választott fájlnév\n"
|
|
||||||
"%s\n"
|
|
||||||
"nem tűnik megfelelő névnek egy po-fájl számára\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -97,9 +97,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Errori / avvertimenti riportati da %s per:"
|
msgstr "Errori / avvertimenti riportati da %s per:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Trova tutti i file po tradotti"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,15 +143,9 @@ msgstr "Identificatore [%s] trovato in %s, ma inesistente in %s"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Nessun errore riscontrato"
|
msgstr "Nessun errore riscontrato"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Il nome selezionato\n"
|
|
||||||
"%s\n"
|
|
||||||
"non sembra un nome corretto per un file po\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -97,9 +97,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "以下のファイルに対する %s によるエラー/警告の結果:"
|
msgstr "以下のファイルに対する %s によるエラー/警告の結果:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "翻訳されたすべての po ファイルを検査する"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,15 +143,9 @@ msgstr "識別子 [%s] が %s 内で見つかりましたが、%s 内には存
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "エラーはありません"
|
msgstr "エラーはありません"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"選択されたファイル\n"
|
|
||||||
"%s\n"
|
|
||||||
"は、適切な po ファイル名ではないようです\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -97,9 +97,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "%s praneštos klaidos/perspėjimai apie:"
|
msgstr "%s praneštos klaidos/perspėjimai apie:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Rasti visus išverstus PO failus"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -143,15 +145,9 @@ msgstr "Identifikatorių [%s] turi „%s“, tačiau jo neturi „%s“"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Klaidų nerasta"
|
msgstr "Klaidų nerasta"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Parinktas failo pavadinimas\n"
|
|
||||||
"%s\n"
|
|
||||||
"nepanašu kad tai būtų tinkamas pavadinimas PO failui\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -78,8 +78,10 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
@ -122,11 +124,8 @@ msgstr ""
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
|
@ -96,9 +96,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Erros / avisos reportados por %s para:"
|
msgstr "Erros / avisos reportados por %s para:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Localizar todos os arquivos po traduzidos"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -141,15 +143,9 @@ msgstr "Identificador [%s] encontrado em %s, mas inexistente em %s"
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Nenhum erro encontrado"
|
msgstr "Nenhum erro encontrado"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nome de arquivo selecionado\n"
|
|
||||||
"%s\n"
|
|
||||||
"parece não ser um nome apropriado para um arquivo PO\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -95,9 +95,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Ошибки и предупреждения, найденные %s для:"
|
msgstr "Ошибки и предупреждения, найденные %s для:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Найти все переведённые файлы PO"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -140,15 +142,9 @@ msgstr "Идентификатор [%s] найден в %s, но отсутст
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Ошибок не найдено"
|
msgstr "Ошибок не найдено"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Выбранное имя файла\n"
|
|
||||||
"%s\n"
|
|
||||||
"не выглядит корректно для файла PO\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -94,9 +94,11 @@ msgstr ""
|
|||||||
msgid "Errors / warnings reported by %s for:"
|
msgid "Errors / warnings reported by %s for:"
|
||||||
msgstr "Помилки / попередження звітовані %s для:"
|
msgstr "Помилки / попередження звітовані %s для:"
|
||||||
|
|
||||||
#: pocheckerconsts.sfindalltranslatedpofiles
|
#: pocheckerconsts.sfilesnotfoundandremoved
|
||||||
msgid "Find all translated po-files"
|
msgid ""
|
||||||
msgstr "Знайти всі перекладені po-файли"
|
"The follwing files were not foud and removed from the list:\n"
|
||||||
|
"%s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: pocheckerconsts.sfuzzy
|
#: pocheckerconsts.sfuzzy
|
||||||
msgid "Fuzzy"
|
msgid "Fuzzy"
|
||||||
@ -140,15 +142,9 @@ msgstr "Ідентифікатор [%s] знайдений в %s, але він
|
|||||||
msgid "No errors found"
|
msgid "No errors found"
|
||||||
msgstr "Помилки не знайдені"
|
msgstr "Помилки не знайдені"
|
||||||
|
|
||||||
#: pocheckerconsts.snotaproperfilename
|
#: pocheckerconsts.snofileslefttocheck
|
||||||
msgid ""
|
msgid "There are no files left to check."
|
||||||
"Selected filename\n"
|
|
||||||
"%s\n"
|
|
||||||
"does not seem to be a proper name for a po-file\n"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Вибраний файл\n"
|
|
||||||
"%s\n"
|
|
||||||
"схоже не є вірним іменем для po-файлу\n"
|
|
||||||
|
|
||||||
#: pocheckerconsts.snotestselected
|
#: pocheckerconsts.snotestselected
|
||||||
msgid "There are no tests selected."
|
msgid "There are no tests selected."
|
||||||
|
@ -21,7 +21,9 @@ resourcestring
|
|||||||
sUnselectListBox = 'Unselect';
|
sUnselectListBox = 'Unselect';
|
||||||
sAllLanguages = 'All Languages';
|
sAllLanguages = 'All Languages';
|
||||||
sCannotFindMaster = 'Cannot find master po file:' + LineEnding + '%s' + LineEnding + 'for selected file' + LineEnding + '%s';
|
sCannotFindMaster = 'Cannot find master po file:' + LineEnding + '%s' + LineEnding + 'for selected file' + LineEnding + '%s';
|
||||||
sNotAProperFileName = 'Selected filename' + LineEnding + '%s' + LineEnding + 'does not seem to be a proper name for a po-file';
|
//sNotAProperFileName = 'Selected filename' + LineEnding + '%s' + LineEnding + 'does not seem to be a proper name for a po-file';
|
||||||
|
sFilesNotFoundAndRemoved = 'The follwing files were not foud and removed from the list:' + LineEnding + '%s';
|
||||||
|
sNoFilesLeftToCheck = 'There are no files left to check.';
|
||||||
sErrorOnCreate = 'Error creating an instance of TPoFamily:' + LineEnding + '%s';
|
sErrorOnCreate = 'Error creating an instance of TPoFamily:' + LineEnding + '%s';
|
||||||
sErrorOnCleanup = 'An unrecoverable error occurred' + LineEnding + '%s' + LineEnding + 'Please close the program';
|
sErrorOnCleanup = 'An unrecoverable error occurred' + LineEnding + '%s' + LineEnding + 'Please close the program';
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ resourcestring
|
|||||||
sCheckForDuplicateUntranslatedValues = 'Check for duplicate untranslated '
|
sCheckForDuplicateUntranslatedValues = 'Check for duplicate untranslated '
|
||||||
+'values';
|
+'values';
|
||||||
sCheckStatistics = 'Check percentage of (un)translated and fuzzy strings';
|
sCheckStatistics = 'Check percentage of (un)translated and fuzzy strings';
|
||||||
sFindAllTranslatedPoFiles = 'Find all translated po-files';
|
//sFindAllTranslatedPoFiles = 'Find all translated po-files';
|
||||||
sIgnoreFuzzyTranslations = 'Ignore translated strings marked as "fuzzy"';
|
sIgnoreFuzzyTranslations = 'Ignore translated strings marked as "fuzzy"';
|
||||||
sIncompatibleFormatArgs = '[Line: %d] Incompatible and/or invalid format() arguments for:' ;
|
sIncompatibleFormatArgs = '[Line: %d] Incompatible and/or invalid format() arguments for:' ;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
object PoCheckerForm: TPoCheckerForm
|
object PoCheckerForm: TPoCheckerForm
|
||||||
Left = 318
|
Left = 318
|
||||||
Height = 514
|
Height = 513
|
||||||
Top = 163
|
Top = 163
|
||||||
Width = 644
|
Width = 644
|
||||||
Anchors = []
|
Anchors = []
|
||||||
Caption = 'GUI Po-file checking tool'
|
Caption = 'GUI Po-file checking tool'
|
||||||
ClientHeight = 514
|
ClientHeight = 513
|
||||||
ClientWidth = 644
|
ClientWidth = 644
|
||||||
Constraints.MinHeight = 450
|
Constraints.MinHeight = 450
|
||||||
Constraints.MinWidth = 600
|
Constraints.MinWidth = 600
|
||||||
@ -123,7 +123,7 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
object NoErrLabel: TLabel
|
object NoErrLabel: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 452
|
Top = 451
|
||||||
Width = 146
|
Width = 146
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'No errors found'
|
Caption = 'No errors found'
|
||||||
@ -133,18 +133,6 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object FindAllPOsCheckBox: TCheckBox
|
|
||||||
AnchorSideLeft.Control = TestListBox
|
|
||||||
AnchorSideTop.Control = SelectBasicBtn
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 201
|
|
||||||
Height = 19
|
|
||||||
Top = 184
|
|
||||||
Width = 156
|
|
||||||
BorderSpacing.Top = 6
|
|
||||||
Caption = 'Find all translated PO files'
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object SelectBasicBtn: TButton
|
object SelectBasicBtn: TButton
|
||||||
AnchorSideLeft.Control = TestListBox
|
AnchorSideLeft.Control = TestListBox
|
||||||
AnchorSideTop.Control = TestListBox
|
AnchorSideTop.Control = TestListBox
|
||||||
@ -157,7 +145,7 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
Caption = 'Select Basic Tests'
|
Caption = 'Select Basic Tests'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = SelectBasicBtnClick
|
OnClick = SelectBasicBtnClick
|
||||||
TabOrder = 4
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object SelectAllBtn: TButton
|
object SelectAllBtn: TButton
|
||||||
AnchorSideLeft.Control = SelectBasicBtn
|
AnchorSideLeft.Control = SelectBasicBtn
|
||||||
@ -171,7 +159,7 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
Caption = 'Select All Tests'
|
Caption = 'Select All Tests'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = SelectAllBtnClick
|
OnClick = SelectAllBtnClick
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object UnselectAllBtn: TButton
|
object UnselectAllBtn: TButton
|
||||||
AnchorSideLeft.Control = SelectAllBtn
|
AnchorSideLeft.Control = SelectAllBtn
|
||||||
@ -185,24 +173,24 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
Caption = 'Unselect All Tests'
|
Caption = 'Unselect All Tests'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = UnselectAllBtnClick
|
OnClick = UnselectAllBtnClick
|
||||||
TabOrder = 6
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object IgnoreFuzzyCheckBox: TCheckBox
|
object IgnoreFuzzyCheckBox: TCheckBox
|
||||||
AnchorSideLeft.Control = TestListBox
|
AnchorSideLeft.Control = TestListBox
|
||||||
AnchorSideTop.Control = FindAllPOsCheckBox
|
AnchorSideTop.Control = SelectBasicBtn
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 201
|
Left = 201
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 209
|
Top = 184
|
||||||
Width = 152
|
Width = 152
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'sIgnoreFuzzyTranslations'
|
Caption = 'sIgnoreFuzzyTranslations'
|
||||||
TabOrder = 7
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object StatusBar: TStatusBar
|
object StatusBar: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 491
|
Top = 490
|
||||||
Width = 644
|
Width = 644
|
||||||
Panels = <>
|
Panels = <>
|
||||||
end
|
end
|
||||||
@ -257,58 +245,39 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
OnClick = ScanDirBtnClick
|
OnClick = ScanDirBtnClick
|
||||||
TabOrder = 9
|
TabOrder = 8
|
||||||
end
|
end
|
||||||
object MasterPoListBox: TListBox
|
object MasterPoListBox: TListBox
|
||||||
AnchorSideTop.Control = IgnoreFuzzyCheckBox
|
AnchorSideTop.Control = IgnoreFuzzyCheckBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = TestListBox
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = NoErrLabel
|
AnchorSideBottom.Control = NoErrLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 184
|
Height = 185
|
||||||
Top = 233
|
Top = 208
|
||||||
Width = 272
|
Width = 629
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 5
|
||||||
BorderSpacing.Bottom = 35
|
BorderSpacing.Bottom = 58
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
|
MultiSelect = True
|
||||||
OnDrawItem = MasterPoListBoxDrawItem
|
OnDrawItem = MasterPoListBoxDrawItem
|
||||||
|
OnResize = MasterPoListBoxResize
|
||||||
OnSelectionChange = MasterPoListBoxSelectionChange
|
OnSelectionChange = MasterPoListBoxSelectionChange
|
||||||
Sorted = True
|
Sorted = True
|
||||||
Style = lbOwnerDrawFixed
|
Style = lbOwnerDrawFixed
|
||||||
TabOrder = 10
|
TabOrder = 9
|
||||||
end
|
|
||||||
object ChildPoListBox: TListBox
|
|
||||||
AnchorSideLeft.Control = MasterPoListBox
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideTop.Control = MasterPoListBox
|
|
||||||
AnchorSideRight.Control = TestListBox
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = ClearChildBtn
|
|
||||||
Left = 290
|
|
||||||
Height = 154
|
|
||||||
Top = 233
|
|
||||||
Width = 347
|
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
|
||||||
BorderSpacing.Left = 10
|
|
||||||
BorderSpacing.Bottom = 40
|
|
||||||
ItemHeight = 0
|
|
||||||
OnDrawItem = MasterPoListBoxDrawItem
|
|
||||||
OnResize = ChildPoListBoxResize
|
|
||||||
OnSelectionChange = ChildPoListBoxSelectionChange
|
|
||||||
Style = lbOwnerDrawFixed
|
|
||||||
TabOrder = 11
|
|
||||||
end
|
end
|
||||||
object LangFilter: TComboBox
|
object LangFilter: TComboBox
|
||||||
AnchorSideLeft.Control = ChildPoListBox
|
AnchorSideLeft.Control = MasterPoListBox
|
||||||
AnchorSideTop.Control = ChildPoListBox
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = TestListBox
|
AnchorSideRight.Control = TestListBox
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ClearChildBtn
|
Left = 8
|
||||||
Left = 290
|
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 396
|
Top = 400
|
||||||
Width = 347
|
Width = 629
|
||||||
Anchors = [akLeft, akRight]
|
Anchors = [akLeft, akRight]
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 5
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -340,7 +309,7 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
)
|
)
|
||||||
OnChange = LangFilterChange
|
OnChange = LangFilterChange
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 12
|
TabOrder = 10
|
||||||
Text = 'All languages'
|
Text = 'All languages'
|
||||||
end
|
end
|
||||||
object ClearMasterBtn: TButton
|
object ClearMasterBtn: TButton
|
||||||
@ -350,13 +319,13 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
AnchorSideBottom.Control = NoErrLabel
|
AnchorSideBottom.Control = NoErrLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 427
|
Top = 426
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
Caption = 'Clear'
|
Caption = 'Clear'
|
||||||
OnClick = ClearMasterBtnClick
|
OnClick = ClearMasterBtnClick
|
||||||
TabOrder = 13
|
TabOrder = 11
|
||||||
end
|
end
|
||||||
object UnselectMasterBtn: TButton
|
object UnselectMasterBtn: TButton
|
||||||
AnchorSideLeft.Control = ClearMasterBtn
|
AnchorSideLeft.Control = ClearMasterBtn
|
||||||
@ -364,41 +333,14 @@ object PoCheckerForm: TPoCheckerForm
|
|||||||
AnchorSideBottom.Control = NoErrLabel
|
AnchorSideBottom.Control = NoErrLabel
|
||||||
Left = 93
|
Left = 93
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 427
|
Top = 426
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Left = 10
|
BorderSpacing.Left = 10
|
||||||
Caption = 'Unselect'
|
Caption = 'Unselect'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnClick = UnselectMasterBtnClick
|
OnClick = UnselectMasterBtnClick
|
||||||
TabOrder = 14
|
TabOrder = 12
|
||||||
end
|
|
||||||
object ClearChildBtn: TButton
|
|
||||||
AnchorSideLeft.Control = ChildPoListBox
|
|
||||||
AnchorSideBottom.Control = NoErrLabel
|
|
||||||
Left = 290
|
|
||||||
Height = 25
|
|
||||||
Top = 427
|
|
||||||
Width = 75
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
Caption = 'Clear'
|
|
||||||
OnClick = ClearChildBtnClick
|
|
||||||
TabOrder = 15
|
|
||||||
end
|
|
||||||
object UnselectChildBtn: TButton
|
|
||||||
AnchorSideLeft.Control = ClearChildBtn
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = NoErrLabel
|
|
||||||
Left = 375
|
|
||||||
Height = 25
|
|
||||||
Top = 427
|
|
||||||
Width = 75
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
BorderSpacing.Left = 10
|
|
||||||
Caption = 'Unselect'
|
|
||||||
Enabled = False
|
|
||||||
OnClick = UnselectChildBtnClick
|
|
||||||
TabOrder = 16
|
|
||||||
end
|
end
|
||||||
object OpenDialog: TOpenDialog
|
object OpenDialog: TOpenDialog
|
||||||
Filter = 'po-files (*.po)|*.po|all files|*'
|
Filter = 'po-files (*.po)|*.po|all files|*'
|
||||||
|
@ -25,14 +25,15 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, LCLProc, CheckLst, Buttons, ExtCtrls, ComCtrls, Masks, Types,
|
StdCtrls, LCLProc, CheckLst, Buttons, ExtCtrls, ComCtrls, Types,
|
||||||
LCLType,
|
LCLType,
|
||||||
{$IFDEF POCHECKERSTANDALONE}
|
{$IFDEF POCHECKERSTANDALONE}
|
||||||
Translations,
|
Translations,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
IDEIntf, MenuIntf,
|
IDEIntf, MenuIntf,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SimplePoFiles, PoFamilies, ResultDlg, pocheckerconsts, PoCheckerSettings;
|
SimplePoFiles, PoFamilies, ResultDlg, pocheckerconsts, PoCheckerSettings,
|
||||||
|
PoFamilyLists;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -40,18 +41,13 @@ type
|
|||||||
|
|
||||||
TPoCheckerForm = class(TForm)
|
TPoCheckerForm = class(TForm)
|
||||||
SelectDirectoryDialog: TSelectDirectoryDialog;
|
SelectDirectoryDialog: TSelectDirectoryDialog;
|
||||||
UnselectChildBtn: TButton;
|
|
||||||
ClearChildBtn: TButton;
|
|
||||||
UnselectMasterBtn: TButton;
|
UnselectMasterBtn: TButton;
|
||||||
ClearMasterBtn: TButton;
|
ClearMasterBtn: TButton;
|
||||||
LangFilter: TComboBox;
|
LangFilter: TComboBox;
|
||||||
ChildPoListBox: TListBox;
|
|
||||||
MasterPoListBox: TListBox;
|
MasterPoListBox: TListBox;
|
||||||
ScanDirBtn: TBitBtn;
|
ScanDirBtn: TBitBtn;
|
||||||
StatusBar: TStatusBar;
|
StatusBar: TStatusBar;
|
||||||
procedure ChildPoListBoxResize(Sender: TObject);
|
procedure MasterPoListBoxResize(Sender: TObject);
|
||||||
procedure ChildPoListBoxSelectionChange(Sender: TObject; User: boolean);
|
|
||||||
procedure ClearChildBtnClick(Sender: TObject);
|
|
||||||
procedure ClearMasterBtnClick(Sender: TObject);
|
procedure ClearMasterBtnClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure LangFilterChange(Sender: TObject);
|
procedure LangFilterChange(Sender: TObject);
|
||||||
@ -62,10 +58,9 @@ type
|
|||||||
procedure UnselectChildBtnClick(Sender: TObject);
|
procedure UnselectChildBtnClick(Sender: TObject);
|
||||||
procedure UnselectMasterBtnClick(Sender: TObject);
|
procedure UnselectMasterBtnClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
PoFamily: TPoFamily;
|
//PoFamily: TPoFamily;
|
||||||
FSelectedPoName: String;
|
PoFamilyList: TPoFamilyList;
|
||||||
FPoCheckerSettings: TPoCheckerSettings;
|
FPoCheckerSettings: TPoCheckerSettings;
|
||||||
FChildPoList: TStringList;
|
|
||||||
procedure OnTestStart(const ATestName, APoFileName: string);
|
procedure OnTestStart(const ATestName, APoFileName: string);
|
||||||
procedure OnTestEnd(const {%H-}ATestName: string; const {%H-}ErrorCount: integer);
|
procedure OnTestEnd(const {%H-}ATestName: string; const {%H-}ErrorCount: integer);
|
||||||
procedure FillTestListBox;
|
procedure FillTestListBox;
|
||||||
@ -76,14 +71,14 @@ type
|
|||||||
procedure ShowError(const Msg: string);
|
procedure ShowError(const Msg: string);
|
||||||
function TrySelectFile(out Filename: String): Boolean;
|
function TrySelectFile(out Filename: String): Boolean;
|
||||||
procedure ScanDirectory(ADir: String);
|
procedure ScanDirectory(ADir: String);
|
||||||
function TryCreatePoFamily(Filename: String): Boolean;
|
function TryCreatepoFamilyList(MasterList: TStrings; const Lang: String): Boolean;
|
||||||
procedure RunSelectedTests;
|
procedure RunSelectedTests;
|
||||||
procedure ClearStatusBar;
|
procedure ClearStatusBar;
|
||||||
procedure SetSelectedPoName(AFilename: String);
|
procedure UpdateGUI(HasSelection: Boolean);
|
||||||
|
function GetSelectedMasterFiles: TStringList;
|
||||||
procedure AddToMasterPoList(Fn: String);
|
procedure AddToMasterPoList(Fn: String);
|
||||||
procedure AddToMasterPoList(S: TStrings);
|
procedure AddToMasterPoList(S: TStrings);
|
||||||
procedure AddToChildPoList(Fn: String);
|
procedure SetSelectedMasterFiles(S: TStrings);
|
||||||
procedure AddToChildPoList(S: TStrings);
|
|
||||||
procedure LoadConfig;
|
procedure LoadConfig;
|
||||||
procedure SaveConfig;
|
procedure SaveConfig;
|
||||||
published
|
published
|
||||||
@ -91,7 +86,6 @@ type
|
|||||||
UnselectAllBtn: TButton;
|
UnselectAllBtn: TButton;
|
||||||
SelectAllBtn: TButton;
|
SelectAllBtn: TButton;
|
||||||
SelectBasicBtn: TButton;
|
SelectBasicBtn: TButton;
|
||||||
FindAllPOsCheckBox: TCheckBox;
|
|
||||||
NoErrLabel: TLabel;
|
NoErrLabel: TLabel;
|
||||||
RunBtn: TBitBtn;
|
RunBtn: TBitBtn;
|
||||||
OpenBtn: TBitBtn;
|
OpenBtn: TBitBtn;
|
||||||
@ -152,20 +146,15 @@ begin
|
|||||||
'lclstrconsts.' + Lang + '.po');
|
'lclstrconsts.' + Lang + '.po');
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
FChildPoList := TStringList.Create;
|
|
||||||
FChildPoList.Sorted := True;
|
|
||||||
FChildPoList.Duplicates := dupIgnore;
|
|
||||||
Caption := sGUIPoFileCheckingTool;
|
Caption := sGUIPoFileCheckingTool;
|
||||||
SelectTestLabel.Caption := sSelectTestTypes;
|
SelectTestLabel.Caption := sSelectTestTypes;
|
||||||
FindAllPOsCheckBox.Caption := sFindAllTranslatedPoFiles;
|
//FindAllPOsCheckBox.Caption := sFindAllTranslatedPoFiles;
|
||||||
IgnoreFuzzyCheckBox.Caption := sIgnoreFuzzyTranslations;
|
IgnoreFuzzyCheckBox.Caption := sIgnoreFuzzyTranslations;
|
||||||
OpenBtn.Caption := sOpenAPoFile;
|
OpenBtn.Caption := sOpenAPoFile;
|
||||||
ScanDirBtn.Caption := sScanDir;
|
ScanDirBtn.Caption := sScanDir;
|
||||||
RunBtn.Caption := sRunSelectedTests;
|
RunBtn.Caption := sRunSelectedTests;
|
||||||
ClearMasterBtn.Caption := sClearListBox;
|
ClearMasterBtn.Caption := sClearListBox;
|
||||||
ClearChildBtn.Caption := sClearListBox;
|
|
||||||
UnselectMasterBtn.Caption := sUnselectListBox;
|
UnselectMasterBtn.Caption := sUnselectListBox;
|
||||||
UnselectChildBtn.Caption := sUnselectListBox;
|
|
||||||
LangFilter.Items[0] := sAllLanguages;
|
LangFilter.Items[0] := sAllLanguages;
|
||||||
NoErrLabel.Caption := sNoErrorsFound;
|
NoErrLabel.Caption := sNoErrorsFound;
|
||||||
FillTestListBox;
|
FillTestListBox;
|
||||||
@ -181,12 +170,11 @@ end;
|
|||||||
|
|
||||||
procedure TPoCheckerForm.FormDestroy(Sender: TObject);
|
procedure TPoCheckerForm.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Assigned(PoFamily) then
|
if Assigned(PoFamilyList) then
|
||||||
PoFamily.Free;
|
PoFamilyList.Free;
|
||||||
SaveConfig;
|
SaveConfig;
|
||||||
if Assigned(FPoCheckerSettings) then
|
if Assigned(FPoCheckerSettings) then
|
||||||
FPoCheckerSettings.Free;
|
FPoCheckerSettings.Free;
|
||||||
FChildPoList.Free;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -199,23 +187,38 @@ begin
|
|||||||
if IsMasterPoName(Fn) then
|
if IsMasterPoName(Fn) then
|
||||||
AddToMasterPoList(Fn)
|
AddToMasterPoList(Fn)
|
||||||
else
|
else
|
||||||
AddToChildPoList(Fn);
|
//AddToChildPoList(Fn);
|
||||||
SetSelectedPoName(Fn);
|
AddToMasterPoList(ExtractMasterNameFromChildName(Fn));
|
||||||
|
UpdateGUI(True);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
SetSelectedPoName('');
|
UpdateGUI(False);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TPoCheckerForm.RunBtnClick(Sender: TObject);
|
procedure TPoCheckerForm.RunBtnClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
AMasterList: TStringList;
|
||||||
|
LangIdx: Integer;
|
||||||
|
ALang: String;
|
||||||
begin
|
begin
|
||||||
if TryCreatePoFamily(FSelectedPoName) then
|
LangIdx := LangFilter.ItemIndex;
|
||||||
RunSelectedTests
|
if (LangIdx > 0) then
|
||||||
|
ALang := LangFilter.Items[LangIdx]
|
||||||
else
|
else
|
||||||
begin
|
ALang := langAll;
|
||||||
if Assigned(PoFamily) then FreeAndNil(PoFamily);
|
AMasterList := GetSelectedMasterFiles;
|
||||||
|
try
|
||||||
|
if TryCreatePoFamilyList(AMasterList, ALang) then
|
||||||
|
RunSelectedTests
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if Assigned(PoFamilyList) then FreeAndNil(PoFamilyList);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
AMasterList.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -240,85 +243,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.LangFilterChange(Sender: TObject);
|
procedure TPoCheckerForm.LangFilterChange(Sender: TObject);
|
||||||
var
|
|
||||||
Filter, Mask, PrevItem: String;
|
|
||||||
Idx, i: Integer;
|
|
||||||
begin
|
begin
|
||||||
Idx := ChildPoListBox.ItemIndex;
|
|
||||||
if (Idx > -1) then
|
|
||||||
PrevItem := ChildPoListBox.Items[Idx]
|
|
||||||
else
|
|
||||||
PrevItem := '';
|
|
||||||
//debugln('TPoCheckerForm.LangFilterChange: PrevItem = "',PrevItem,'"');
|
|
||||||
Filter := LangFilter.Items.Strings[LangFilter.ItemIndex];
|
|
||||||
if (LangFilter.ItemIndex > 0) then
|
|
||||||
begin
|
|
||||||
Mask := '*.'+Filter+'.po';
|
|
||||||
ChildPoListBox.Clear;
|
|
||||||
ChildPoListBox.Items.BeginUpdate;
|
|
||||||
try
|
|
||||||
for i := 0 to FChildPoList.Count - 1 do
|
|
||||||
begin
|
|
||||||
if MatchesMask(FChildPoList.Strings[i], Mask, False) then
|
|
||||||
ChildPoListBox.Items.Add(FChildPoList.Strings[i]);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
ChildPoListBox.Items.EndUpdate;
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
ChildPoListBox.Items.Assign(FChildPoList);
|
|
||||||
if (Idx <> -1) then
|
|
||||||
begin
|
|
||||||
Idx := ChildPoListBox.Items.IndexOf(PrevItem);
|
|
||||||
debugln('TPoCheckerForm.LangFilterChange: IndexOf(PrevItem) = ',DbgS(Idx));
|
|
||||||
if (Idx <> -1) then
|
|
||||||
begin
|
|
||||||
ChildPoListBox.ItemIndex := Idx;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
if (MasterPoListBox.ItemIndex = -1) then
|
|
||||||
SetSelectedPoName('');
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
UnselectChildBtn.Enabled := (Idx <> -1);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.ChildPoListBoxSelectionChange(Sender: TObject;
|
|
||||||
User: boolean);
|
|
||||||
begin
|
|
||||||
//debugln('TPoCheckerForm.ChildPoListBoxSelectionChange: User = ',DbgS(User));
|
|
||||||
if User then
|
|
||||||
begin
|
|
||||||
SetSelectedPoName(ChildPoListBox.Items[ChildPoListBox.ItemIndex]);
|
|
||||||
end;
|
|
||||||
UnselectChildBtn.Enabled := (ChildPoListBox.ItemIndex <> -1);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPoCheckerForm.ChildPoListBoxResize(Sender: TObject);
|
procedure TPoCheckerForm.MasterPoListBoxResize(Sender: TObject);
|
||||||
var
|
var
|
||||||
ATop, ADiff: Integer;
|
ATop: Integer;
|
||||||
begin
|
begin
|
||||||
//Can't seem to get this to work with just Anchors
|
//Can't seem to get this to work with just Anchors
|
||||||
ATop := ChildPoListBox.Top + ChildPoListBox.Height;
|
ATop := MasterPoListBox.Top + MasterPoListBox.Height;
|
||||||
ADiff := MasterPoListBox.Top + MasterPoListBox.Height - ATop;
|
LangFilter.Top := ATop + 5;
|
||||||
LangFilter.Top := ATop + (ADiff - LangFilter.Height);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.ClearChildBtnClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FChildPoList.Clear;
|
|
||||||
LangFilterChange(LangFilter);
|
|
||||||
if (MasterPoListBox.ItemIndex = -1) then
|
|
||||||
SetSelectedPoName('');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPoCheckerForm.ClearMasterBtnClick(Sender: TObject);
|
procedure TPoCheckerForm.ClearMasterBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
MasterPoListBox.Clear;
|
MasterPoListBox.Clear;
|
||||||
if (ChildPoListBox.ItemIndex = -1) then
|
UpdateGUI(False);
|
||||||
SetSelectedPoName('');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.FormShow(Sender: TObject);
|
procedure TPoCheckerForm.FormShow(Sender: TObject);
|
||||||
@ -353,9 +295,9 @@ begin
|
|||||||
//debugln('TPoCheckerForm.MasterPoListBoxSelectionChange: User = ',DbgS(User));
|
//debugln('TPoCheckerForm.MasterPoListBoxSelectionChange: User = ',DbgS(User));
|
||||||
if User then
|
if User then
|
||||||
begin
|
begin
|
||||||
SetSelectedPoName(MasterPoListBox.Items[MasterPoListBox.ItemIndex]);
|
UpdateGUI(MasterPoListBox.SelCount > 0);
|
||||||
end;
|
end;
|
||||||
UnselectMasterBtn.Enabled := (MasterPoListBox.ItemIndex <> -1);
|
UnselectMasterBtn.Enabled := (MasterPoListBox.SelCount <> 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.ScanDirBtnClick(Sender: TObject);
|
procedure TPoCheckerForm.ScanDirBtnClick(Sender: TObject);
|
||||||
@ -368,16 +310,12 @@ end;
|
|||||||
|
|
||||||
procedure TPoCheckerForm.UnselectChildBtnClick(Sender: TObject);
|
procedure TPoCheckerForm.UnselectChildBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ChildpoListBox.ItemIndex := -1;
|
|
||||||
if (MasterPoListBox.ItemIndex = -1) then
|
|
||||||
SetSelectedPoName('');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.UnselectMasterBtnClick(Sender: TObject);
|
procedure TPoCheckerForm.UnselectMasterBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
MasterPoListBox.ItemIndex := -1;
|
MasterPoListBox.ClearSelection;
|
||||||
if (ChildPoListBox.ItemIndex = -1) then
|
UpdateGUI(False);
|
||||||
SetSelectedPoName('');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.OnTestStart(const ATestName, APoFileName: string);
|
procedure TPoCheckerForm.OnTestStart(const ATestName, APoFileName: string);
|
||||||
@ -443,8 +381,8 @@ end;
|
|||||||
function TPoCheckerForm.GetTestOptions: TPoTestOptions;
|
function TPoCheckerForm.GetTestOptions: TPoTestOptions;
|
||||||
begin
|
begin
|
||||||
Result := [];
|
Result := [];
|
||||||
if FindAllPOsCheckBox.Checked then
|
//if FindAllPOsCheckBox.Checked then
|
||||||
Result := Result + [ptoFindAllChildren];
|
// Result := Result + [ptoFindAllChildren];
|
||||||
if IgnoreFuzzyCheckBox.Checked then
|
if IgnoreFuzzyCheckBox.Checked then
|
||||||
Result := Result + [ptoIgnoreFuzzyStrings];
|
Result := Result + [ptoIgnoreFuzzyStrings];
|
||||||
end;
|
end;
|
||||||
@ -466,7 +404,7 @@ end;
|
|||||||
|
|
||||||
procedure TPoCheckerForm.SetTestOptionCheckBoxes(TestOptions: TPoTestOptions);
|
procedure TPoCheckerForm.SetTestOptionCheckBoxes(TestOptions: TPoTestOptions);
|
||||||
begin
|
begin
|
||||||
FindAllPOsCheckBox.Checked := (ptoFindAllChildren in TestOptions);
|
//FindAllPOsCheckBox.Checked := (ptoFindAllChildren in TestOptions);
|
||||||
IgnoreFuzzyCheckBox.Checked := (ptoIgnoreFuzzyStrings in TestOptions);
|
IgnoreFuzzyCheckBox.Checked := (ptoIgnoreFuzzyStrings in TestOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -491,85 +429,82 @@ end;
|
|||||||
|
|
||||||
procedure TPoCheckerForm.ScanDirectory(ADir: String);
|
procedure TPoCheckerForm.ScanDirectory(ADir: String);
|
||||||
var
|
var
|
||||||
SL, ML, CL: TStringList;
|
SL, ML: TStringList;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
S: String;
|
S: String;
|
||||||
begin
|
begin
|
||||||
SL := FindAllFiles(ADir, '*.po',True);
|
SL := FindAllFiles(ADir, '*.po',True);
|
||||||
try
|
try
|
||||||
ML := TStringList.Create;
|
ML := TStringList.Create;
|
||||||
CL := TStringList.Create;
|
|
||||||
for i := 0 to SL.Count - 1 do
|
for i := 0 to SL.Count - 1 do
|
||||||
begin
|
begin
|
||||||
S := SL[i];
|
S := SL[i];
|
||||||
//debugln('TPoCheckerForm.ScanDirectory: S = "',ExtractFilename(S),'"');
|
//debugln('TPoCheckerForm.ScanDirectory: S = "',ExtractFilename(S),'"');
|
||||||
if IsMasterPoName(S) then
|
if IsMasterPoName(S) then
|
||||||
ML.Add(S)
|
ML.Add(S);
|
||||||
else
|
|
||||||
CL.Add(S);
|
|
||||||
end;
|
end;
|
||||||
if (ML.Count > 0) then AddToMasterPoList(ML);
|
if (ML.Count > 0) then AddToMasterPoList(ML);
|
||||||
if (CL.Count > 0) then AddToChildPoList(CL);
|
|
||||||
finally
|
finally
|
||||||
SL.Free;
|
SL.Free;
|
||||||
ML.Free;
|
ML.Free;
|
||||||
CL.Free;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPoCheckerForm.TryCreatePoFamily(Filename: String): Boolean;
|
|
||||||
|
function TPoCheckerForm.TryCreatepoFamilyList(MasterList: TStrings; const Lang: String): Boolean;
|
||||||
var
|
var
|
||||||
ChosenMasterName, ChosenChildName, ShortFn: String;
|
Fn, Msg: String;
|
||||||
|
i, Cnt: Integer;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
ShortFn := ExtractFileName(Filename);
|
Msg := '';
|
||||||
if IsMasterPoName(Filename) then
|
Cnt := MasterList.Count;
|
||||||
|
for i := Cnt - 1 downto 0 do
|
||||||
begin
|
begin
|
||||||
ChosenMasterName := Filename;
|
Fn := MasterList.Strings[i];
|
||||||
ChosenChildName := '';
|
if not FileExistsUtf8(Fn) then
|
||||||
end
|
|
||||||
else
|
|
||||||
begin //not a mastername, may be a child
|
|
||||||
ChosenChildName := Filename;
|
|
||||||
ChosenMasterName := ExtractMasterNameFromChildName(Filename);
|
|
||||||
if (ChosenMasterName = '') then
|
|
||||||
begin
|
begin
|
||||||
ChosenMasterName := '';
|
MasterList.Delete(i);
|
||||||
ChosenChildName := '';
|
Msg := Format('"%s"',[Fn]) + LineEnding + Msg;
|
||||||
ShowError(Format(sNotAProperFileName, [ShortFn]));
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if not FileExistsUtf8(ChosenMasterName) then
|
|
||||||
begin
|
|
||||||
ShowError(Format(sCannotFindMaster,
|
|
||||||
[ExtractFileName(ChosenMasterName), ShortFn]));
|
|
||||||
ChosenMasterName := '';
|
|
||||||
ChosenChildName := '';
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Result := (ChosenMasterName <> '');
|
if (Msg <> '') then
|
||||||
if Result then
|
MessageDlg('PoChecker',Format(sFilesNotFoundAndRemoved,[Msg]), mtInformation, [mbOk], 0);
|
||||||
|
Cnt := MasterList.Count;
|
||||||
|
if (Cnt = 0) then
|
||||||
begin
|
begin
|
||||||
if Assigned(PoFamily) then
|
MessageDlg('PoChecker', sNoFilesLeftToCheck, mtInformation, [mbOk], 0);
|
||||||
PoFamily.Free;
|
Exit;
|
||||||
try
|
end;
|
||||||
PoFamily := TPoFamily.Create(ChosenMasterName, ChosenChildName);
|
try
|
||||||
PoFamily.OnTestStart := @OnTestStart;
|
if Assigned(PoFamilyList) then PoFamilyList.Free;
|
||||||
PoFamily.OnTestEnd := @OnTestEnd;
|
PoFamilyList := TPoFamilyList.Create(MasterList, Lang, Msg);
|
||||||
except
|
if (Msg <> '') then
|
||||||
on E: Exception do
|
begin
|
||||||
|
MessageDlg('PoChecker',Format(sFilesNotFoundAndRemoved,[Msg]), mtInformation, [mbOk], 0);
|
||||||
|
if (PoFamilyList.Count = 0) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
MessageDlg('PoChecker', sNoFilesLeftToCheck, mtInformation, [mbOk], 0);
|
||||||
ShowError(Format(sErrorOnCreate, [E.Message]));
|
FreeAndNil(PoFamilyList);
|
||||||
if Assigned(PoFamily) then
|
Exit;
|
||||||
begin
|
end;
|
||||||
try
|
end;
|
||||||
PoFamily.Free;
|
PoFamilyList.OnTestStart := @OnTestStart;
|
||||||
except
|
PoFamilyList.OnTestEnd := @OnTestEnd;
|
||||||
on E: Exception do
|
Result := True;
|
||||||
begin
|
except
|
||||||
ShowError(Format(sErrorOnCleanUp, [E.Message]));
|
on E: Exception do
|
||||||
end;
|
begin
|
||||||
|
Result := False;
|
||||||
|
ShowError(Format(sErrorOnCreate, [E.Message]));
|
||||||
|
if Assigned(PoFamilyList) then
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
FreeAndNil(PoFamilyList);
|
||||||
|
except
|
||||||
|
on E: Exception do
|
||||||
|
begin
|
||||||
|
ShowError(Format(sErrorOnCleanUp, [E.Message]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -599,10 +534,8 @@ begin
|
|||||||
SL := TStringList.Create;
|
SL := TStringList.Create;
|
||||||
mr := mrNone;
|
mr := mrNone;
|
||||||
try
|
try
|
||||||
if (not (ptoFindAllChildren in TestOptions)) and Assigned(PoFamily.Child) and
|
|
||||||
(PoFamily.ChildName <> FSelectedPoName) then
|
PoFamilyList.RunTests(TestTypes, TestOptions, ErrorCount, WarningCount, SL);
|
||||||
PoFamily.ChildName := FSelectedPoName;
|
|
||||||
PoFamily.RunTests(TestTypes, TestOptions, ErrorCount, WarningCount, SL);
|
|
||||||
//debugln('RunSelectedTests: ', Format(sTotalErrors, [ErrorCount]));
|
//debugln('RunSelectedTests: ', Format(sTotalErrors, [ErrorCount]));
|
||||||
//debugln(' ', Format(sTotalWarnings, [WarningCount]));
|
//debugln(' ', Format(sTotalWarnings, [WarningCount]));
|
||||||
if (ErrorCount > 0) or (WarningCount > 0) or
|
if (ErrorCount > 0) or (WarningCount > 0) or
|
||||||
@ -615,7 +548,7 @@ 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 := PoFamily.PoFamilyStats
|
ResultDlg.PoFamilyStats := PoFamilyList.PoFamilyStats
|
||||||
else
|
else
|
||||||
ResultDlg.PoFamilyStats := nil;
|
ResultDlg.PoFamilyStats := nil;
|
||||||
ResultDlg.Settings := FPoCheckerSettings;
|
ResultDlg.Settings := FPoCheckerSettings;
|
||||||
@ -639,35 +572,17 @@ begin
|
|||||||
StatusBar.SimpleText := '';
|
StatusBar.SimpleText := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.SetSelectedPoName(AFilename: String);
|
procedure TPoCheckerForm.UpdateGUI(HasSelection: Boolean);
|
||||||
var
|
|
||||||
Idx: Integer;
|
|
||||||
begin
|
begin
|
||||||
//debugln('TPoCheckerForm.SetSelectedPoName: ((FSelectedPoName = AFilename)) = ',DbgS((FSelectedPoName = AFilename)));
|
|
||||||
NoErrLabel.Visible := False;
|
NoErrLabel.Visible := False;
|
||||||
//if (FSelectedPoName = AFilename) then Exit;
|
if HasSelection then
|
||||||
FSelectedPoName := AFilename;
|
|
||||||
if (AFilename <> '') then
|
|
||||||
begin
|
begin
|
||||||
RunBtn.Enabled := True;
|
RunBtn.Enabled := True;
|
||||||
TestListBox.Enabled := True;
|
TestListBox.Enabled := True;
|
||||||
SelectAllBtn.Enabled := True;
|
SelectAllBtn.Enabled := True;
|
||||||
SelectBasicBtn.Enabled := True;
|
SelectBasicBtn.Enabled := True;
|
||||||
UnselectAllBtn.Enabled := True;
|
UnselectAllBtn.Enabled := True;
|
||||||
Caption := sGUIPoFileCheckingTool + ' [' + ExtractFileName(AFilename) + ']';
|
UnselectMasterBtn.Enabled := True;
|
||||||
OpenDialog.InitialDir:= ExtractFileDir(AFilename);
|
|
||||||
if IsMasterPoName(AFilename) then
|
|
||||||
begin
|
|
||||||
Idx := MasterPoListBox.Items.IndexOf(AFilename);
|
|
||||||
MasterPoListBox.ItemIndex := Idx;
|
|
||||||
ChildPoListBox.ItemIndex := -1;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
|
||||||
Idx := ChildPoListBox.Items.IndexOf(AFilename);
|
|
||||||
ChildPoListBox.ItemIndex := Idx;
|
|
||||||
MasterPoListBox.ItemIndex := -1;
|
|
||||||
end;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -676,9 +591,21 @@ begin
|
|||||||
SelectAllBtn.Enabled := False;
|
SelectAllBtn.Enabled := False;
|
||||||
SelectBasicBtn.Enabled := False;
|
SelectBasicBtn.Enabled := False;
|
||||||
UnselectAllBtn.Enabled := False;
|
UnselectAllBtn.Enabled := False;
|
||||||
Caption := sGUIPoFileCheckingTool;
|
UnselectMasterBtn.Enabled := False;
|
||||||
ChildPoListBox.ItemIndex := -1;
|
end;
|
||||||
MasterPoListBox.ItemIndex := -1;
|
end;
|
||||||
|
|
||||||
|
function TPoCheckerForm.GetSelectedMasterFiles: TStringList;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
Fn: String;
|
||||||
|
begin
|
||||||
|
Result := TStringList.Create;
|
||||||
|
for i := 0 to MasterPoListBox.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
Fn := MasterpoListBox.Items[i];
|
||||||
|
if MasterPoListBox.Selected[i] then
|
||||||
|
Result.Add(Fn);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -686,6 +613,7 @@ procedure TPoCheckerForm.AddToMasterPoList(Fn: String);
|
|||||||
var
|
var
|
||||||
Idx: Integer;
|
Idx: Integer;
|
||||||
begin
|
begin
|
||||||
|
if not FileExistsUtf8(Fn) then Exit;
|
||||||
Idx := MasterPoListBox.Items.IndexOf(Fn);
|
Idx := MasterPoListBox.Items.IndexOf(Fn);
|
||||||
if (Idx = -1) then
|
if (Idx = -1) then
|
||||||
begin
|
begin
|
||||||
@ -696,54 +624,59 @@ end;
|
|||||||
procedure TPoCheckerForm.AddToMasterPoList(S: TStrings);
|
procedure TPoCheckerForm.AddToMasterPoList(S: TStrings);
|
||||||
var
|
var
|
||||||
i, Idx: Integer;
|
i, Idx: Integer;
|
||||||
Str, PrevItem: String;
|
Str: String;
|
||||||
begin
|
begin
|
||||||
|
{
|
||||||
Idx := MasterPoListBox.ItemIndex;
|
Idx := MasterPoListBox.ItemIndex;
|
||||||
if (Idx <> -1) then
|
if (Idx <> -1) then
|
||||||
PrevItem := MasterPoListBox.Items[Idx]
|
PrevItem := MasterPoListBox.Items[Idx]
|
||||||
else
|
else
|
||||||
PrevItem := '';
|
PrevItem := '';
|
||||||
|
}
|
||||||
MasterPoListBox.Items.BeginUpdate;
|
MasterPoListBox.Items.BeginUpdate;
|
||||||
try
|
try
|
||||||
for i := 0 to S.Count - 1 do
|
for i := 0 to S.Count - 1 do
|
||||||
begin
|
begin
|
||||||
Str := S[i];
|
Str := S[i];
|
||||||
Idx := MasterPoListBox.Items.IndexOf(Str);
|
//skip files that do not exist (anymore)
|
||||||
if (Idx = -1) then
|
if FileExistsUtf8(Str) then
|
||||||
MasterPoListBox.Items.Add(Str);
|
begin
|
||||||
|
Idx := MasterPoListBox.Items.IndexOf(Str);
|
||||||
|
if (Idx = -1) then
|
||||||
|
MasterPoListBox.Items.Add(Str);
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
|
{
|
||||||
if (PrevItem <> '') then
|
if (PrevItem <> '') then
|
||||||
begin
|
begin
|
||||||
Idx := MasterPoListBox.Items.IndexOf(PrevItem);
|
Idx := MasterPoListBox.Items.IndexOf(PrevItem);
|
||||||
MasterPoListBox.ItemIndex := Idx;
|
MasterPoListBox.ItemIndex := Idx;
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
MasterPoListBox.Items.EndUpdate;
|
MasterPoListBox.Items.EndUpdate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.AddToChildPoList(Fn: String);
|
procedure TPoCheckerForm.SetSelectedMasterFiles(S: TStrings);
|
||||||
var
|
|
||||||
Idx: Integer;
|
|
||||||
begin
|
|
||||||
Idx := FChildPoList.Add(Fn);
|
|
||||||
if (Idx > -1) then
|
|
||||||
LangFilterChange(LangFilter);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPoCheckerForm.AddToChildPoList(S: TStrings);
|
|
||||||
var
|
var
|
||||||
i, Idx: Integer;
|
i, Idx: Integer;
|
||||||
Str: String;
|
Fn: String;
|
||||||
|
HasSelection: Boolean;
|
||||||
begin
|
begin
|
||||||
|
MasterPoListBox.ClearSelection;
|
||||||
for i := 0 to S.Count - 1 do
|
for i := 0 to S.Count - 1 do
|
||||||
begin
|
begin
|
||||||
Str := S[i];
|
Fn := S.Strings[i];
|
||||||
Idx := FChildPoList.IndexOf(Str);
|
Idx := MasterPoListBox.Items.IndexOf(Fn);
|
||||||
if (Idx = -1) then
|
if (Idx <> -1) then
|
||||||
FChildPoList.Add(Str);
|
begin
|
||||||
|
MasterPoListBox.Selected[Idx] := True;
|
||||||
|
HasSelection := True;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
LangFilterChange(LangFilter);
|
//debugln('TPoCheckerForm.SetSelectedMasterFiles: MasterPoListBox.SelCount = ',DbgS(MasterPoListBox.SelCount));
|
||||||
|
UpdateGUI(HasSelection);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -764,22 +697,26 @@ begin
|
|||||||
SelectDirectoryDialog.Filename := FPoCheckerSettings.SelectDirectoryFilename;
|
SelectDirectoryDialog.Filename := FPoCheckerSettings.SelectDirectoryFilename;
|
||||||
OpenDialog.FileName := FPoCheckerSettings.OpenDialogFilename;
|
OpenDialog.FileName := FPoCheckerSettings.OpenDialogFilename;
|
||||||
AddToMasterPoList(FPoCheckerSettings.MasterPoList);
|
AddToMasterPoList(FPoCheckerSettings.MasterPoList);
|
||||||
AddToChildPoList(FPoCheckerSettings.ChildPoList);
|
SetSelectedMasterFiles(FPoCheckerSettings.MasterPoSelList);
|
||||||
|
//AddToChildPoList(FPoCheckerSettings.ChildPoList);
|
||||||
|
{
|
||||||
if (CompareText(ExtractFileExt(FPoCheckerSettings.LastSelectedFile), '.po') = 0) then
|
if (CompareText(ExtractFileExt(FPoCheckerSettings.LastSelectedFile), '.po') = 0) then
|
||||||
begin
|
begin
|
||||||
if IsMasterPoName(FPoCheckerSettings.LastSelectedFile) then
|
if IsMasterPoName(FPoCheckerSettings.LastSelectedFile) then
|
||||||
AddToMasterPoList(FPoCheckerSettings.LastSelectedFile)
|
AddToMasterPoList(FPoCheckerSettings.LastSelectedFile)
|
||||||
else
|
else
|
||||||
AddToChildPoList(FPoCheckerSettings.LastSelectedFile);
|
AddToChildPoList(FPoCheckerSettings.LastSelectedFile);
|
||||||
SetSelectedPoName(FPoCheckerSettings.LastSelectedFile)
|
UpdateGUI(True)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
SetSelectedPoName('');
|
UpdateGUI(False);
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerForm.SaveConfig;
|
procedure TPoCheckerForm.SaveConfig;
|
||||||
|
var
|
||||||
|
SL: TStringList;
|
||||||
begin
|
begin
|
||||||
FPoCheckerSettings.LastSelectedFile := FSelectedPoName;
|
|
||||||
FPoCheckerSettings.SelectDirectoryFilename := SelectDirectoryDialog.Filename;
|
FPoCheckerSettings.SelectDirectoryFilename := SelectDirectoryDialog.Filename;
|
||||||
FPoCheckerSettings.OpenDialogFilename := OpenDialog.FileName;
|
FPoCheckerSettings.OpenDialogFilename := OpenDialog.FileName;
|
||||||
FPoCheckerSettings.TestTypes := GetTestTypesFromListBox;
|
FPoCheckerSettings.TestTypes := GetTestTypesFromListBox;
|
||||||
@ -790,7 +727,12 @@ begin
|
|||||||
else
|
else
|
||||||
FPoCheckerSettings.MainFormGeometry := Rect(RestoredLeft, RestoredTop, RestoredLeft + RestoredWidth, RestoredTop + RestoredHeight);
|
FPoCheckerSettings.MainFormGeometry := Rect(RestoredLeft, RestoredTop, RestoredLeft + RestoredWidth, RestoredTop + RestoredHeight);
|
||||||
FPoCheckerSettings.MasterPoList := MasterPoListBox.Items;
|
FPoCheckerSettings.MasterPoList := MasterPoListBox.Items;
|
||||||
FPoCheckerSettings.ChildPoList := FChildPoList;
|
SL := GetSelectedMasterFiles;
|
||||||
|
try
|
||||||
|
FPoCheckerSettings.MasterPoSelList := SL;
|
||||||
|
finally
|
||||||
|
SL.Free;
|
||||||
|
end;
|
||||||
FPoCheckerSettings.SaveConfig;
|
FPoCheckerSettings.SaveConfig;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -30,13 +30,13 @@ type
|
|||||||
FTestTypes: TPoTestTypes;
|
FTestTypes: TPoTestTypes;
|
||||||
FTestOptions: TPoTestOptions;
|
FTestOptions: TPoTestOptions;
|
||||||
FMasterPoList: TStringList;
|
FMasterPoList: TStringList;
|
||||||
FChildPoList: TStringList;
|
FMasterPoSelList: TStringList;
|
||||||
FLastSelectedFile: String;
|
FLastSelectedFile: String;
|
||||||
FMainFormGeometry: TRect;
|
FMainFormGeometry: TRect;
|
||||||
FGraphFormGeometry: TRect;
|
FGraphFormGeometry: TRect;
|
||||||
FResultsFormGeometry: TRect;
|
FResultsFormGeometry: TRect;
|
||||||
function GetChildPoList: TStrings;
|
|
||||||
function GetMasterPoList: TStrings;
|
function GetMasterPoList: TStrings;
|
||||||
|
function GetMasterPoSelList: TStrings;
|
||||||
function LoadLastSelectedFile: String;
|
function LoadLastSelectedFile: String;
|
||||||
function LoadTestTypes: TPoTestTypes;
|
function LoadTestTypes: TPoTestTypes;
|
||||||
function LoadTestOptions: TPoTestOptions;
|
function LoadTestOptions: TPoTestOptions;
|
||||||
@ -45,8 +45,7 @@ type
|
|||||||
function LoadSelectDirectoryFilename: String;
|
function LoadSelectDirectoryFilename: String;
|
||||||
function LoadOpenDialogFilename: String;
|
function LoadOpenDialogFilename: String;
|
||||||
procedure LoadMasterPoList(List: TStrings);
|
procedure LoadMasterPoList(List: TStrings);
|
||||||
procedure LoadChildPoList(List: TStrings);
|
procedure LoadMasterPoSelList(List: TStrings);
|
||||||
procedure SaveLastSelectedFile;
|
|
||||||
procedure SaveTestTypes;
|
procedure SaveTestTypes;
|
||||||
procedure SaveTestOptions;
|
procedure SaveTestOptions;
|
||||||
procedure SaveWindowsGeometry;
|
procedure SaveWindowsGeometry;
|
||||||
@ -54,9 +53,9 @@ type
|
|||||||
procedure SaveSelectDirectoryFilename;
|
procedure SaveSelectDirectoryFilename;
|
||||||
procedure SaveOpenDialogFilename;
|
procedure SaveOpenDialogFilename;
|
||||||
procedure SaveMasterPoList;
|
procedure SaveMasterPoList;
|
||||||
procedure SaveChildrenPoList;
|
procedure SaveMasterPoSelList;
|
||||||
procedure SetChildPoList(AValue: TStrings);
|
|
||||||
procedure SetMasterPoList(AValue: TStrings);
|
procedure SetMasterPoList(AValue: TStrings);
|
||||||
|
procedure SetMasterPoSelList(AValue: TStrings);
|
||||||
procedure ResetAllProperties;
|
procedure ResetAllProperties;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
@ -70,8 +69,7 @@ type
|
|||||||
property TestOptions: TPoTestOptions read FTestOptions write FTestOptions;
|
property TestOptions: TPoTestOptions read FTestOptions write FTestOptions;
|
||||||
property ExternalEditorName: String read FExternalEditorName write FExternalEditorName;
|
property ExternalEditorName: String read FExternalEditorName write FExternalEditorName;
|
||||||
property MasterPoList: TStrings read GetMasterPoList write SetMasterPoList;
|
property MasterPoList: TStrings read GetMasterPoList write SetMasterPoList;
|
||||||
property ChildPoList: TStrings read GetChildPoList write SetChildPoList;
|
property MasterPoSelList: TStrings read GetMasterPoSelList write SetMasterPoSelList;
|
||||||
property LastSelectedFile: String read FLastSelectedFile write FLastSelectedFile;
|
|
||||||
property SelectDirectoryFilename: String read FSelectDirectoryFilename write FSelectDirectoryFilename;
|
property SelectDirectoryFilename: String read FSelectDirectoryFilename write FSelectDirectoryFilename;
|
||||||
property OpenDialogFilename: String read FOpenDialogFilename write FOpenDialogFilename;
|
property OpenDialogFilename: String read FOpenDialogFilename write FOpenDialogFilename;
|
||||||
property MainFormGeometry: TRect read FMainFormGeometry write FMainFormGeometry;
|
property MainFormGeometry: TRect read FMainFormGeometry write FMainFormGeometry;
|
||||||
@ -158,6 +156,7 @@ const
|
|||||||
pWindowsGeometry = 'General/WindowsGeometry/';
|
pWindowsGeometry = 'General/WindowsGeometry/';
|
||||||
pExternalEditor = 'ExternalEditor/';
|
pExternalEditor = 'ExternalEditor/';
|
||||||
pMasterPoFiles = 'MasterPoFiles/';
|
pMasterPoFiles = 'MasterPoFiles/';
|
||||||
|
pMasterPoSelection = 'MasterPoSelection/';
|
||||||
pChildPoFiles = 'ChildPoFiles/';
|
pChildPoFiles = 'ChildPoFiles/';
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -240,11 +239,12 @@ begin
|
|||||||
Result := FMasterPoList;
|
Result := FMasterPoList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPoCheckerSettings.GetChildPoList: TStrings;
|
function TPoCheckerSettings.GetMasterPoSelList: TStrings;
|
||||||
begin
|
begin
|
||||||
Result := FChildPoList;
|
Result := FMasterPoSelList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TPoCheckerSettings.LoadTestTypes: TPoTestTypes;
|
function TPoCheckerSettings.LoadTestTypes: TPoTestTypes;
|
||||||
var
|
var
|
||||||
tt: TPoTestType;
|
tt: TPoTestType;
|
||||||
@ -331,25 +331,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerSettings.LoadChildPoList(List: TStrings);
|
procedure TPoCheckerSettings.LoadMasterPoSelList(List: TStrings);
|
||||||
var
|
var
|
||||||
Cnt, i: Integer;
|
Cnt, i: Integer;
|
||||||
Fn: String;
|
Fn: String;
|
||||||
begin
|
begin
|
||||||
List.Clear;
|
List.Clear;
|
||||||
Cnt := Fconfig.GetValue(pChildPoFiles+'Count',0);
|
Cnt := Fconfig.GetValue(pMasterpoSelection+'Count',0);
|
||||||
//debugln('TPoCheckerSettings.LoadChildPoList: Cnt = ',DbgS(Cnt));
|
//debugln('TPoCheckerSettings.LoadMasterPoSelList: Cnt = ',DbgS(Cnt));
|
||||||
for i := 0 to Cnt - 1 do
|
for i := 0 to Cnt - 1 do
|
||||||
begin
|
begin
|
||||||
Fn := FConfig.GetValue(pChildPoFiles+Format('Item_%d/Value',[i]),'');
|
Fn := FConfig.GetValue(pMasterpoSelection+Format('Item_%d/Value',[i]),'');
|
||||||
if (Fn <> '') then List.Add(Fn);
|
if (Fn <> '') then List.Add(Fn);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerSettings.SaveLastSelectedFile;
|
|
||||||
begin
|
|
||||||
FConfig.SetDeleteValue(pLastSelected+'Value',FLastSelectedFile,'');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPoCheckerSettings.SaveTestTypes;
|
procedure TPoCheckerSettings.SaveTestTypes;
|
||||||
var
|
var
|
||||||
@ -413,27 +409,29 @@ begin
|
|||||||
FConfig.SetDeleteValue(pMasterPoFiles+Format('Item_%d/Value',[i]),FMasterPoList[i],'');
|
FConfig.SetDeleteValue(pMasterPoFiles+Format('Item_%d/Value',[i]),FMasterPoList[i],'');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerSettings.SaveChildrenPoList;
|
procedure TPoCheckerSettings.SaveMasterPoSelList;
|
||||||
var
|
var
|
||||||
Cnt, i: Integer;
|
Cnt, i: Integer;
|
||||||
begin
|
begin
|
||||||
FConfig.DeletePath(pChildPoFiles);
|
FConfig.DeletePath(pMasterPoSelection);
|
||||||
Cnt := FChildPoList.Count;
|
Cnt := FMasterPoSelList.Count;
|
||||||
FConfig.SetDeleteValue(pChildPoFiles+'Count',Cnt,0);
|
FConfig.SetDeleteValue(pMasterPoSelection+'Count',Cnt,0);
|
||||||
for i := 0 to Cnt - 1 do
|
for i := 0 to Cnt - 1 do
|
||||||
FConfig.SetDeleteValue(pChildPoFiles+Format('Item_%d/Value',[i]),FChildPoList[i],'');
|
FConfig.SetDeleteValue(pMasterPoSelection+Format('Item_%d/Value',[i]),FMasterPoSelList[i],'');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPoCheckerSettings.SetChildPoList(AValue: TStrings);
|
|
||||||
begin
|
|
||||||
FChildPoList.Assign(AValue);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPoCheckerSettings.SetMasterPoList(AValue: TStrings);
|
procedure TPoCheckerSettings.SetMasterPoList(AValue: TStrings);
|
||||||
begin
|
begin
|
||||||
FMasterPoList.Assign(AValue);
|
FMasterPoList.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPoCheckerSettings.SetMasterPoSelList(AValue: TStrings);
|
||||||
|
begin
|
||||||
|
FMasterPoSelList.Assign(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TPoCheckerSettings.ResetAllProperties;
|
procedure TPoCheckerSettings.ResetAllProperties;
|
||||||
begin
|
begin
|
||||||
FTestTypes := [];
|
FTestTypes := [];
|
||||||
@ -449,15 +447,14 @@ begin
|
|||||||
FSelectDirectoryFilename := '';
|
FSelectDirectoryFilename := '';
|
||||||
FLastSelectedFile := '';
|
FLastSelectedFile := '';
|
||||||
if Assigned(FMasterPoList) then FMasterPoList.Free;
|
if Assigned(FMasterPoList) then FMasterPoList.Free;
|
||||||
|
if Assigned(FMasterPoSelList) then FMasterPoSelList.Free;
|
||||||
FMasterPoList := TStringList.Create;
|
FMasterPoList := TStringList.Create;
|
||||||
|
FMasterPoSelList := TStringList.Create;
|
||||||
FMasterPoList.Sorted := True;
|
FMasterPoList.Sorted := True;
|
||||||
FMasterPoList.Duplicates := dupIgnore;
|
FMasterPoList.Duplicates := dupIgnore;
|
||||||
if Assigned(FChildPoList) then FChildPoList.Free;
|
|
||||||
FChildPoList := TStringList.Create;
|
|
||||||
FChildPoList.Sorted := True;
|
|
||||||
FChildPoList.Duplicates := dupIgnore;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor TPoCheckerSettings.Create;
|
constructor TPoCheckerSettings.Create;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
@ -488,7 +485,7 @@ destructor TPoCheckerSettings.Destroy;
|
|||||||
begin
|
begin
|
||||||
if Assigned(FConfig) then FConfig.Free;
|
if Assigned(FConfig) then FConfig.Free;
|
||||||
FMasterPoList.Free;
|
FMasterPoList.Free;
|
||||||
FChildPoList.Free;
|
FMasterPoSelList.Free;
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -503,7 +500,7 @@ begin
|
|||||||
FExternalEditorName := LoadExternalEditorName;
|
FExternalEditorName := LoadExternalEditorName;
|
||||||
LoadWindowsGeometry;
|
LoadWindowsGeometry;
|
||||||
LoadMasterPoList(FMasterPoList);
|
LoadMasterPoList(FMasterPoList);
|
||||||
LoadChildPoList(FChildPoList);
|
LoadMasterPoSelList(FMasterPoSelList);
|
||||||
except
|
except
|
||||||
ResetAllProperties;
|
ResetAllProperties;
|
||||||
debugln('TPoCheckerSettings.LoadConfig: Error loading config.');
|
debugln('TPoCheckerSettings.LoadConfig: Error loading config.');
|
||||||
@ -517,7 +514,6 @@ begin
|
|||||||
//the next line can be reomoved after some time
|
//the next line can be reomoved after some time
|
||||||
FConfig.DeletePath(pLoadSettings);
|
FConfig.DeletePath(pLoadSettings);
|
||||||
|
|
||||||
SaveLastSelectedFile;
|
|
||||||
SaveTestTypes;
|
SaveTestTypes;
|
||||||
SaveTestOptions;
|
SaveTestOptions;
|
||||||
SaveExternalEditorName;
|
SaveExternalEditorName;
|
||||||
@ -525,7 +521,10 @@ begin
|
|||||||
SaveOpenDialogFilename;
|
SaveOpenDialogFilename;
|
||||||
SaveWindowsGeometry;
|
SaveWindowsGeometry;
|
||||||
SaveMasterPoList;
|
SaveMasterPoList;
|
||||||
SaveChildrenPoList;
|
SaveMasterPoSelList;
|
||||||
|
//not used anymore, clear it. Remove this line after a while
|
||||||
|
FConfig.DeletePath(pChildPoFiles);
|
||||||
|
|
||||||
FConfig.WriteToDisk;
|
FConfig.WriteToDisk;
|
||||||
except
|
except
|
||||||
debugln('TPoCheckerSettings.SaveConfig: Error saving config.');
|
debugln('TPoCheckerSettings.SaveConfig: Error saving config.');
|
||||||
|
@ -122,6 +122,7 @@ Type
|
|||||||
public
|
public
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
procedure Add(AName: String; ANrTotal, ANrTranslated, ANrUnTranslated, ANrFuzzy, ANrErrors: Integer);
|
procedure Add(AName: String; ANrTotal, ANrTranslated, ANrUnTranslated, ANrFuzzy, ANrErrors: Integer);
|
||||||
|
procedure AddItemsTo(APoFamilyStats: TPoFamilyStats);
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure AddStatisticsToLog(ALog: TStrings);
|
procedure AddStatisticsToLog(ALog: TStrings);
|
||||||
@ -135,11 +136,12 @@ function IsMasterPoName(const Fn: String): Boolean;
|
|||||||
function ExtractMasterNameFromChildName(const AChildName: String): String;
|
function ExtractMasterNameFromChildName(const AChildName: String): String;
|
||||||
function FindAllTranslatedPoFiles(const Filename: string): TStringList;
|
function FindAllTranslatedPoFiles(const Filename: string): TStringList;
|
||||||
|
|
||||||
|
const
|
||||||
|
NoError = 0;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
const
|
const
|
||||||
NoError = 0;
|
|
||||||
sCommentIdentifier = '#: ';
|
sCommentIdentifier = '#: ';
|
||||||
//sCharSetIdentifier = '"Content-Type: text/plain; charset=';
|
//sCharSetIdentifier = '"Content-Type: text/plain; charset=';
|
||||||
sMsgID = 'msgid "';
|
sMsgID = 'msgid "';
|
||||||
@ -389,6 +391,19 @@ begin
|
|||||||
FList.Add(TStat.Create(AName, ANrTotal, ANrTranslated, ANrUntranslated, ANrFuzzy, ANrErrors));
|
FList.Add(TStat.Create(AName, ANrTotal, ANrTranslated, ANrUntranslated, ANrFuzzy, ANrErrors));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPoFamilyStats.AddItemsTo(APoFamilyStats: TPoFamilyStats);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
AStat: TStat;
|
||||||
|
begin
|
||||||
|
for i := 0 to FList.Count - 1 do
|
||||||
|
begin
|
||||||
|
AStat := GetItems(i);
|
||||||
|
APoFamilyStats.Add(AStat.PoName, AStat.NrTotal, AStat.NrTranslated,
|
||||||
|
AStat.NrUntranslated, AStat.NrFuzzy, AStat.NrErrors);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TPoFamilyStats.Create;
|
constructor TPoFamilyStats.Create;
|
||||||
begin
|
begin
|
||||||
FList := TFPObjectList.Create(True);
|
FList := TFPObjectList.Create(True);
|
||||||
|
Loading…
Reference in New Issue
Block a user