vslavik / poedit

Translations editor for Mac, Windows and Unix
https://poedit.net
MIT License
1.71k stars 274 forks source link

Batch import of TMX files cancelled on first error #748

Open Eitot opened 2 years ago

Eitot commented 2 years ago

When importing multiple TMX files in one batch, poedit cancels the import when it encounters one file that e.g. has no translations or is malformed.

I have encountered this while trying to import hundreds of TMX files (Apple glossary files converted into TMX files). There are dozens of “empty” and occasional malformed TMX files among them that cause the import to be interrupted.

The problem seems to be on the one hand that TMX::ImportFromFile throws errors and that TMPageWindow.OnImportTMX on the other hand handles those errors by breaking out of the loop, thereby cancelling the import altogether.

Some possible improvements would be:

  1. asking the user upon the first error whether to: (1) cancel, (2) continue or (3) continue and ignore all further errors;
  2. ignoring some errors for batch imports only, such as the error when a file has no translations; or
  3. showing just one dialog when the import is completed to inform the user about errors that occurred.

poedit 3.0.1 (6416) macOS 12.3.1 (21E258)

vslavik commented 2 years ago

Leaving open for non-crappy UI implementation.