Alchemy CATALYST facilitates automated locking of words or phrases as well as entire segments.  The Keywords.txt is where keywords and segment locking  can be defined.

Access the file via the Tools | Options | Locks and Keywords File Settings page.  The default location for this file is the Public Folder. (e.g. "\Users\Public\Alchemy Software\Catalyst 10.0" on Microsoft Windows 7). This file is a text file that can be edited in any text editor such as Notepad.

 

keywords01.jpg(Example of Keyword File)

Locks

Locks prevent editing at the segment level.  Locked segments appear with the pad-lock symbol in the workspace and cannot be edited in anyway.  Locked segments are excluded from analysis and all editing processes such as translation, Leverage and Pseudo-Translate. The total word count includes protected words such as locks and keywords, but the Translatable count does not.

locks.jpg

Keywords

Keywords are used to prevent words or phrases from being translated and included in word count analysis reports.

When a word or phrase is defined as a Keyword it is displayed as a placeable tag (highlighted with a blue underline)  in the Translator Toolbar.

image2.gif

Each word that matches a keyword definition is displayed with a blue underline and is protected and excluded from the translation process. Keywords are excluded from word counts and analysis and can be validated using the Validate Expert to ensure that it's not modified during the translation process.

Defining Keywords

Keywords are prefixed by the syntax KEYWORDS: and defined using regular expressions. They are saved in the Locks & Keywords file (Tools | Options | Locks & Keywords File Settings).

Sample Keyword File (Keywords.txt)

KEYWORDS:Alchemy

KEYWORDS:[0-9]+

KEYWORDS:Copyright

In the example above a single keyword in defined on each line using a regular expression,

Keyword Definition

Description

Alchemy

Defines a keyword "Alchemy"

[0-9]+

Defines a keyword containing one or more digits. This is a powerful and easy way to lock all numerical data in a project and to exclude these from word count analysis reports. See Customizing Word Count also for more information on this.

Copyright

Defines a keyword "Copyright"

 

note.bmp

To define a part of a word as a keyword, use the modifier WholeWordsFalse: before the definition of your keyword. For example, if you define the following keyword:-

 

WholeWordsFalse:Copy

The word Copy in "Copyright" will be defined as a keyword.


Defining Locks

Locks can be defined in two ways, with the following syntax in each case

Along with keywords, locks are defined and stored in the Locks and Keywords file (Tools | Options | Locks & Keywords File Settings).

When defining segments to lock by content, the definition must match the entire segment.  The definition can be by regular expression, or by exact text match.

Similarly, when defining segments to lock by ID, the ID is case sensitive and must match the whole id.

Sample Locking Entries

LOCK-SEGMENTS:Copyright Alchemy Software

LOCK-SEGMENTS:.*[a-z][0-9].*

LOCK-SEGMENTS:http://.*

LOCK-SEGMENTS-ID:1001

LOCK-SEGMENTS-ID:title

In the example above a locking entry is defined on each line

Locking Definition

Description

"Copyright Alchemy Software"

Locks any segment with text "Copyright Alchemy Software"

will lock segment

"Copyright Alchemy Software"

will not lock segment

"Copyright Alchemy Software 2012"

".*[a-z][0-9].*"

Defines a segment containing a lower case letter followed by a digit, e.g. "SpinControl1" or "User Control2"

.* means any character, zero or more times

[a-z][0-9] means any character in range 'a' to 'z' followed by a number in range '1' to '9'

.* means any character, zero or more times

will lock segment

"Contains User Control1"

will not lock segment

"Contains User CONTROL1"

"http://.*"

Defines a segment with regular expression that begins with http://

the . means any character

the * means any number of times

will lock segment

"http://www.alchemysoftware.com"

will not lock segment

"Click on the website http://www.alchemysoftware.com"

"1001"

The use of the LOCK-SEGMENTS-ID signifies this is an ID match.  Any segment with an ID 1001 will be locked

will lock segment

String ID 1001:  "Click here to continue"

will not lock segment

String ID 21001:  "Click here to continue"

"title"

The use of the LOCK-SEGMENTS-ID signifies this is an ID match.  Any segment with an ID equal to "title" will be locked

will lock segment

String ID title:  "Click here to continue"

will not lock segment

String ID Title:  "Click here to continue"

 

Applying Locks and Keywords to a Project file

To protect segments and keywords in a Project TTK, use Tools | Locks & Keywords | Apply Locks & Keywords from the Alchemy main menu, or use shortcut CTRL+1.  This screen-shot is from the resulting dialog-box. Choose to protect with locks only, keywords only or both at the same time.

locks_keywords_apply.jpg

The most powerful way to use this feature is with Apply on Insertion selected. This means that locks and keywords will be applied to all files when they are inserted into a project.

 

note.bmp

Keywords and Locked segments are protected from all edits such as the Leverage Expert or  Pseudo-Translate Expert.

Removing Locks and Keywords from a Project file

Use Tools | Locks & Keywords | Remove Locks & Keywords from the Alchemy main menu to permanently remove all locks and keywords from a Project file, or use shortcut CTRL+2.