|
|
Getting started with automation using ezScript |
Catalyst offers a very large panel of Experts making tedious tasks a doodle. However while working on many languages as part of your localization project, you still have to repeat your steps a lot. This is where automation becomes important in saving time. This article is there to give you an overview of what can be achieved with ezScript and hopefully entice you to try it. The syntax and list of all the ezScript commands are detailed in CATALYST under FILE > Help > ezScript Reference The automation can start very small, from just creating TTKs with your latest source files to fully integrating with your localization build workflow. ezScript commands are like DOS commands which can be integrated in a scripting language or simply added to batch files (.bat). If you spend a lot of time creating new TTK projects daily as new sources are available from the development team, it is a good idea to build a small batch file to automatically generate a TTK for each of the languages supported. Better yet, the next step would be to leverage the translations from the previous translated TTKs leaving the new and modified strings for translation. We can even complete a small standard workflow by extracting the localised files ready to be deployed into a localized test build. It's not as complicated as it may sound and ultimately is where you want to go if you want to optimize an efficient localization process. And you don't have to find a way to include time in your busy schedule to investigate how to do it. You can take it one step at a time, starting with just creating TTK projects in a few minutes. ezScript commands can be added to a batch file in sequence and will be ran one after the other. The most basic implementation to complete the following 3 steps would look like this in your batch file: Let's take a closer look at each step Creating TTKs is a good starting point in testing out automation given it is what you probably do the most. A basic ezScript /M command looks like this Catalyst /M John TTKName:"C:\English\TTKFile.ttk" FromFolder:"C:\AllFiles\" /S /A Catalyst is either setup as a system environment (in your path) or you replace it with the full path to Catalyst.exe on your machine, i.e. "C:\Program Files (x86)\Alchemy Software\Catalyst 12.0\Catalyst.exe". This command appends all the files in the folder and sub-folders of C:\AllFiles into a TTK called TTKFile.ttk There are many more options available with the /M (Insert files) command. For instance you can insert files in 3 different ways: Specifying a single file, using a file list, or pointing to a directory which is inserted with all its contents recursively (or not). The really interesting point about the insert command is that in one command you are actually creating a TTK project, inserting one or more files, and declaring the source and target languages. That's a lot of clicks when performed in the interface!
With your TTKs created using your latest source files, you are most likely to want to apply your existing translations from the previous translated TTK. Catalyst /L John "C:\Version1\TTKFiles\File.ttk" "C:\Version2\TTKFiles\File.ttk" This command leverages all the files within the TTK C:\Version2\TTKFiles\File.ttk with the translations from C:\Version1\TTKFiles\File.ttk using the User Profile options contained in the registry. This means using the last leverage settings used in the Catalyst interface. Note at this stage that you can use another ezScript command to load different settings to suit your needs, but let's not worry about the settings in our first trial.
Finally, with your TTKs created and Leveraged, even if the translations are not completed you may want to immediately extract the files so they can be integrated in your daily localised build. To make sure nothing introduced in the new source files, or translations have caused some issues. Catalyst /E "C:\Version2\TTKFiles\File.ttk" "C:\Destination" This command extracts all files from C:\Version2\TTKFiles\File.ttk and stores them in C:\Destination. It's very straight forward.
Your imagination or process will dictate what you can add next. For example, you may want to add a Pseudo Translate step between the leverage and extraction so that all new strings are already translated before you extract the files for your Localized build going to QA. Thus testing already for any potential over translation which would break your build.
Explore an Advanced automation SampleWe have prepared a sample package to give you a case study to explore. You should be able to download and expand this zip file to a folder on your machine and use the batch files almost immediately. You'll first need to change the ProductVer variable to reflect the version of Catalyst you are using. This variable is then used in the Catalyst You will need to set the Catalyst path and the path to where you copy the files, so that the scripts can work. Once that is done, you can call RunAll.bat This calls all the individual steps to perform the following operations:
Alternatively, you can call each of the individual batch files 00 – 06 in order to see how they operate and examine the result after each step. I hope you will find it clear. Myself and the Support team are here to help you if you have questions.
Products or Versions Affected
|