SDL PowerShell Toolkit

SDL is pleased to announce the availability of a beta version of the SDL PowerShell Toolkit.

The SDL PowerShell Toolkit is a set of modules using Windows PowerShell scripting technology and the Project Automation and Translation Provider APIs from the SDL Trados Studio Professional SDK. In a nutshell, the modules provide functions and sample code that you can re-use in your PowerShell scripts to automate SDL Trados Studio. They feature an initial set of code for use in typical Studio automation tasks such as creating a project, a translation memory or a package derived from a project. You can use these as a starting point for your own PowerShell-based efforts. It is assumed that the reader is familiar with Windows PowerShell as well as an initial understanding of the SDL Trados Studio SDK, in particular the project automation API.

Over time, we would like to see the development community develop further modules and helpful functions that we can share with each other.

Best regards, Ian

Ian Davies | Senior Product Manager | SDL | Language Technologies Division | +44 7826843819

Paul Filkin | RWS Group

________________________
Design your own training!

You've done the courses and still need to go a little further, or still not clear? 
Tell us what you need in our Community Solutions Hub

PowerShellToolkit.zip
Parents
  • Hi,

    Just an update to let you know that there is an updated version of the PowerShell Toolkit here:

    No major changes, but support for Studio4/5 and couple of things here and there:

    • The paths to the .dll files are now identified regardless of the operating system(32-bit of 64-bit)
    • The user can select which version of Studio is in use (Studio4 or Studio5)
    • The script now creates in "SampleRoundtrip.ps1" a sample text file with custom content
    • The "Get-Project" function only requires as parameter the path to the .sdlproj file
    • The "New-Project" function automatically creates the source file directory
    • Updated the "New-FileBasedTM" function from TMHelper module to use the new implemention from Studio
    • Updated the "New-Project" function from "SampleRoundtrip.ps1” to use the new implementation from Studio

    Thanks to  for updating it and to  for his advice during the process.  I know this doesn't solve all the problems raised as some of the things require changes in Studio but this is an improvement which I hope will be useful.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • To give back something to the community, here is my modification of the Powershell Toolkit.
    I dare to say that after all the modifications and enhancements it has hardly something to do with the original toolkit anymore...

    https://github.com/EvzenP/STraSAK/

    I have also a GUI launcher created as Powershell script, but since it's somehow contradicting the main purpose of scriptable automation (i.e. avoiding clicking in GUI), I'm probably not going to release it anyway ;-)

  • Thanks Evzen, it's great that you have shared your work. I hope it's helpful for other localization engineers out there working with powershell as extensively as you do.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • The point is that the "consumers" don't need to know anything about Powershell.
    It's just that the scripts are written in Powershell... but that doesn't say anything about the environment they can be used in!

    I really don't understand where this weird asumption comes from... it's like if people would assume that they need to know C# if they want to use Trados Studio or Microsoft Office... :-\

  • Perhaps you should have posted this into the TP forum and not the developers forum then? I assumed incorrectly based on you sharing code for coders.

    Still happy to see you share your work though :-)

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • I just posted it to the most logical place - the original PS Toolkit thread.
    Nevermind, I've placed it to my signature ;-)
  • Hi Evzen,
    thanks a lot for your work. The scripts help me a lot!!
    I just have one problem: i can not use project templates with server based tms. Do you know what i have to do that i can use the powershell scripts with groupshare tms?
    When i run new-project i get the follwing error, as soon as the first tm related task (in this case analyse) is started:

    Error: Unexpected exception when initializing task 'Analyse': Die Übersetzungs-Engine 'sdltm.myServer/ konnte nicht instanziiert werden

    Any hint what i can do would be great!

    Best Regards,
    Michael
  • Hi Michael, I'm really glad to see someone using STraSAK! Cool!

    It could be that the forum corrupted the TM URI you pasted, but if not, then it looks like you have the TM URI incorrectly written:

    sdltm.http://myServer/?orgPath=/&tmName=DE-EN

    According to the SDK it should be like this (assuming that the TM is placed in the root and its name is "DE-EN"):

    sdltm.http://myServer/DE-EN

    Try to format the TM URI like this (actually, it should be done automatically by Studio when creating the template) and see if it works.

    I can't try it as I don't have access to any GroupShare TMs anymore. And I actually never used STraSAK with GroupShare... I only started implementing server-based TMs support, but then lost access to needed resources...

    EDIT:
    Just managed to get .sdlproj file with GS TM defined... the format is different from what the SDK says :-O

    sdltm.https://blablabla/?orgPath=%2Fblablabla%2F&tmName=blablabla

    So if the URI format in your template matches this format, then I would say there is something strange happening in Studio... like it's not initializing something when automated from external application instead of internal plugin, or something...
    It would not be the first time, unfortunately...

  • Hi Evzen,

    many thanks for your response! I think i used the correct uri.
    I justed created a testscript and accessed the server tms an get information about the content, so i think the "connection" works.
    As soon as i use any task which is TM related it doesn't work and throws the errors...

    Maybe i cancel this project... I can't get any help from SDL, the support closes immediatly any api / sdk / rest related case. It doesn't matter if it is a question or if you want to push a bug to them. It takes me nearly 2 month to tell SDL that there is a bug in the REST Api... No it is a offical bug, which will hopfully be adressed soon.

    I do not know if this here is a bug or something else and it's to hard to find out without any response from SDL.

    Anyway: Thanks for your response and your scripts!! :)

    Regards,
    Michael
Reply
  • Hi Evzen,

    many thanks for your response! I think i used the correct uri.
    I justed created a testscript and accessed the server tms an get information about the content, so i think the "connection" works.
    As soon as i use any task which is TM related it doesn't work and throws the errors...

    Maybe i cancel this project... I can't get any help from SDL, the support closes immediatly any api / sdk / rest related case. It doesn't matter if it is a question or if you want to push a bug to them. It takes me nearly 2 month to tell SDL that there is a bug in the REST Api... No it is a offical bug, which will hopfully be adressed soon.

    I do not know if this here is a bug or something else and it's to hard to find out without any response from SDL.

    Anyway: Thanks for your response and your scripts!! :)

    Regards,
    Michael
Children
No Data