Batch Translation Step not writing output file
Original [issue 260](https://code.google.com/p/okapi/issues/detail?id=260) created by @fliden on 2012-07-28T01:17:59.000Z:
If running the Batch Translation Step as the only step and just doing a copy of the file from ${inputPath} to ${outputPath} it doesn't write out the original file.
In addition the following error is outputted:
Total entries sent to translation = 918 ERROR: null
However, if checking the create TMX file and specifying an output tmx. It processes without errors. But still doesn't output the original file.
It does pass the file down the pipeline though so other steps can use it. It would be nice to be able to do a quick and dirty BatchTranslation
Comments (4)
-
Account Deleted -
Account Deleted - changed status to resolved
Comment [2.](https://code.google.com/p/okapi/issues/detail?id=260#c2) originally posted by @ysavourel on 2012-07-28T09:21:55.000Z:
The issue (trying to generate the multi-events event even when the 'send tmx' option was not set) was easy to fix, so I did it. That should go into the dev branch in the next push.
-
Account Deleted Comment [3.](https://code.google.com/p/okapi/issues/detail?id=260#c3) originally posted by @ysavourel on 2012-07-28T09:37:45.000Z:
This issue was closed by revision 1ebbdc90df06.
-
Account Deleted Comment [4.](https://code.google.com/p/okapi/issues/detail?id=260#c4) originally posted by @fliden on 2012-07-30T16:04:04.000Z:
Great, thanks Yves! I was running sed wrapped in a batch file but good to know about the cmd /C copy as well.
- Log in to comment
Comment [1.](https://code.google.com/p/okapi/issues/detail?id=260#c1) originally posted by @ysavourel on 2012-07-28T04:33:53.000Z:
There maybe multiple issues. First I think you cannot just run a "copy ${inputPath} ${outputPath}" as that causes error when launching the process. You can run "cmd /C copy ${inputPath} ${outputPath}", which spawns the DOS shell and call copy.
Once that works we still have a bug in theway we end the callto the BatchTranslator. If no TMX is produced and even if 'send tmx output to the next step' is off the endBatch() method of the BatchTranslator tries to generate the multi-events event with a null tmx path.
We need to a) make sure endBatch() does generate the multi-events event only when asked, and generate an error if there is no tmx (actually we should check that early on).