Create WorldServer return package from Trados Studio 2015

I would like to create a plugin that allows the user to create a return kit in SDL Trados Studio 2015 and upload to the server from the Editor View.

What is the best method to access this functionality from the API?

I tried of course the FileBasedProject.CreateReturnPackage Method

But, this creates a Studio Return Package. This method produces a return package that cannot be imported to WorldServer, it produces this error message: "The import attempt failed because the selected file "Testpackage-2016516-10h59m0s.sdlrpx" does not have a recognizable extension by WorldServer, or metadata file is missing from the contents of the selected file if the file is a zip archive."

What is needed is an *.wsxz package created from this *.sdlrpx. The wsxz is essentially a stripped down xliff in a zip file that can be imported by the WorldServer.

Thanks in advance.

Parents
  • Hello Balázs,
    Just rename your package with "zip" as extension instead of sdlrpx. This should work.
    Do you already know how to upload the files on worldserver? With the worldserver REST API or with the studio API? I have a similar project myself.
    Kind regards
    Sébastien
  • Hi Sébastian. I tried, but unfortunately the package that is created has the incorrect content. WorldServer expects a zip-ed xlf. The Trados package unless converted to wsxz has a Trados project file, the original xlf and and sdlxliff off the current state of the Trados project. No bueno. No, I have not gotten into the upload part (but my collegue does have that part covered, we have plugin that uses the WS services already). Before I dive into it, I want to first sort out if it is possible at all to create an upload package. I have a workaround in place already where I actually automate the upload from within Studio by the default hotkeys, but of course this is very lame. Only until now I was not able to find an exposed API for the WS return kit.
    Best, Balázs
  • Hello Balázs,
    I've read your last answers on other threads and I think I understand how you work: you download xlf files from WorldServer and prepare them in Studio with the wsxliff or the xliff filetype. Is this right? In this case, you have to convert the sdlxliff back to xlf first. I haven't try it, but it seems that the "savetargetas" method of the editorcontroller does the job. Then, try to upload the file on worldserver directly with the plugin you mentioned. I'm not sure you have to zip the xlf files before.

    The other way to translate worldserver files is to download wsxz packages which contain sdlxliff files. In this case, you will be able to work with project TMs and termbases if available and you don't have to "savetargetas": you just have to zip the sdlxliff as they are and upload them on worldserver.

    Kind regards
    Sébastien
Reply
  • Hello Balázs,
    I've read your last answers on other threads and I think I understand how you work: you download xlf files from WorldServer and prepare them in Studio with the wsxliff or the xliff filetype. Is this right? In this case, you have to convert the sdlxliff back to xlf first. I haven't try it, but it seems that the "savetargetas" method of the editorcontroller does the job. Then, try to upload the file on worldserver directly with the plugin you mentioned. I'm not sure you have to zip the xlf files before.

    The other way to translate worldserver files is to download wsxz packages which contain sdlxliff files. In this case, you will be able to work with project TMs and termbases if available and you don't have to "savetargetas": you just have to zip the sdlxliff as they are and upload them on worldserver.

    Kind regards
    Sébastien
Children