Start a new topic

Transit return packages

My next project will be a script or macro to create Transit return packages from the received Transit PPF files plus the exported language file that I've translated in CafeTran.


Steps to take:


1. Create a copy of the PRJ (the project definition) file in the Transit PPF package.


2. Change the value of the relevant parameter IsExchange to 1:


blob1478508632407.png



3. Zip the modified PRJ file and the exported target language file(s) to a TPF (project return) package.


So, for now I'll have to examine the smartest way to change the parameter.

Nice. And a funny exchange date in the source file.


Assuming that for IsExchange there are only the values 0 and 1, why not simple replace the string? 


Are you sure that the rest works?

Here is a macro that will create a Transit TPF return package from a folder on the Desktop that contains the PRJ definition file and the exported and translated target language files.

I still did not test it, but the macro still contains the hardcoded string


/Users/Hans/Desktop/


Any chance to generalize this for any other user (anyone that needs it and does not want to code in KM).


There should also be the chance to rename the source package to zip (I have the following to rename mqxliff to xlf (only for memoQ files that are sent to customers), to open it and to make the whole process more convenient.


blob1478591282667.png



Torsten: Any chance to generalize this for any other user


~/Desktop


H.

I'm not sure, but I guess /Users/Hans/Desktop/ can be replaced with ˜/Desktop ?


Please find attached the macro that I use to prepare Transit packages for processing in CafeTran. Please also note that my target language NLD is 'hard coded'.


These macros are for educational purposes. A more generic design would be good. A CafeTran-intern solution even better ;).


Please also note that in the current macro, the PRJ file isn't kept. I'll add this later, when I'm playing around again.


The four steps of the workflow then would be:


  1. Run unpack macro, a project folder containing the target language files and the PRJ is placed on the Desktop.
  2. Translate in CafeTran.
  3. Export the finalised target language files to the project folder on the Desktop.
  4. Run the pack macro to modify the PRJ and create a TPF.
Some day, Igor will hopefully implement this in CafeTran 2000.

CafeTran 2000? Uuh, back to the future.


Thanks anyway, I hope I will soon have the time to test this.

Yesterday, I sent my first Transit return package, created by the posted macro. The client didn't complain ;). Obviously he was able to process the return package, since he's sent me a 400 pages PDF to proofread the translated manual. Sigh....

Hans Lenting: The client didn't complain ;)


He will if that Torsten sends the return package.


iM0Iv8UZB6g4KBcG7F0bfOlwwHQ_WGigiQ.png


GlAhJjo3wCHLGebV0nPhQVmNGJ6hsIg29g.png


H.


I think you are mixing up things here, dear Hans. Besides that, my initial isn't 'F'. Anyway, thanks for taking interest in my postings. You could as well ignore them.


1 person likes this

Lenting: I think you are mixing up things here


I don't.


You could as well ignore them


I can, and maybe I should, but then other users will suffer.


H.

Now Torsten, you "liked" Lenting's posting above. Now tell me, Torsten, did you try the KB macro, or didn't you? And did it work? No you didn't try, and no it didn't. Torsten, you're in the same category of that Lenting... And I can assure you, that's bad, very bad.


H.

Those users that are able to work with KM are in most cases intelligent enough to modify a KM macro in such a simple manner.


1 person likes this

Dear Hans, I never claimed that the macro/script provided could be used as-is. They are meant as inspiration. He who wants to use automation, should be able to make any required and minor modifications, like replacing a user name. That being said, I should have made the macro/script more generic.


Thanks again for keeping me sharp!

Login to post a comment