Someone wrote:

> In a rather common scenario you would sometimes want to replace all
> the occurrences of a particular word/phrase throughout the text, when,
> say, you realise a frequently used word/phrase has been mistranslated
> after completing a rough translation. What would a typical OmegaT user
> do in such a case?

You'll have to do a Find/Replace on the TMX file. The TMX in question being project_save.tmx, of course. If you're on Windows, you can also install AutoIt so that the handy script can also be used.

Get jEdit text editor. Open project_save.tmx in it. Go Ctrl+F, and search as follows (assuming source language EN-US and target language AF-ZA):

Find:

("AF-ZA">)(\n.+)(\<PHRASE\>)(.+)(\n.+\n.+\n.+\n.+)("EN-US")

Replace with:

$1$2PHRASE$4$5$6

where PHRASE is the find phrase and replace phrase. If you want to find any match (not just whole words), do this:

Find:

("AF-ZA">)(\n.+)(PHRASE)(.+)(\n.+\n.+\n.+\n.+)("EN-US")

Replace with: same as previous.

This will ensure that you only find phrases in the target text sections of the translation units (well, I hope that's what it does... let me know if I'm mistaken).

If you have AutoIt, you can use this script...

To use, simply run jEdit, open the TMX file in it, minimise jEdit, and run the script. Then save the file (Ctrl+S) and close jEdit. Next time you run jEdit, it will automatically open the last file you had opened.

Good luck.
Samuel