POChecker: when scanning directory remove already present master files from the list if they went missing and notify user. Regenerated translations and updated Russian translation.

git-svn-id: trunk@52505 -
This commit is contained in:
maxim 2016-06-14 23:47:36 +00:00
parent df0d616b82
commit 57f75e90a3
14 changed files with 81 additions and 144 deletions

View File

@ -121,18 +121,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Nemůžu najít hlavní po soubor:\n"
"%s\n"
"pro vybraný soubor\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 ""
@ -403,6 +391,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -119,18 +119,6 @@ msgstr "Chinesisch, vereinfacht"
msgid "All Languages"
msgstr "Alle Sprachen"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Kann die Master-po-Datei:\n"
"%s\n"
"für die gewählte Datei file\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 "Kann Datei%s%s%s%snicht schreiben. Sie können auf \"Wiederholen\" klicken, um diese Übersetzungsfamilie erneut zu aktualisieren und fortzusetzen."
@ -405,6 +393,10 @@ msgstr ""
"Ungeklärt: %d (%.1f%%)\n"
"Fehler in den gewählten Tests: %d\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr "Folgende %s verwaiste .po-Datei(en) gefunden:"

View File

@ -117,18 +117,6 @@ msgstr "Chino, simplificado"
msgid "All Languages"
msgstr "Todos los Lenguajes"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"No se encuentra el archivo po maestro:\n"
"%s\n"
"para el archivo seleccionado\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 ""
@ -415,6 +403,10 @@ msgstr ""
"%3d Confuso (%3.1f%%)\n"
"%d Error(es) en el Test Seleccionado\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -119,18 +119,6 @@ msgstr "Chinois (simplifié)"
msgid "All Languages"
msgstr "Toutes les langues"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Impossible de trouver le fichier \"PO\" maître :\n"
"%s\n"
"pour le fichier sélectionné\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 ""
@ -417,6 +405,10 @@ msgstr ""
"%3d Floues (%3.1f%%)\n"
"%d Erreur(s) dans les tests sélectionnés\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr "Le(s) %s fichier(s) .po orphelin(s) détecté(s) :"

View File

@ -119,18 +119,6 @@ msgstr "Kínai, egyszerűsített"
msgid "All Languages"
msgstr "Minden nyelv"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Nem található a mester po-fájl:\n"
"%s\n"
"a kiválasztott fájlhoz:\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 ""
@ -417,6 +405,10 @@ msgstr ""
"%3d bizonytalan (%3.1f%%)\n"
"%d hiba a kiválasztott tesztekben\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr "A következő %s elárvult .po fájl található:"

View File

@ -121,18 +121,6 @@ msgstr "Cinese semplificato"
msgid "All Languages"
msgstr "Tutte le lingue"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Non trovato il file master po:\n"
"%s\n"
"per il file scelto\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 ""
@ -419,6 +407,10 @@ msgstr ""
"%3d Incerte (%3.1f%%)\n"
"%d Errori nei test selezionati\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -119,18 +119,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"選択されたファイル\n"
"%s\n"
"に対する po ファイルの原本が見つかりません\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 ""
@ -401,6 +389,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -119,18 +119,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Nepavyko rasti pagrindinio PO failo:\n"
"%s\n"
"parinktam failui\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 ""
@ -395,6 +383,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -109,14 +109,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
#: pocheckerconsts.scannotwritefileyoucanpressretrytorefreshthistransl
msgid "Cannot write file%s%s%s%sYou can press \"Retry\" to refresh this translation family again and continue."
msgstr ""
@ -372,6 +364,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -118,18 +118,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Impossível localizar o arquivo po mestre:\n"
"%s\n"
"para o arquivo selecionado\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 ""
@ -394,6 +382,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -119,18 +119,6 @@ msgstr "Китайский (упрощённый)"
msgid "All Languages"
msgstr "Все языки"
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Невозможно найти главный файл PO:\n"
"%s\n"
"для выбранного файла\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Вы можете нажать \"Повтор\", чтобы снова попытаться обновить это семейство переводов и продолжить далее."
@ -405,6 +393,10 @@ msgstr ""
"Неточных переводов: %d (%.1f%%)\n"
"Ошибок в выбранных тестах: %d\n"
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr "Следующие несуществующие главные файлы PO (%s шт.) были удалены из списка:"
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr "Найдены файлы переводов PO (%s шт.) без соответствующих им главных файлов:"

View File

@ -116,18 +116,6 @@ msgstr ""
msgid "All Languages"
msgstr ""
#: pocheckerconsts.scannotfindmaster
msgid ""
"Cannot find master po file:\n"
"%s\n"
"for selected file\n"
"%s\n"
msgstr ""
"Не можу знайти основний po файл:\n"
"%s\n"
"для вибраного файлу\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 ""
@ -392,6 +380,10 @@ msgid ""
"Errors in selected tests: %d\n"
msgstr ""
#: pocheckerconsts.sthefollowingmissingmasterpofileswereremoved
msgid "The following %s missing master .po file(s) were removed from the list:"
msgstr ""
#: pocheckerconsts.sthefollowingorphanedpofilesfound
msgid "The following %s orphaned .po file(s) found:"
msgstr ""

View File

@ -20,7 +20,6 @@ resourcestring
sUnselectListBox = 'Unselect all files';
sSelectAllListBox = 'Select all files';
sAllLanguages = 'All Languages';
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';
sFilesNotFoundAndRemoved = 'The following non-existent files were removed from the list:' + LineEnding + '%s';
sNoFilesLeftToCheck = 'There are no files left to check.';
@ -106,6 +105,8 @@ resourcestring
sPercFuzzy = '%s: %5.1f%% fuzzy strings.';
sTheFollowingOrphanedPoFileSFound = 'The following %s orphaned .po file(s) found:';
sTheFollowingMissingMasterPoFileSWereRemoved = 'The following %s '
+'missing master .po file(s) were removed from the list:';
sTroublesomeFiles = 'Troublesome files';
const

View File

@ -370,7 +370,7 @@ end;
procedure TPoCheckerForm.ScanDirectory(ADir: String);
var
SL, ML, OL: TStringList;
SL, ML, OL, CurFiles, MissingFiles: TStringList;
i: Integer;
S, Mn: String;
Cur: TCursor;
@ -382,6 +382,20 @@ begin
ML := TStringList.Create;
OL := TStringList.Create;
SL := FindAllFiles(ADir, '*.po', True);
// first we check if all already present master .po files exist and remove them if not
CurFiles := TStringList.Create;
MissingFiles := TStringList.Create;
CurFiles.Assign(MasterPoListBox.Items);
i := 0;
while i < CurFiles.Count do
begin
if not FileExistsUTF8(CurFiles[i]) then
begin
MissingFiles.Add(CurFiles[i]);
MasterPoListBox.Items.Delete(MasterPoListBox.Items.IndexOf(CurFiles[i]));
end;
Inc(i);
end;
for i := 0 to SL.Count - 1 do // we must check master .po files in a separate round first
begin
S := SL[i];
@ -400,12 +414,26 @@ begin
OL.Add(S);
end;
end;
if OL.Count > 0 then
MemoDlg(sTroublesomeFiles, Format(sTheFollowingOrphanedPoFileSFound, [IntToStr(OL.Count)]) + LineEnding + OL.Text);
if (OL.Count > 0) or (MissingFiles.Count > 0) then
begin
S := '';
if OL.Count > 0 then
begin
S := Format(sTheFollowingOrphanedPoFileSFound, [IntToStr(OL.Count)]) + LineEnding + OL.Text;
if MissingFiles.Count > 0 then
S := S + LineEnding;
end;
if MissingFiles.Count > 0 then
S := S + Format(sTheFollowingMissingMasterPoFileSWereRemoved, [
IntToStr(MissingFiles.Count)]) + LineEnding + MissingFiles.Text;
MemoDlg(sTroublesomeFiles, S);
end;
UpdateGUI(MasterPoListBox.SelCount > 0);
finally
ML.Free;
OL.Free;
CurFiles.Free;
MissingFiles.Free;
SL.Free;
StatusBar.SimpleText := '';
Screen.Cursor := Cur;