|
Creating a new Rule |
|
The following task is carried out by the Localization Engineer Person responsible for TTK preparation, debugging and releasing of software, web sites and online help systems.. In this task an ezParse rule will be created to extract only translatable text from an XML document and leave all untranslatable text hidden. He uses ezParse to write a rule to accomplish this task.
Create a new Project Your project is where you manage and organize all the files that are to be localised. TTK by selecting on File - New.
Click on the root The Project Title is referred to as the Root of a Project TTK File. All files and folders are inserted relative to the Root of your Project TTK File. of the Project TTK file, and insert the file Alchemy CATALYST.xml. When prompted, select the ezParse deafult rule ShowAll and press OK to insert this XML document into your project.
|
The ezParse rule ShowAll will mark every element and attribute in the XML document as translatable and display the entire content of the document in the Project Workspace pane. |
While every element is displayed on the screen and can be translated using the Translators Professional linguist specializes in the localization of web site, online help systems and software applications. Toolbar, the flow of each paragraph and sentence is broken each time an inline tag An Inline Tag is normally found in structured text formats such as XML and HTML Hyper Text Markup Language : Format used for representing internet pages in WEB browsers.. For example, in HTML, the text attribute used to represent bolded text is . This is referred to as an Inline Tag. is embedded in a sentence. For example, see the inline tag and notice how it splits the sentence in the example above.
Use ezParse to improve on the segmentation and display of this XML document.
Go to Tools - Options and select ezParse. In the File Extension list, select*.xml. Click the Add button and type Freeform as the name for the new rule.
Click on Edit Rule to create an ezParse rule for this XML document.
In the Methods section, click the browse button and locate the file Alchemy CATALYST.xml. Press OK to load this file into ezParse.
A list of elements and attributes will be displayed in the Mark-up data grid. Use this Mark-up data grid to create a new ezParse rule.
To display an element in Alchemy CATALYST click on it and switch it to Green. For example the element is marked for display whereas the element
is not.
Mark all the following elements for display leaving all other elements un marked.P-Element, P-Header1, P-BodyTextBlock, B, I and H2.
Tags that are to be displayed |
Tags that are not to be displayed |
|
|
Go to the B, I and H2 elements and click the check box in the Inline Tag column. This instructs ezParse to process these elements as inline tags and not to split them over multiple segment boundaries.
There are several methods that can be used to process each element in an XML document:
|
Locked |
|
Select this method A group of regular expressions that are applied to a file during insertion. These identify the text to be extracted and presented for translation. to lock an element or attribute. Applying a lock ensures that this element or attribute is displayed but cannot be modified during the translation process. |
|
In-Line |
|
Select this method to identify elements and attributes that are to be treated as inline tags. An example of such an element would be bold or underline. This is frequently used when translating paragraph based text segments within XML documents. |
|
Code-Segment |
|
Select this method to identify elements that contain code (for example, JavaScript, ASP, CGI, Pearl). Alchemy CATALYST can then be configured to parse that code segment and extract translation units for display within the XML editors. For more information, see Developing ezParse™ Rules. |
|
Id |
|
Select this method if an element can be identified using an unique ID. This is very useful for aligning XML documents or improving the accuracy of translation re-use. |
Click on the Preview button to see the results of the ezParse rule in the Preview Panel in the bottom left hand corner of the screen.
Press the OK button to save the ezParse rule.
Congratulations! You've just created your first ezParse rule that processes XML documents.