Working with Variable Lists

Updated January 2015 : Also possible, and easier, to use the Variable Manager from the SDL OpenExchange for this.

I mentioned in a previous post that it wasn’t possible to import long variable lists into a Studio Translation Memory using the desktop version of Studio. You can do this with GroupShare, but the ability to do this in the desktop version is a work in progress.

Well that wasn’t quite true and as I’ve been preparing for some roadshows and events that are coming up this month I figured out a simple workaround using SDL Trados 2007 Suite.

The principle uses the ability of Studio to upgrade a Trados 2007 Translation Memory and migrate all the language resources at the same time, so segmentation rules, abbreviation lists, variable lists and ordinal follower lists.  So, here’s what I did… I have a Studio Translation Memory, in this case English to German, and it has no variables at all. I also have a text file containing thousands of post codes which I would like to be variables in my Studio TM.  So first I create an empty Translation Memory using SDL Trados 2007 Suite and I copy and paste the list of variables in one go into the variables list in Workbench here (no lessons on how to use Workbench here… hopefully not needed!):

I then upgrade this Translation Memory in Studio, but also select my Studio Translation Memory like this:

On the next screen I can decide how I wish the TMs I selected to be handled in terms of merging them or just upgrading them.  So I merge them into a single TM, which I can do as they have the same language combinations:

This next part is the important bit.  On this screen there are six tabs across the top containing various options to consider when upgrading your TMs.  The last tab to the right is the Language Resources tab where you have the opportunity to use an upgraded language resources template with your new merged TM.  I choose to use the upgraded one and click on Finish:

That’s it… I now have a new TM in the same folder as the one that contained my Workbench TM and my original Studio SDLTM.  If I open this one in the Translation Memory View and look at the language resource settings I can see that I now have the Variable List and the Segmentation Rules as bold items which tells me they are not the default anymore:

If I double click the Variable List I now see that my list of thousands of postcodes are in my Studio TM and I didn’t have to enter them one at a time:

So, that was pretty painless and a useful exercise… but just a few notes on this.  First, if you had custom segmentation rules in your Studio TM then these will not be present here because you have just used the upgraded rules from Workbench.  So you would have to reset them by selecting the Segmentation Rules item and clicking on Reset:

Then, if necessary you add in your custom rules again, Studio is using a new merged TM for this so you can open your original and copy the rules… nothing is lost.  Or just reset them so you are using Studio defaults rather than the older Workbench rules (unless you had a reason for wanting the workbench rules of course..!)

The second thing I wanted to mention is that you could go through this with two empty TMs, one from Workbench and one from Studio so that you now have a “shell” TM, and then export your Studio TMs as TMX into your shell.  This way you don’t have to worry about custom anything as you have the required language resources in your “shell” and all you do is import the Translation Units.

12 comments
  1. Markus said:

    nice, but I don’t have or ever had any pre SDL Trados 2011. I did it like this instead:

    – create a variable list Studio in the Language Resource Template with a single entry and save it.
    – open the .sdltm.resource in a text editor. you’ll see it’s a bog standard xml file.
    – scroll near the end where you find the element […here comes your base 64 encoded entry…]
    – now go to you old list. it has to be saved in a plain text file, utf8 encoded with each variable on a separate line (if you’re not sure about the encoding open it in Notepad and save it as utf8)
    – encode the file base64 (eg. here: http://www.webutils.pl/index.php?idx=base64)
    – replace the stuff within the element (the […here comes …] above) with the base64 encoding. Save and close and Done.

    cheers
    Markus

    Like

    • Very clever workaround Markus, especially for anyone who is not upgrading their old resources but rather starting afresh. Hopefully the import list feature available in GroupShare, or a simple copy paste as we had in Trados 2007, will be made available in Studio soon.

      Like

  2. Vishwa said:

    It will be nice to have an OpenExchange utility to handle all this, I becoming too old a dog to learn new tricks 😉

    Like

  3. But unfortunately it appears that no wildcards or regular expressions can be used in defining variables. Listing all the letter+number combinations that I can possibly encounter in a vast automotive workshop manual project is contrary to its purpose.

    Like

    • Hi Piotr, I agree it would be very useful to have regex capability here. I know this is on the product backlog for a future release. In the meantime you might find the Terminjector useful. I wrote two articles that may be handy;

      multifarious.filkin.com/2012/08/31/terminjector/

      And

      multifarious.filkin.com/2012/12/03/nonrecognised_placeables/

      They take a little figuring out but once you have your head around it this can be incredibly useful.

      Regards

      Paul

      Like

      • Actually I have used Terminjector for nearly 4 months now and I do recommend it too. But need to keep reminding myself that the regex flavor supported is POSIX, because I learned regular expressions with Perl.

        Regards,

        Piotr

        Like

  4. Studio’s support for variables appears to be shaky, one moment it works the other one it does not. Also I find that some characters cannot be used in variables, and what’s more other types of recognition, acronym (uppercase abbreviation) recognition in particular gets in the way of recognition of certain variables. I had to disable abbreviation recognition to get all my variables to work.

    Like

  5. Frank said:

    For those who do not want to do base64 encoding/decoding online, there is also a Notepad++ plugin called “MIME Tools”.
    After installing this, you simply open the “.resource” in Notepad++, select the text that is enclosed between and , and then run “Plugins->MIME Tools->Base64 Decode”.
    Then you can read and edit all the text.
    And when you are done editing, you select the text again and run “Plugins->MIME Tools->Base64 Encode”. That is all.

    http://sourceforge.net/p/notepad-plus/discussion/482781/thread/a8fad546/

    Like

    • Thanks Frank… or course the Variables Manager on the OpenExchange means you don’t need this anymore. But good to know. I used this one, base64, that runs as a command line or you can add into EditPadPro so it runs smoothly on any file you have open. Glad this is a thing of the past now!

      Like

      • Frank said:

        Good to hear that!
        But as far as I understood, the new Variables Manager only applies to variables and not to abbreviation lists, segmentation rules, etc.
        So decoding Base64 might still be a necessity, if you want to transfer for instance long abbreviation lists from one language resource template to another.

        Like

      • Also true! The Beta version did handle these too… but that was in error and we had to fix it. But that mistake does leave room for an enhancement when I get some budget!

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: