You have many files in your translation project, and you are delivering the target files for review before the project is complete. So you want rename the target files to reflect their status as unfinished deliverables for review only. You have a multilingual project with many languages and you want the target files to be unique with the language code added to the filename of each one. At least two problems related to the naming of target files generated by Trados Studio.
The Trados Studio Target Renamer solves these problems, and probably others, by providing a new batch task supporting the features you need:
- use short or long language codes as a suffix or prefix to the original filenames
- use regular expressions to rename the filenames with whatever you like, but retain enough of the original filename to ensure it's recognisable
- save the target files into a location of your choosing
How does it work?
Once the plugin is installed you will find a new batch task in your list:
The batch task contains various options:
This option allows you to specify the folder you would like to use to save the target files that are created when you run this task. If you don't specify a custom location the files will be saved into the appropriate target language folders for your project. If your project is a multilingual project then the custom location will honour the target language folders to maintain the organisation of the files. For example, in my test project I have four target languages and using this custom location will create a structure like this:
You have three options here:
Append As Suffix
This will add the language code to the end of the filename, and separated by the "Delimiter" you choose in these options. For example:
The full language code for German(Germany) was added to the end of the filenames.
Append As Prefix
This will add the language code to the start of the filename, and separated by the "Delimiter" you choose in these options. For example:
The full language code for German(Germany) was added to the start of the filenames.
Use Regular Expression
Selecting this option will introduce the necessary input boxes for you to search for the part of the filenames you wish to work with and then replace some of the text with your preferred naming:
Using the same source files as an example:
You need to be careful not to replace the entire name with new text because if you do this you will end up with one target file for each language. This is because the name of each one will be exactly the same and as they are saved they will overwrite each other. You also don't want the file names to be the same as you won't be able to tell them apart!
So the way to use this feature is to use back references. For example, search for:
And replace with this:
This will result in the following:
The numbering is retained as I wanted, and the names are prefixed with REVIEW_. This does require some basic knowledge of how to work with regular expressions, but if you need help please ask in the appropriate community forum. To explain this example:
- the search uses a simple pattern to find filenames containing 2 numbers followed by a hyphen followed by 3 numbers:
- enclosing this pattern in round brackets creates what's called a back reference
this essentially means remember the result of the pattern you have found so it can be reused later
- IP- and _EN and simply the actual text used in the filenames and they won't be remembered which means the replace operation will delete them
- the replace specifies the actual text to be used in the replace operation.
- so it will replace the pattern found with the text REVIEW_
- followed by what it remembered and stored a a back reference. The recall syntax is simply $1.
- if there were more patterns enclosed in brackets they are recalled sequentially starting from the left as $1, $2, $3 etc. In this example we only had one back reference so we only need to use $1
As for the other options the files will be grouped by target language so you can easily manage sending the files in an organised manner.
Use Target Language
This option simply allows you to use short or long language codes in the filenames. For example:
de OR de-DE
es OR es-ES
en OR en-US
Append Custom String
This option allows a simple mechanism to use your own text as a prefix or suffix to the target filenames. Using this example I should see this:
This option allows you to choose the delimiter, or string of delimiters, that you wish to use to separate the custom string from the filename.
The initial release of this app fails to use the "Append Custom String" feature correctly. It doesn't work.
The workaround for now is to use the regular expression option where you can achieve the same thing by searching for the full name, storing in a back reference, and replacing with the appropriate text followed by the back reference recall. For example:
So search for this: