| Radialix 2.10 – New Features |
|
|
|
Localization of Text FilesRadialix 2.10 now has a text file parser. Its operation is based upon using templates consisting of regular expressions. Three groups of templates are supported: Project – templates stored in the project file. Custom – templates stored in the Radialix settings section of the current user's registry. Default – templates stored in Radialix. These templates are not available for editing. A template can be selected in the properties dialog of the file being localized. When selecting a template, you can as well edit it. Project templates can also be viewed and edited in the project properties dialog, and custom templates – through the Tools>Custom Templates menu.
The Templates button on the original resources tab in the file properties dialog opens the dialog for editing templates.
Templates can be moved and copied by dragging with the mouse. To copy a template, hold the Ctrl key down while dragging. Templates can be added and deleted through the context menu commands. A template can be renamed by double-clicking on its name or with the command on the context menu. The checkbox by the template name allows the auto-selection of the template when adding a new file to a project. When the auto-selection is disabled, a template can be selected manually. By default, the auto-selection of templates for INI files is disabled. That is to ensure using the INI parser located below the INI file parser for INI files by default. If necessary, you can set a template for INI files and use the text file parser instead of the INI file parser if the file being localized has features not supported by the INI file parser. That can be done by copying the INI file template from the default templates to the custom templates or project templates. In the Extensions field, enter the semicolon-separated list of file extensions the template is meant for. Example: dat;lbl;dtr. The Format field – format specifiers type in file strings (C, C#, Pascal++, Java, etc.) ESCAPE-characters – type for coding special characters in file strings (-,Multilizer/Sisulizer or C/C++). With the More>Edit button, you can add more character conversions (this button appears only for project templates or custom templates; default templates display the Show button).
In the Character Sequence column, enter the sequence in the original file; in the Mapped to - the conversion result. Each template contains a list of regular expressions, each one of which has a preset selector for resource name, string name, string and comment (columns Resource ID, String ID, String and Comment respectively). A selector can accept values: - - data of the selected type is not contained in the search result. <All> - entire search result is data of the selected type. $1..$15 – subexpression number in the search result that is data of the respective type. Subexpressions in a regular expressions are set in brackets. For example, expression ^([A-Z]*?\d*,\d+?),([^\n\r]*)$ contains subexpressions: [A-Z]*?\d*,\d+? и [^\n\r]*, which match the selectors $1 and $2 respectively. This regular expression matches a string, where subexpression $1 is highlighted with green, and subexpression $2 – with yellow. You can edit the selector by double-clicking on the corresponding cell of the spreadsheet. Regular expressions can be edited in the spreadsheet directly – double-clicking or pressing the F2 key on the cell opens it for editing. A new expression can be added by entering the text in the last row of the spreadsheet, instead of the Enter expression… text or with the context menu commands. To switch turns of the expressions, simply drag them with the mouse. Holding the Ctrl key down while dragging appends a copy of the spreadsheet row. An expression can be deleted with the command on the context menu. You can also disable a regular expression without adding it by toggling the checkbox in the Regular Expression column. The sequence of expressions defines their priority. The expressions positioned higher on the list have higher priority. A template's operating result is displayed in the preview pane. The space characters are displayed with the dot character, and tabs - with the > sign. The Text tab shows the original file with color selection of the data found. The selection settings can be edited with the Styles… button. In the style customization dialog, you can edit not only background color, but also font, letter case and selection border settings. Styles are stored in the desktop profile. With the Select File… button on the preview pane, you can upload a different file. You can also upload the file by dragging it from Windows Explorer to the preview pane.The Text tab's context menu contains the commands for finding strings and jumping to a string with required number. The Strings tab displays data extraction results. The ID column displays the Resource Type>Resource Name>String Name tree. If the name isn't set, the data obtains an index matching its sequence number. The resource type always has the STRINGS name. The String column displays found strings; the Comment shows comments.
Identifiers in TranslationSome cases require resource and string names in localized files to be formed identifying the target language. For example, when localizing strings in the Inno Setup files' [Custom Messages] sections, you are to add a prefix identifying the language to the string name. You can set localized file name formation rules for each template individually on the tabs Target Resource ID and Target String ID.
Identifier formation rules are set as an identifier language and template correspondence table. The Language column displays the translation language the rule corresponds with. The <ANY LANGUAGE> value means that the rule is applicable to any languages. The rules positioned higher to the beginning of the list have higher priority. Therefore, it makes sense to specify only one rule with the <ANY LANGUAGE> tag and position it at the bottom of the list. To switch turns of the rules, use the commands on the context menu or by dragging them with the mouse. Holding the Ctrl key down while dragging appends a copy of the rule. A new rule is also appended when editing data in a spreadsheet row with the Select Language… text. To switch to the editing mode, double-click on the cell to be edited. The checkbox in the Language column enables the rule. The unused rules are ignored when creating the localized files. The ID column of the rules table sets a template for the resource/string name. The template can have the <OriginalID> tag, which would be replaced with the resource/string name from the original file when creating the file. The other tags can be inserted from the context menu in the editing mode.
The <…> button in the identifier field opens the identifier template editing dialog with the preview of the result.
If no rules are set, the original identifiers are saved to the original file. Multilingual DistributiveRadialix version 2.10 has one multilingual distributive. By default, the interface language is selected automatically, depending on the operating system's regional settings (the Format tab in the operation system's regional settings). The interface language can be switched with the Tools>UI Language menu.
After applying a new language, restart Radialix. Interface language can also be switched with the command-line option –uilang. Without any parameters, this option sets default language. To switch the language, after the colon, specify the Windows language code; e.g.: –uilang:enu – English (USA) –uilang:rus – Russian The only way to set the language for rdlc.exe is with the –uilang option. To switch the language, simply run the file with this option once. Language for the RDMAP plugins is always set automatically, according to the regional settings. The selected language is stored in the current user's registry. The distributive contains the Radialix localization to Russian project. During the installation, that project is copied to the Radialix folder as rdl.rdlp. The project can be used as the foundation for localizing Radialix to a new language. Before running the localization, it is recommended to make a copy of the folder with the Radialix files and edit the project in that folder. When the new version of Radialix is released, you would need to copy the files to be localized to the folder you have created and then update the resources. After that, you can just translate the new strings to get the localized files for the new version. Besides the files included in the localization project, you would also need to translate the Readme.txt and WhatsNew.txt text files and also, maybe, create a file with the frc extension in the frc subfolder, similarly to the other files in that folder. To add a new interface language, simply copy the files you have created to the folder with the Radialix files (the frc file – to the frc subfolder). After restarting, the menu Tools>UI Language will have the item for the added language.
|