Dear Alchemy Technology user,

My name is Cyril Vallin, I am the Product Support Manager at Alchemy Software Development.

This TechBytes Email is to share our experiences with our users so that we can all benefit and enhance our use of Alchemy technology. With writing in-depth features and processes articles I hope to promote advancement amongst all of you, Alchemists.

In this release, I list all the New and Updated ezScript commands in CATALYST 12.

   
 

New ezScript commands and options introduced in Catalyst 12

Many updates have been added to ezScript in Catalyst 12. I thought it useful to list them out to you. Rather you have an existing automation in place for your Localization builds or you are thinking of setting such automation, I have no doubt listing all new ezScript capabilites in Catalyst 12 will be greatly beneficial to you. I did the same for the Catalyst 11 ezScript enhancements and this was very well received.

Look into the EzScript reference under FILE > Help > ezScript Reference for the comprehensive syntax details of all ezScript commands, old and new.


The following are the new and updated commands.

 
 

Delete or Rename a file or folder

It is now possible to delete or rename a specific file or folder from a TTK using the /CAT_DELETE or /CAT_RENAME parameter respectively.

/CAT_DELETE

Specify the exact path to a file/folder or choose to delete all matching occurrences based on the syntax used.

Example:

Catalyst /CAT_DELETE TTKName:"C:\CatlaystSample\MyProject.ttk" FolderName:"\WWW"

 

/CAT_RENAME

Specify the exact path to a file/folder or choose to rename all matching occurrences based on the syntax used.

Example:

Catalyst /CAT_RENAME TTKName:"C:\ProjectA\MyHelp.ttk" FileName:"\Online Help\Guide.chm" RenameTo:"User_Guide.chm"

 

Change a string status to another

Change the status of segments within the TTK by filtering on a segment status or property and applying another. The following are the statuses and properties which can be modified.

Segment Status:

  • ForReview
  • Signedoff
  • Leveraged
  • Fuzzy
  • MachineTranslated
  • Untranslated

Segment Properties:

  • Flagged
  • Unflagged
  • Locked
  • Unlocked

Example:

This command will apply a flag property to all strings with the Leveraged status.

Catalyst /ApplyStatus TTKName:"C:\CatlaystSample\MyProject.ttk" Filter:Leveraged Apply:Flagged

 

Extra flexibility inserting files

Relative paths

Prior to Catalyst 12, inserting files from a file list (i.e. using the FileListFile switch) would require the file list to include Absolute paths. Now you can specify a relative path instead. Using the FileListFile switch in combination with the RelativeTo switch, Catalyst will resolve the folder/file paths by amalgamating both the directory listed in the RelativeTo path and the files listed in the Filelist.txt.

Example:

The Filelist.txt file can be updated to include only the filenames with the path specified in the RelativeTo switch as C:\Samples

Absolute Path Relative Path

"C:\Samples\Catalyst.rc"
"C:\Samples\Catalyst.exe"
"C:\Samples\IDBasedFiles.txt" Rule:"MyNewParser"
"C:\Samples\Conditional.xml" Rule:"XML ShowAll"
embedded ext:xml Rule:"XML ShowAll"
embedded ext:js Rule:"MyJSRule"
"C:\Samples\Catalyst.dll"
"C:\Samples\SampleMFC.vcxproj" VSConfig:"Debug|AnyCPU"

Catalyst.rc
Catalyst.exe
IDBasedFiles.txt Rule:"MyNewParser"
Conditional.xml Rule:"XML ShowAll"
embedded ext:xml Rule:"XML ShowAll"
embedded ext:js Rule:"MyJSRule"
Catalyst.dll
SampleMFC.vcxproj VSConfig:"Debug|AnyCPU"

Insert by File extensions

When inserting files from a folder location with the /M parameter, it is now possible to mask part of the filename with the character *. With this enhancement, you can now insert any file based on its extension. Use the FileTypes: switch in conjonction with the FromFolder: switch to insert masking the filename. Multiple masks can be defined using a comma separator between each declaration, for examples "*.html,*.txt" or "*.dll,*.exe" or "*RC*.*"

This means it also works to insert files based on partial filename using * as a mask.

Example:

The following command will insert any filename starting with "cat" with either extension .dll or .exe.

Catalyst /M cyrilv TTKName:"C:\ProjectB\files_of_type.ttk" FileTypes:"cat*.exe,cat*.dll" FromFolder:"C:\Project_Files\VersionB" /S /A

 

Set a TTK to Disallow Machine Translation or Unlocking of segments

As part of a TTK's Properties you may prevent users from leveraging from Machine Translation sources or prevent from removing locks set on segments. Using the interface this is achieved by right clicking the Project Title > Properties > Protected properties and now this functionality is extended to ezScript.
The TTK properties ezScript command /P can set those protected properties. It also allows to set or confirm a password needed to change those settings.

Example:

Catalyst /P TTKName:"D:\test.ttk" prevent_unlock:false prevent_mt:yes prevent_password:topsecret

 
 

New ezScript commands and options to be introduced in Catalyst 12 SP1

The list does not stop here! I can already reveal the commands & options which will be included in the upcoming release of the first Service Pack (at the time of this article). You heard it here first ;-)

The following are the new and updated commands in SP 1.

 
 

Set Project Title added to Create TTK command /M

The /M parameter to create TTK files is the backbone of ezScript automation. With just one command needed to create a TTK project, set the source and target languages and insert localisable files. But you always needed to run another command in order to change the project title!
No longer. The NewTitle: switch has been added to set the project title without the need to run a subsequent /P command.

Example:

Catalyst /M John TTKName:"C:\English\TTKFile.ttk" FromFolder:"C:\AllFiles" /S /A NewTitle:"Project B - French" SourceLang:"English (Ireland)" TargetLang:"German (Germany)"

 

Align or Extract based on file types

Using the same principal as described in the "Insert by File extensions" section above, Aligning and Extracting will also adhere to the masks defined in the FileTypes: switch.

Example:

Aligns only .flprj files found in the "En" and "Pl" folders into the En-Pl-Alignment.ttk

Catalyst /T cyrilv "C:\Project\Files\En" "C:\Project\Files\Pl" C:\Project\En-Pl-Alignment.ttk FileTypes:"*.flprj" Sourcelang:"English (Ireland)" Targetlang:"Polish (Poland)" /A

Extract only files with extension .dll, .rc and .json from the MixedFileTypes.ttk project

Catalyst /E "C:\Samples\MixedFileTypes.ttk" "C:\Samples\Extracted" Filetypes:"*.dll,*.rc,*.json" /P

 

Select encoding on extracting text based files

A new switch has been added to the extract command /E to reflect the new ability to set the encoding added to Catalyst's text file handling. Using the switch TextFileEncoding: choose an encoding between ANSI, UTF16, UTF16BE, UTF8 or UTF8_NO_BOM. Furthermore used in conjonction with Filename: you may extract one specific file with the desired encoding.

Example:

Extracts all text based files in MixedFileTypes.ttk with the encoding of UTF8 without BOM.

Catalyst /E "C:\Samples\MixedFileTypes.ttk" "C:\Samples\Extracted" TextFileEncoding:"UTF8_NO_BOM" /P

Extract only the file Idbasedfiles.properties from SWProject.ttk setting the encoding to Unicode big endian

Catalyst /E "d:\Project\SWProject.ttk" "d:\Project\Extract" Filename:"Idbasedfiles.properties" /P /S ezlogfile:"d:\Project\Batchlog.txt" Textfileencoding:UTF16BE /write

 

Output list of files contained in TTK project

A completely new ezScript command /GetFileNames is used to output a list of all file names which are contained within a TTK file to a text file. The option to have the path within the TTK project is available with the /Verbose switch.

Example:

Catalyst /GetFileNames TTKName:"C:\Project\Project1.ttk" OutputFile:"C:\Project\TTKfilenames.txt" /Verbose

 

Specify a Digital Signature file while extracting .NET assemblies

Use the SNKFile: switch to specify the path for the digital signature key file to be used to fully sign the .NET language assembly files while extracting them.

Example:

Catalyst /E "C:\Samples\DotNETProject.ttk" "C:\Samples\Extracted" SNKFile:"C:\Samples\Signing\Key.snk" /P

 

Include language file resources while inserting .NET assemblies

When inserting folders which contain .NET files, you can now specify if you want to also include the language file resources using the /.Netlangfiles switch.

 

Layout Manager settings included in User Profile

The Layout Manager settings are now written to the User Profile .ini file. This part is done in the interface. The settings are now availabe in ezScript when loading the User Profile with the /C command.

 

 
 

Thanks for taking the time to read this instalment of TechBytes. It has been fun to write and I hope you found some if not all of it beneficial.

I always welcome new article ideas, so if there is a feature you feel works really well and is worth mentioning, or indeed if clarification on a particular topic would help you, please let me know so together we can make TechBytes as useful as possible for everyone.

Remember all the previous released articles are available on our website, in the Support section. Use your Support Centre login to access all the past articles along with other resources available to our premium support members.

My best wishes
Cyril Vallin

 

Alchemy Software Development Ltd. | Block 2 | Harcourt Business Centre
Harcourt Street | Dublin 2 | D02 DX37 | Ireland