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
  • Rotten thread, I know... but anyway...

    I started playing with the PowerShell Tookit, modified the modules to accept the Studio path (Studio2, Studio3, etc.) as argument, so that I can easily play with different installed Studio versions... Still playing only with the Sample_RoundTrip script, though...

    But I'm struggling with the filetypes known to the API-created project, in particular a MemoQ XLIFF.

    According to the API documentation, method used by PowerShell Toolkit for creation of new project "creates a new project based on the default project template set up in SDL Trados Studio. "

    But... while Studio 2015 recognizes a *.mqxliff file - apparently because it's included by default, no need to Install File Type from OpenExchange - and produces correct analysis stats, Studio 2014 does not and spits out only zeroes... and I don't understand why, since my Studio 2014 default project template DOES include MemoQ XLIFF file type!

    Even if I create a copy of my default project template as "Default" profile - just in case the API uses the "Default" profile instead a default profile - it still does not work.

    Where is the catch?

  • Did you try to:
    - check in Trados options (not in project settings or template) if the correct filetype is installed and active
    - remove all templates except default, create a project with the ideal settings in trados and update the default template that way

    - install "variableexplorer" inside powershell and try, by setting breakpoints, to check the properties of passed objects, sometimes the error lies elsewhere...

    https://gallery.technet.microsoft.com/PowerShell-ISE-VariableExpl-fef9ff01

    Hope this helps while waiting for more expert answers.

    Good luck!
  • Yes, I do have the filetype visible and active in the global Options dialog.

    I will look into the variable explorer, but since all this crazy PowerShell stuff is all Greek to me, I can't gurantee it will help me.

    Again... this entire move away from COM is VERY BAD signal to (power)users.
    Everything used to be SOOOO simple for users without development background... And this .NET-ish stuff is pure signal to these users that nobody cares about this group anymore and that ONLY real developers are in the view :(
Reply Children
  • Well.. systems and applications used to be more simple too.

    I think more and more users will be split among normal users and developers, normal users will have everything "ready to use" without any access to under the hood thinkering, while to mess with stuff you will have to be properly trained.

    the SDL PS SDK is anyway a welcome option for power users, once you get accustomed to PS is not that bad.
  • Well, but that "once you get accustomed to PS" is the problematic condition here.
    Despite many developers' claims, PowerShell is NOT something commonly used and known. It's a fact. Period. Microsoft is ~20 years late here (just as is with the "revolutionary" commandline console enhancements in Windows 10).

    Anyway, after my first few days with PowerShell and the PowerShell toolkit I can only say that it should have been somehow updated before releasing it... several years and several Trados Studio versions after it was created...

    Trying to run the sample on a today's standard Windows 7 machine coming with PS 2.0 led to a huge number of weirdly looking errors which I, as a total PS newbie, was not able to understand.
    It took me several hours of googling, editing some XML config files in order to overcome some PS 2.0 vs. .NET 4.x incompatibilities, a LOT of swearing and countless trials and errors until I finally gave up and installed PS 4.0, which washed away the errors...
    Is THIS really supposed to be easy for users?! Is this really supposed to encourage someone to start playing with the toolkit? Come on, you can't be serious...
    If something is for free, it doesn't mean that it should not work.

    Plus, the PS code in the sample deserves some update too... even I now know that e.g. "Write-Host" should not be used unless really necessary (Write-Output is the right way).
    I understand that the code was probably created before these best practices were published, that's fine (when I look back at some of my early scripts, I would slap myself too), but it was released only now, so should have been reviewed before release...