Like the previous screens, the Search and Replace screen also includes a result pane: users should read carefully what the replacement engine will do before validating it via «Replace all».
After the expression/word modes, you can also select how to replace the text :
|
The checkbox « Use variables » makes it possible to use $0, $1, $2 and so on in the replacement string.
If you do not check it, $ is simply considered as a normal character, which may be what you prefer. When search for variables is selected, if you want to have the sign '$' in the string, you need to protect it with a \ before.
NEW (DGT-OmegaT 3.0 update 8): replacement with variables now supports also case replacements, meaning the possibility to convert some characters in lower or upercase during replacement. Syntax is the following, inspired by this, with Perl's syntax (meaning that \l\U is valid while \L\u is not), in all modes:
In order to help you make your choice, the results screen will display not only the translation as it is actually, with an highlight to the part which will be replaced, but also the full result of this replacement, that is, the same text with all replacements applied and highlighted in red. This can be useful especially in the case of regular expressions, to be sure that you will not accidentally add or remove more than expected:
In any case, remember that this feature, if you do not like it, can be unactivated by selecting the correct matches display template.
For those who already use OmegaT, important notes:
First, you should note that our screen does not make search in orphan segments, as origial OmegaT did in version 3.6 (removed in 4.0). This could be changed (actually this is due to the fact that we use a different algorithm). But one point to consider is that when original screen found orphan segments, and you selected interactive search, these segments could not appear in the editor, so interactive search finally ignores them, even if they appeared during the search: don't you think that this can be a source of errors?
In OmegaT 3 and 4, the search & replace screen can be used for translated as well as for untranslated segments. In the second case, the «Search for» zone acts on the source, and a translation is added based on it.
In DGT-OmegaT, we consider this possibility as a totally distinct feature, named «Pre-translation», and we created a distinct screen for it. So, remember that replacements act only on already translated segments, and that the search is done in translated text, not in the source.
Add new comment