poedit icon indicating copy to clipboard operation
poedit copied to clipboard

Batch import of TMX files cancelled on first error

Open Eitot opened this issue 2 years ago • 1 comments

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)

Eitot avatar Apr 25 '22 23:04 Eitot

Leaving open for non-crappy UI implementation.

vslavik avatar May 13 '22 17:05 vslavik