Locks

Locks prevent editing at the segment level.  Apply locks by double clicking the Lock cell in the string list, or by choosing the segment and pressing the Lock button in the Translator Toolbar.

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.

Locked strings can be unlocked by clicking the Lock button in the Translator Toolbar. This means a Translator has the ability to unlock a string which a localisation engineer has mark as locked. If the ability to unlock string needs to be prevented, the option is available at the project level.

Right click on the Project title in the Navigator Window and select Properties...

In the project properties, under Protected Properties, select the Prevent modifying locked status tick box. With this option selected, attempts to Lock or Unlock a string in the project will be denied with the following warning.

This is ideal to prevent translators from accidentally removing locks and causing over translation.

Similarly, modifying coordinates of Dialog resources (in Visual View) can be prevented in the Protected Properties window above selecting the Lock Coordinates tickbox.

 

Setting a password will show the protected properties greyed out, indicating that a password must be entered before the settings can be changed.

 

Keywords

Keywords are used to prevent words or phrases within a segment from being translated.  Keywords are also excluded from translatable word count.

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

Keywords can be validated using the Validate Expert to ensure that they are not modified or deleted during the translation process.

Protecting Individual Keywords

Select the word/phrase you wish to protect in the Translator Toolbar, right click and choose Lock/Unlock Keyword.  You can also choose to lock the word/phrase and have that word/phrase added to the keyword definition file.  

Protecting using the Keyword Definition File

Use the Locks & Keywords menu in the Preparation group on the Experts tab.  This iterates the segments in your project applying locks & keywords according to your keyword definition file.

 

Automating Locks & Keywords

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 EXPERTS > Locks and Keywords > Settings.

The default location for this file is the Alchemy Public Folder: "C:\Users\Public\Alchemy Software\Catalyst 12.0\Keywords.txt". This file is a text file which can be edited in any text editor such as Notepad. In includes comprehensive details on the syntax to Lock Keywords.

 

(Example of Keyword File)

Defining Keywords

Keywords are prefixed by the syntax KEYWORDS: and defined using regular expressions. They are saved in the Locks & Keywords file.

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"

 

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 (FILE > Options > Locks & Keywords File).

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 EXPERTS > Apply Locks and Keywords, 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.

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.

 

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 EXPERTS > Remove Locks and Keywords from the Alchemy main menu to permanently remove all locks and keywords from a Project file, or use shortcut CTRL+2.