Working with Rules
You can define different rules to be used as required, depending on the filename extension of the text file. For example, a rule "C/C++ Files" can be defined for processing files of type .c and .cpp.
All rules are edited in the "Text Parser Rule Definition" dialog.
The list on the left side shows all the rules defined so far. If you select one of the rules, the corresponding settings for this rule are displayed in the fields on the right.
The rules can be saved in different locations:
The standard rules are the rules that are available following the installation of SDL Passolo. These rules cannot be modified.
The user rules are saved on the computer. You can define your own rules here or modify the existing standard rules. This is done by dragging the respective standard rule into the area for user rules.
You can also embed rules in a project. This ensures that the rule are available, even when the project is opened on a different computer.
When a source file is read in with the text parser, Passolo saves the name of the rule used. When the source string list is updated, Passolo searches for the relevant rule in this sequence:
- In the project
- In the user rules
- In the standard rules
To add a new rule to the user rules, click on the icon . A new entry is added to the list and you can enter a name for the new rule.
To change the name of the current rule, click on the icon.
To delete the selected rule, click on the icon.
File types
In principle, rules can be defined independent of the file type. However, the application of a rule to specific source file is facilitated if you specify a file type.
The file type is specified by entering a list of relevant file extensions, separated by semicolons. For example "c;cpp" for .c and .cpp files.
It is also possible to read text resources contained in a file that is processed by another parser. When using such resources you can also specify the Resource Type. If, for example, you use a resource type MYTEXT within a WIN32 source file and you want to process the text resource using a text parser rule, you can specify the resource type MYTEXT for this rule. When the source file is read, Passolo then uses the text parser for this resource. You can control or modify the use of the text parser and the relevant rule in the respective resource properties window.
Strings / Comments
This list includes all the defined delimiters for strings, comments and resources.
Click on to add a new string delimiter (see String Delimiters).
Click on to add a new comment delimiter (see Comment Delimiters).
Click on to add a new resource delimiter (see ).
The entries in this list can be sorted using and
, but the sorting is only relevant in certain special cases.
The other buttons can be used to edit,
copy or
delete the current entry.
Mappings
Click on to add a new character mapping (see Character Mappings).
Save
Saves your changes to the rule definitions.
Set default
Deletes all your changes and resets the rule definitions to their original state.
Export
Exports the selected rules (or all the rules) to a configuration file. This allows you to send your rule definitions to other translators.
Import
Imports rule definitions from a selected configuration file created using the Export command. A list of the rules contained in the configuration file is displayed. You can select all the rules or any combination you want to import.
Preview
Displays a Preview field in the dialog showing the effects of the current rule. Click on this button again to hide the preview. See Preview.