CAT-Tools/Tools to be used together with CAT-Tools/Macromedia Dreamweaver
SDL Trados strangelys lack a global find and replace function. With recent versions, the unsupported Glue program can be used to merge and then unmerge files for a similar effect, though this may not be the best environment for some situations. If there are only a few files, this is not a problem, but when there are hundreds of files, such as for a large Website, a replace function is essential. This describes using Macromedia Dreamweaver 2004 MX for Tag Editor files.
Rainbow offers a find and replace function, but it is not very user friendly and does not show you each instance of the item being replaced. It's often the case that you need to look at each instance of a word before replacing it.
Because ttx (SDL Trados) is based on XML, Macromedia Dreamweaver works to search and replace. Like MS Word, it unfortunately does not allow you to look at what happens when you do a replacement, but it has a powerful "Find all" function that will generate a hyperlinked list of all instances of the expression being searched for.
Dreamweaver also includes match case (i.e., capitalization vs. small letters), match whole word, ignore white space, and regular expression (wildcard) options. Dreamweaver is Unicode compatible. This article was based on files translated from Japanese to English.
Dreamweaver currently sells for US $399, which is obviously quite expensive for merely a search and replace tool. It is an excellent tool for creating and editing Websites. This page was written based on version MX 2004. The latest version is CS4.
Using Dreamweaver
editChange extensions
Before Dreamweaver can be used on ttx files, the extension must be changed to xml. If there are many files, a program like Extension Renamer (SoftPlatz download page) can be used to rename all the files in a directory. When doing this, back up the files first because Extension Renamer does not have an undo function.
Tip: Extension Renamer can be confusing to use. To change htm.ttx files to htm.ttx.xml, type *.htm.ttx in the "From" field and htm.ttx.xml in the "To" field. To reverse this process, type *.htm.ttx.xml in the "From" field and htm.ttx in the "To" field.
Create local site
In Dreamweaver, create a new site. Use the advanced tab to identify the location of the files (select the folder, not the files) and give a name. That's all that is needed.
Warning: Tagged files are complex documents, filled with a lot of formatting information and a small amount of actual text. If you have never used Microsoft Notepad or a similar basic text editor to edit html files, it is recommended you take an online course in html to become familiar with how tags work. Even after doing so, it is recommended you edit one or two files in Dreamweaver and check your work to ensure you do not corrupt a file. Always create backup files before editing.
Search and replace
The search and replace has to be done both in the source code and the text. It is unusual to have relevant hits in the text, but they do occur on occasion. Also, note that the find and replace box has an irritating habit of changing from "Text" back to "Source code". This can become confusing, so it may be more efficient to do all replacements in the source code and then do them in the text.
When double-clicking on a link in the Find window after a Find All command, sometimes the selection does not appear. Double-click on the link again and it will appear, highlighted.
Tag Editor has a bug (or perhaps a feature) that sometimes changes the font in the middle of a target segment. This may happen between words or in the middle of a word. This font change is included in the xml file, so in many cases you will be unable to find target words for search and replace. This error does not appear to occur in source segments, so it is recommended that search and replace be performed using the source.
Doing search and replace can be very dangerous because you are working with the source code, and if you change part of the ttx code, you can damage the file. It is a good idea to view the source of your files and compare them to the text in Dreamweaver a few times so you become familiar with the tags used.
Headings
Searching for headings: Headings are written in html as <h1>, <h2>, <h3>, etc. In the files used to write this article, it was found that these are displayed as DisplayText="h1", DisplayText="h2", DisplayText="h3", etc. Searching for DisplayText="h1" will result in two hits, one for the open and one for the close of each pair of h1 tags. Note that the "match case" option should not be used for heading and other tags because html ignores case in headings, so some might be "H1" and others "h1".
Restore files
After all your edits are complete, use the extension renaming utility to eliminate the "xml" extension. Then view the files in Tag Editor to ensure all the files have been edited correctly. Clean up as normal.