Find-Replace list Wordfast Classic

From Wordfast Wiki
Revision as of 19:37, 29 October 2017 by Samar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The FR (Find-Replace) list contains lines that make WFC execute a Find-replace action on the target segment before it is committed.

The first two fields of the list contain the text that one would enter in the "Find" and the "Replace with" fields of Ms-Word's own Find-Replace dialog box, to effect some find-replace action. The Find and Replacement actions are limited to the target segment.

If no replacement text is specified, only a Find action is performed, and the translator is warned if the Find is positive.

FR commands are executed only on new segments, or on text newly added to a target segment. FR actions are not performed on existing segments, unless the translator presses the Ctrl+Alt+H shortcut.

Ctrl+Alt+H triggers a FR action on the target text in a currently opened segment. If no segment is currently opened, the action is performed on the entire document.

Note that only marked lines are executed. A line is marked if there is a check sign, or a # character appearing to the far left of the line, in the very first, thin column.

FR commands are useful for Quality Assurance purposes, verification, etc. The versatility of Ms-Word's Find-Replace facility makes this feature very powerful, and practically unfound in other translation tools.

The Find and the Replace texts are exactly what you would write in Ms-Word's Find-Replace dialog box in the Find or Replace fields.

A note (comment) field is offered to comment the line. The next three columns are used to activate three standard Ms-Word Find/Replace switches: the /wc switch turns on the Use wildcards option, the /mc switch turns on the Match case option, the /ww switch turns on the Whole word option. Any text in those fields is taken as activating the corresponding switch. Leave those fields empty to disable the corresponding switch.

The /warn switch, if present in the Note field switch, prompts the translator for a confirmation before the replacement is done.

When no replacement is required (the Replace argument is empty), the translator is always warned if the command has found the desired text.

You can add basic formatting options to the Find or the Replace fields, such as +{tw4winInternal}, which will be interpreted as a "tw4winInternal" style in the Find or Replace argument. Likewise, +{<b>}, +{<i>}, +{<u>} will be interpreted as bold, italic, or underlined font attributes.

Refrain from having hundreds of active FR lines at any given time: do not use FR as a substitute for machine translation, text processing, etc. FR is offered as a last resort, for example, to convert financial formats, and make up for common typos.


Thoroughly test your FR parameters (using Ms-Word's Find-replace dialog box) on a test file. FR can backfire. The sample list which is provided when you create a new Find-replace list in the WFC user interface under > Terminology > Find-replace contains a few example. Here are a few more examples:

Replace <Tag1> with <Tag2> - but only if they have thetw4winInternal style:

Find: <Tag1>+{tw4winInternal}

Rep: <Tag2>+{tw4winInternal}

How to make sure the target segment has no more than 100 signs or characters, including spaces:

Find: ?{100}

Rep:

Note: /warn (> 100 signs)

Swith: /wc

Reverse "David John" into "John David" in the target segment:

Find: (John) (David)

Repl: \2 \1

Swith: /wc

Replace endashes (–) and emdashes (—) with simple dashes (minus signs, -) in the target segment:

Find: [^0150-^0151]

Repl: -

Swith: /wc

Force a non-breaking space before :;!? in the target segment (two passes):

Find: ([a-z,A-Z,0-9]) ([\:\;\!\?])

Repl: \1\2

Swith: wc

Find: ([a-z,A-Z,0-9])([\:\;\!\?])

Repl: \1^s\2

Swith: wc

Warn me if "Unwanted Co" is found in the source segment:

Find: Unwanted Co

Back to Wordfast Classic User Manual