Difference between revisions of "Find-Replace list Wordfast Classic"

From Wordfast Wiki
Jump to: navigation, search
 
 
Line 1: Line 1:
The FR ('''F'''ind-'''R'''eplace) list contains lines that make Wordfast execute a Find-replace action on the target segment before it is committed.  
+
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.
 
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.  
+
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.
 
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.
Line 15: Line 15:
 
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.
 
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.
+
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.
 
The /warn switch, if present in the Note field switch, prompts the translator for a confirmation before the replacement is done.
Line 21: Line 21:
 
When no replacement is required (the Replace argument is empty), the translator is always warned if the command has found the desired text.
 
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.  
+
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, +{<span style="font-color: black"><b</span>>}, +{<span style="font-color: black"><i</span>>}, +{<span style="font-color: black"><u</span>>} 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 way to convert financial formats, and make up for common typos.
+
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 Wordfast user interface under > Terminology > Find-replace contains a few example. Here are a few more examples:
 
  
Replace <span style="color:#FF0000"> <Tag1> </span> with <span style="color:#FF0000"> <Tag2> </span> - but only if they have the <span style="color:#FF0000"> tw4winInternal </span> style:
+
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:
  
Find: <Tag1>+{tw4winInternal}
+
Replace <Tag1> with <Tag2> - but only if they have thetw4winInternal style:
  
Rep: <Tag2>+{tw4winInternal}
+
<span style="font-family: Courier New; font-size: 10pt">Find: <Tag1>+{tw4winInternal}</span>
 +
 
 +
<span style="font-family: Courier New; font-size: 10pt">Rep: <Tag2>+{tw4winInternal}</span>
  
 
How to make sure the target segment has no more than 100 signs or characters, including spaces:
 
How to make sure the target segment has no more than 100 signs or characters, including spaces:
  
Find: ?{100}
+
<span style="font-family: Courier New; font-size: 10pt">Find: ?{100}</span>
  
Rep:
+
<span style="font-family: Courier New; font-size: 10pt">Rep:</span>
  
 
Note: /warn (> 100 signs)
 
Note: /warn (> 100 signs)
  
Swit: /wc
+
<span style="font-family: Courier New; font-size: 10pt">Swith: /wc</span>
  
 
Reverse "David John" into "John David" in the target segment:
 
Reverse "David John" into "John David" in the target segment:
  
Find: (John) (David)
+
<span style="font-family: Courier New; font-size: 10pt">Find: (John) (David)</span>
  
Repl: \2 \1
+
<span style="font-family: Courier New; font-size: 10pt">Repl: \2 \1</span>
  
Swit: /wc
+
<span style="font-family: Courier New; font-size: 10pt">Swith: /wc </span>
  
 
Replace endashes (–) and emdashes (—) with simple dashes (minus signs, -) in the target segment:
 
Replace endashes (–) and emdashes (—) with simple dashes (minus signs, -) in the target segment:
  
Find: [^0150-^0151]
+
<span style="font-family: Courier New; font-size: 10pt">Find: [^0150-^0151]</span>
  
Repl: -
+
<span style="font-family: Courier New; font-size: 10pt">Repl: -</span>
  
Swit: /wc
+
<span style="font-family: Courier New; font-size: 10pt">Swith: /wc</span>
  
 
Force a non-breaking space before :;!? in the target segment (two passes):
 
Force a non-breaking space before :;!? in the target segment (two passes):
  
Find: ([a-z,A-Z,0-9]) ([\:\;\!\?])
+
<span style="font-family: Courier New; font-size: 10pt">Find: ([a-z,A-Z,0-9]) ([\:\;\!\?])</span>
  
Repl: \1\2
+
<span style="font-family: Courier New; font-size: 10pt">Repl: \1\2</span>
  
Swit: wc
+
<span style="font-family: Courier New; font-size: 10pt">Swith: wc</span>
  
Find: ([a-z,A-Z,0-9])([\:\;\!\?])
+
<span style="font-family: Courier New; font-size: 10pt">Find: ([a-z,A-Z,0-9])([\:\;\!\?])</span>
  
Repl: \1^s\2
+
<span style="font-family: Courier New; font-size: 10pt">Repl: \1^s\2</span>
  
Swit: wc
+
<span style="font-family: Courier New; font-size: 10pt">Swith: wc</span>
  
 
Warn me if "Unwanted Co" is found in the source segment:
 
Warn me if "Unwanted Co" is found in the source segment:
  
Find: Unwanted Co
+
<span style="font-family: Courier New; font-size: 10pt">Find: Unwanted Co</span>
 
  Back to [[Wordfast Classic User Manual]]
 
  Back to [[Wordfast Classic User Manual]]

Latest revision as of 20:37, 29 October 2017

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