Problem
Sometimes there is a need to be able to extract some segments from a file, or multiple files, and send them as a single file to others. Sometimes there is a need to open all the files in a virtual view and then save them as a single file to share with others. Sometimes you don't want to open the files at all, but you might want to split them or merge them to send to others.
Resolution
The solution to all of these requirements is studioViews. This application will not only allow you to export from the files view, filtered selections in the Editor view, or plain and simple segment selection, but it also allows you to import the translated file you exported back into your project and will update your files accordingly. The exported file is an SDLXLIFF and fully supports all the features of SDLXLIFF (segment statuses, match values, tracked changes etc.).
Table of Contents
Features
After installing the plugin you gain access to it in two different places, the Files View and the Editor View which are addressed below. Please also note the sub-wiki related to the workflow where users may have changed the structure of the files after export and before import:
This is now supported with the current release, but it's still important to understand the mechanisms that are taking place.
Files View
You can select one or more files and right-click (the image below is shortened for convenience) where you will find two menu items:
- Import into the selected files
- Split the selected files
Split the selected files
In practice you would most likely use the "Split into selected files" first and this brings up the following menu:
If you have used the "Spit and Merge" application from the SDL AppStore these options will be familiar for you. The "Split" operation allows you to do two important things:
- split the selected files by wordcount, by equal parts or by segment ids
- merge the selected files
split the selected files by wordcount, by equal parts or by segment ids
"Split by word count": you specify the maximum number of words you want in each file and the application will split the files to the nearest segment.
"Split by equal parts": you specify how many files you'd like the selected file(s) to be split into and the application will split the files to the nearest segment.
"Split by ids": you specify the segment ID numbers separated by a comma, for example with an 800 segment file you could use this list of ids:
100,250,300,500
The application will split the file(s) into five files.
1-100
101-250
251-300
301-500
501-800
merge the selected files
There is no obvious option for merging so this requires additional explanation. If you have multiple files in your project you could merge them all into one SDLXLIFF by entering "1" into the "number of equal parts" field:
This effectively allows you to merge files after the project has been created, so it's not only something you have to consider when the project is initially created.
The naming convention for the output is managed with a simple mask feature, the default being:
StudioViewsFile.Split_[####].sdlxliff
You define the mask and the location for the "split" files in the Output panel here:
The [####] will create a number with four digits when the files are "split". So if I split the files I selected into three files I would have three files like this:
StudioViewsFile.Split_[0001].sdlxliff
StudioViewsFile.Split_[0002].sdlxliff
StudioViewsFile.Split_[0003].sdlxliff
I could rename them as I see fit so if I wanted the name to be different and the number to only have three digits and have it at the start I could create a mask like this:
[###]_ProjectName_split.sdlxliff
Import into the selected files
This feature allows you to import the updated SDLXLIFF files you previously "split". The older Split and Merge application physically split the files and then merged them back together again. studioViews doesn't take this approach and is more robust as a result. studioViews replaces the updated segments in the original project files with the ones that were updated from the split files. All supported features are retained:
- match values
- statuses
- locked segments
- tracked changes
- etc.
When you select the import feature you will be presented with this window:
It doesn't matter whether you have selected the exact files you "split" originally to import into or not. You can select all the files in your project and right-click to import. The application is smart enough to know which segments you are updating and will only update the appropriate segments in the appropriate files. You can also choose to ignore the updates to segments based on statuses, type of matches or locked. You do this by adding the criteria into the "Ignore Existing Segments" part. The image above shows "Locked" which is the default setting. This will prevent changes made to locked segments in the "split" files from being imported into locked segments in the original.
Once the import is successfully completed you should see a "Task Result" window similar to this:
The report that is created is a simple log file that provides information on which files were imported and some statistics around what was updated, for example:
The original project files are also saved by appending the original files with .Backup_####.sdlxliff so you can always revert to the original if you're unhappy with the result.
Editor View
The Editor View provides a similar, although in many ways more functional approach to the features in the Files View. First of all you need to activate the View for studioViews by clicking on the icon in the View menu when you have opened a file in the Editor View:
This will open a new view to Trados Studio which you can position wherever you wish. For example:
This view has two tabs:
- Export
- Import
Export
The Export tab allows you to export selected or visible segments to an SDLXLIFF file in a location of your choosing.
Selected segments
These would be segments that you have selected in the Editor by holding down the Ctrl or Shift key (or by using the keyboard). For example, here I have selected segments #3, #5, #7, #8, #9 and #12:
It doesn't matter how many files you have opened in the Editor, you can select whatever you wish.
Visible segments
These would be segments that are currently visible in the Editor view. So if you have filtered on this using the Advanced Display Filter for example then you may have something like this:
Here I filtered on 10 of the 82 segments in my two files that are open in the Editor. If I Export the visible segments I will create an SDLXLIFF with just these 10 segments in it because these are the ones that are visible.
Whether you use the selected segments or the visible segments once you run the Export you should see a message box similar to this summarising what you have done and where the file has been saved:
You also have a log file which again explains which files the filtered set was taken from and the name of the file that was saved:
Import
The exported file can be imported at the files level as explained above, but you can also do this in the Editor view.
The options are similar. You just set the criteria for any segments in the original source that you would like to be exempt from updating, select the sdlxliff and click on Import. This feature will provide the "Task Result" as before, but you will also see the updated segments change in the file you have open in the Editor:
In this case I signed-off and locked the segments in the file I imported and these are now changed in the file you can see open under the message window. And of course you have a record through the log file.
The original project file is also saved by appending the original files with .Backup_####.sdlxliff so you can always revert to the original if you're unhappy with the result.
TellMe
As with most of the plugins created by the SDL Community Developers you can always find your way to help by using the TellMe feature in Trados Studio. It's a quick way to get some help if you need it!
Important Notes
Content formatting, placeholders and spaces are not included in the exported document
Structural elements such as content formatting, placeholders and spaces that are external to segment pairs are not included in the document that is exported by studioViews. This ensures that those elements are preserved when the translations are being re-imported. The only exception to this rule are formatting tags located at the paragraph unit level.
Considering the example below:
- The following formatting will not be included in the exported content
- The space between segment 2 and segment 3.
- The formatting bold=true and color=FF000 associated with segment 8
- The following formatting will be included in the exported content
- The formatting bold=true & italic=true associated with segment 5
- The formatting italic=true associated with segments 7 & 8
Example: