Tech Mail

August 2014

News and Updates | New features for Catalyst 11 | Exploring automation
Managing .NET 32bit and 64bit assemblies | Locking the version block in .NET assemblies

 

Dear Alchemy Technology User,
Cyril Vallin


It's the height of the summer and the Alchemy Software headquarters have had an unusual exposure to a nice, long sunny summer. Ireland doesn't get as much rain as legend would have it, but it's never that sunny either :-) And so it is with an invigorated heart that I bring you another issue of my quarterly release of Alchemy TechBytes.

The TechBytes newsletters are all about learning about Catalyst and its Experts, discovering features you may not be familiar with, making the most of the tool and getting tips on maximizing your productivity. I personally select and compile the articles based on the most common or interesting questions from you our support customers.

All the 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.

As always, don't hesitate to let me know if there is any topic you would like covered in this TechBytes newsletter.

Cyril Vallin
Product Support Manager at Alchemy Software Development. 


 

News and Updates

Event: Current and Future Trends in Localization

 

Enda McDonnell, Managing Director and Chief Software Architect @ Alchemy Software will be a speaker at the Help & Localization Conference 2014 in Helsingør, Denmark on November 6th, 2014.

Event organizer: Per Frederiksen

Event details: http://www.write2users.com/help-localization-conference-2014

 

 

 
New features for Catalyst 11

I wanted to wet your appetite and list out the new features which you can expect to see in the release of Catalyst 11, currently in development.

New File Formats support

  • Documentation formats are now an integral part of Catalyst parsers. Consolidate and optimise your existing translations using Catalyst 11 for both your application files and your documentation files. New formats include Word, PDF, PowerPoint and InDesign.

Documentation - .doc, .docx, .pdf, ppt and pptx
Design Rich - InDesign (.idml)

  • JSON dedicated parser
    Complete support for .json (JavaScript Object Notation) format. Define parsing rules by selecting all or some of the string IDs found within your localisable file.

  • Support for Ribbon Controls.
    Translate ribbons in context with visual view. The parser support .mfcribbon-ms or ribbons resources found within executables.

XLIFF Export / Import
Alchemy Catalyst DeveloperPro always had the ability to export projects for translation in the free edition, Translator Lite – giving linguists a no-cost method of translating Catalyst content.
With Catalyst version 11, the Developer Pro edition goes further.  External editing of Catalyst projects is now possible in any xliff editor thanks to the new ability to export Catalyst projects to xliff and import back from the modified document.

XLIFF segmentation
In xliff, the translatable unit is the <trans-unit> element and it normally contains a segment of text to translate.  Some clients store multiple segments (i.e. a paragraph) in the <trans-unit>.
The challenge here is that it is not very efficient when it comes to reusing translations.  Alchemy Catalyst Version 11 addresses this and allows for the <trans-unit> to be divided when multiple segments are encountered and to be reassembled post-localization when extracting the translated document.

UI Redesign
For version 11, we have redesigned the menu system, bringing the most common features to the fore and logically grouping others so users can find all the features they need very easily.  The new ribbon UI is engaging and intuitive.  It may seem a little unfamiliar to start with for the veterans, but in no time we will be saving you time and mouse clicks as you adopt the engaging and intuitive ribbon UI.

Term Harvest 2.0
Catalyst’s Term Harvest feature is one of the most beneficial because it drives corporate terminology strategies.  The first release of Term Harvest (released in Catalyst version 10) was expert at finding terms within software content.  With the inclusion of documentation formats in Catalyst 11, we have had to take another look at this process.  This new version is far superior, taking all of what went before and adding natural language processing and part of speech analysis.  In addition to locating the terms more accurately, the process of reviewing suggested candidates has also been significantly enhanced.

Leverage Expert Enhancements

  • Persistent MT and Fuzzy match status
    If a string has a status of MT (Machine Translation) or Fuzzy match in the translation memory, this status is maintained on leverage into a new TTK project. The status will only change when a user changes the status of the string to for Review or Signed off.

  • Apply penalty to TM
    Set a percentage penalty to any of the Active Translation memories. This will result in 100% matches getting leveraged but marked as Fuzzy match based on the penalty set on the TM.

  • Leverage source details
    All leveraged strings will now store information on the TM source and user who performed the leverage. It also will include the date and time of leverage.

Pseudo Translate Expert
Improved quality and accuracy of the pseudo translations applied to your project with the introduction of expansion and contraction of strings based on the number characters found in the source text. Keep the expansion low for short strings and large for longer strings, you're in control.

Other changes
Wordwrap in string list for Chinese/Japanese/Korean languages
Inconsistent Inline tags validation test extended to check matching inline tag attributes

 

 
Exploring automation

Catalyst offers a very large panel of Experts making tedious tasks a doodle. However while working on many languages as part of your localisation project, you still have to repeat your steps a lot. This is where automation becomes important in saving time.
With this article I want to give you an overview of what you can do with ezScript and hopefully entice you to try it :-)

The syntax and list of all the ezScript commands are detailed in Help menu > ezScript Reference

The automation can start very small, from just creating TTKs with your latest source files to fully integrating with your localisation build process. 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 localised 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 localisation 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 TTKs 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 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 10.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 stored then 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 Localised build going to QA. Thus testing already for any potential over translation which would break your build.

 

Explore an Advanced automation Sample

We 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 will need to set the Catalyst path and the path to where you copy the files, so that the scripts can work.
There are 2 paths in SetPaths.bat that you need to amend so this will work.

Once that is done, you can call RunAll.bat
This calls all the individual steps to perform the following operations…

  • Cleans Up old translation TTK files to a single multi-lingual TM file
  • Creates new TTKs with the new version files
  • Makes languages copies of the new files
  • Leverages new projects from old TM
  • Pseudo Translates any new/modified strings
  • Validates the content to create a report (view this in IE)

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.

 

 

Managing .NET 32bit and 64bit assemblies

Although Catalyst can manage all types of file format regardless to it being the 32bit or 64bit Catalyst edition, to manage .NET assemblies, one version or the other may be necessary depending on the flag set within.

.Net assemblies are compiled for x86 (32bit) or x64 (64bit) with one of the following flag:

Any CPU
32 bit
64 bit

This flag affects the version of Catalyst you need to use to insert and translate the assembly. The table below shows that while an assembly with "Any CPU" flag can be translated in either Catalyst 32bit or Catalyst 64bit, a specific CPU assembly needs to be translated in the relevant Catalyst version.

Using the Microsoft tool CorFlags.exe, you can examine an assembly's status.

 

x86 Catalyst

x64 Catalyst

Targeted Platform

File Insertion

TTK Open

File Extraction

File Insertion

TTK Open

File Extraction

Win32

Yes

Yes

Yes

No

Yes

No

Any CPU

Yes

Yes

Yes

Yes

Yes

Yes

x64

No

No

No

Yes

Yes

Yes

Opening a TTK which has 64 bit .NET files in a 32 bit edition results in this message:

This TTK contains 64-bit Microsoft .NET Framework assemblies and cannot be opened.
You must be using a 64-bit Catalyst build to open this file.

However note that 32 bit files in a TTK file can be opened in a 64 bit edition of Catalyst but cannot be inserted or extracted in a 64 bit version.
The files must have been inserted in a 32 bit edition of Catalyst.

 

Catalyst 10 32bit & 64bit installation

It is possible to have both versions of Catalyst installed on a Windows 64bit operating system. Both installations will share the same license file and settings.
Catalyst 32bit gets installed in the C:\Program Files (x86) folder.
Catalyst 64bit gets installed in the C:\Program Files folder.

Windows 64bit will install all 32bit native applications in the Program Files (x86) folder using WoW64.
WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. WOW64 is provided with the operating system and does not have to be explicitly enabled.

 

 
Locking the version block in .NET assemblies

If you are dealing with .NET assemblies, you are probably familiar with over translating the version block which result in breaking the assembly when extracted. Indeed, there are several items found in the version resource which must not be changed as part of localising the file. You discover this very quickly when you for example Pseudo Translate the file to test it in your localised build.

For example, this version block ...

... is pseudo translated with French settings like so ...

... but extracting the file results in an error seen in the Results pane

 

ALINK: error AL1026: The version specified 'FR_1.0.3845.340611.0_FR' is invalid

Failed to create the Satellite Assembly.


The best approach as you guessed it is to lock the strings which should not be translated. This can be easily achieved using the " Apply Lock & Keywords" feature and locking based on the ID. If you need to learn more about this feature or need to brush up on how it works, let me refer you to those articles I wrote in a previous TechBytes release:

Locking Keywords
Locking strings based on IDs

Add the following to your Keyword file or create a separate keyword just for the purpose of locking .NET version blocks. There is no reason you can't apply several Keyword files in sequence. So the way you utilize keywords is flexible enough to suit your agile process.

// Catalyst ID values required to lock segments within Version Blocks based on ID values

LOCK-SEGMENTS-ID:Comments
LOCK-SEGMENTS-ID:CompanyName
LOCK-SEGMENTS-ID:FileDescription
LOCK-SEGMENTS-ID:FileVersion
LOCK-SEGMENTS-ID:InternalName
LOCK-SEGMENTS-ID:LegalCopyright
LOCK-SEGMENTS-ID:OriginalFilename
LOCK-SEGMENTS-ID:ProductName
LOCK-SEGMENTS-ID:ProductVersion
LOCK-SEGMENTS-ID:Assembly Version

Applying the above keywords to our example will yield the following results

Each string has been fully locked preventing any over translation. It also has the benefit of lowering the translatable word count, thus saving translation costs :-)

 

 



 
Conclusion

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. We 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.

My best wishes
Cyril Vallin