Can't save the translated file (Error occurred during align of the file)

From Wordfast Wiki
Jump to: navigation, search

Problem: When you try to save the translated file, an error message is shown that says "An unexpected error occurred during align of the file. There was a problem while aligning word document" or "There was a problem creating the preview file."


Wfp alignment problem.png


Explanation: When you try to save the translated (target) file, Wordfast Pro starts creating it, comparing every segment to the segments of the source file. This operation is called alignment, i.e. every source segment needs to properly align with every target segment. If it doesn't, this triggers an error and the operation is aborted.

Possible causes: The alignment error can happen for a number of reasons:

Source tags have not been correctly replicated in the target

All tags in a source segment should be transferred to the target, in their correct order. Missing tags can result in problems aligning the target with the source file. This is the cause for not being able to save the translated file in 99% of cases.

Solution: Use Transcheck in order to find which segments are missing tags:

  1. Click Preferences > Transcheck.
  2. Deactivate all other checks, ticking only the Tag check.
  3. Click OK to save the setting.
  4. Now go to the Review tab of the TXLF Editor and click the Transcheck All button. A list of problems will be displayed in your browser as well as in the TXLF Editor's Transcheck pane. An exclamation mark will be displayed in the Status column of every segment that contains a problem.
  5. Check all such segments, fixing the problem described, then try to save the translated file again.

Segments have been merged or split

MS Office documents (Word, PowerPoint, Excel) may sometimes contain unwanted paragraph breaks that cause a sentence to be split into two or more segments when added to a project in Wordfast Pro. In the case of Word file, this frequently occurs when the file is derived from a PDF file. When translating, the translator will often merge segments that have been split like this. If the split sentence is formatted differently from the rest of the text, e.g. bold and/or italic, and the segments are merged, when you try to save the file as translated, you will see the following error message:

Wfp alignment error placeable buddy.png

If you see this error message, apply one of the solutions below.

Solution:

  1. Close the TXLF file you are working on – you won't need it.
  2. In the Project Files tab, click Add Files and add again the corresponding source file to the project.
  3. When you do, translate it from the TM using the Until Fuzzy or Until No Match commands on the Translation tab of the TXLF Editor – but do not split or merge any segments this time.
  4. When ready, try saving the translated file.

Advanced solution #1:

This solution requires editing the source file.

  1. Open the file in its native application, e.g. in MS Word if a .DOCX or .DOC file.
  2. On the Home tab in the ribbon menu, press the Show/Hide paragraph marks and other hidden formatting symbols button.
  3. Now look for unwanted paragraph breaks inside sentences as shown in the screenshot below.
  4. Remove all such unwanted paragraph breaks and save the file.
  5. Add the edited file to your project in Wordfast Pro and translate it from the TM. Then try saving the translated file.

Word paragraph breaks displayed.png

Advanced solution #2:

  1. In Wordfast Pro's TXLF Editor, locate the segment(s) that you have merged. You can use the Segments merged across paragraphs or the Merged segments filter.
  2. Click inside the segment to activate it.
  3. On the Formatting tab, click the Non-Formatting Tag Mode button. This will cause all formatting to be displayed as tags.
  4. Edit both the source and target segments to remove all formatting tags. Important! Do not delete the paragraph break tag that Wordfast Pro inserted automatically when you merged the segments.
  5. Commit the segment by pressing Alt + Down, save the file (Ctrl + S), then try saving the file as translated. The error should not occur.

Missing alt texts for images or charts

In an MS Word file as well as in other file types, every image or graph/chart has its alternative text description. In rare cases, usually when working with an MS Word file derived from a PDF file, this alt text is missing or has other problems. This can cause an alignment error when trying to save the translated file.

Solution: NB! Only proceed with this step if you have made sure the error is not caused by the above two problems. This solution applies to MS Word and MS PowerPoint files.

  1. Close the bilingual file you've been working on. You won't need it.
  2. With your project opened, click Preferences > Filters.
  3. In the list of filters, scroll down until you find MS Word 2007 Document if your file has a DOCX extension, MS Word Document if your file has the older DOC extension, MS PowerPoint 2007 Presentation if the extension is PPTX or MS PowerPoint Presentation if PPT.
  4. Click the second line of the filter to open the Format Settings below.
  5. Scroll down until you find the tick box for Extract Word shape alternative text or Extract shape alternative text and remove the tick. See screenshot below.
  6. Click OK to save the changes.
  7. Return to the Project Files tab of your project.
  8. Click Add Files and add the same Word source file to your project. It will be segmented anew but with the new settings.
  9. Translate the file from your TM using the Until Fuzzy or Until No Match commands on the Translation tab.
  10. When ready, save the translated file – it should work now.

Wfp filters word alt text.png

Empty target segment in a PowerPoint file

This only applies to MS PowerPoit files (.ppt or .pptx). If you have translated a PowerPoint presentation and see the "An unexpected error occurred during align of the file" message, and you have checked for missing tags in the target segments, but the problem persists, then this could be caused by one or more segments whose target you've left empty. The exact text of the error message is displayed on the screenshot below.

Wfp alignment error powerpoint missing text.png

Solution:

  1. Find the empty segment(s). You can use the filter in the TXLF Editor: select the Empty target segments filter from the drop-down list.
  2. Add some text to it. If you left the target empty because it does not require translation, add some random characters, e.g. XXX. You can then delete them from the target file once created successfully.
  3. Commit the segment(s) and then try to save the translated file.

Excel sheet name is duplicated

This only applies to MS Excel files (.xls or .xlsx). If you have translated an Excel file and you see the "An unexpected error occurred during align of the file" message, and you have checked for missing tags in the target segments, but the problem persists, then this could be caused by duplicate Excel sheet names, i.e. you've translated the names of two or more Excel sheets the exact same way.

Solution (Wordfast Pro v. 8.1 and newer):

  1. In the TXLF Editor, apply the Excel Sheetname Segments filter.
  2. For the segments that contain the Excel sheet names, edit the translation so that it is not identical.
  3. When ready, try saving the translated file.

Solution (Wordfast Pro versions before 8.1):

  1. Open the source Excel file and make a note of the sheet names in it.
  2. You can copy the sheet name, then paste it in the Enter text to filter segments... search field in the Wordfast Pro TXLF Editor window.
  3. For the segments that contain the Excel sheet names, edit the translation so that it is not identical.
  4. When ready, try saving the translated file.


A special case: The document contains two or more sheets whose names are very similar, e.g. "Weld equipment checklist clamp Dr1 jig" and "Weld equipment checklist clamp Dr2 jig". These names are each 38 characters long, which exceeds the max. 31 characters Excel sheet name character limit. When the Excel sheet name is longer than 31 characters, Wordfast Pro automatically cuts it by removing the extra characters from the end of the text, e.g. "Weld equipment checklist clamp Dr1 jig" becomes "Weld equipment checklist clamp". But the second sheet name, "Weld equipment checklist clamp Dr2 jig", is also shortened to "Weld equipment checklist clamp". And when you try saving the file as translated, you see the "alignment" error because you now have duplicate sheet names.

To avoid this problem, when translating an Excel file, always enable Translation Length > Attribute Character Max Length Check in Transcheck. This way, when you run Transcheck, you will see the following warning:

Wfp transcheck translation length attribute warning.png

Shorten the sheet names yourself in a way that does not create duplicates and you will be able to save the translated file.

Forbidden characters in Excel sheet name

Wordfast Pro is unable to save a translated Excel document when the following forbidden characters are used in worksheet names:

: \ / ? * [ ]

Solution: Revise your translation, removing the forbidden characters.

Corrupt source file

If you have run all of the above checks and have fixed all problems but still can't save the translated file, then you should perform pseudo-translation to check if there could be other integrity issues with the source file.

  1. Go back to the TXLF Editor and commit all segments to the TM using the Commit All icon under the Translation tab.
  2. Add a copy of the source file (with a different name) to the project.
  3. Open the newly added file and use the Translate All icon on the Translation tab.
  4. Try to save the translated file by clicking on the Save File As Translated icon under the File tab.
  5. If it works, fix fuzzies or no matches caused by unmerged or unsplit segments in this copy of the source file, using Concordance Search if necessary, then save your file as translated again (overwriting the previous version).


If all of the above fail to solve the problem you are having, submit a tech support request via your user account at wordfast.com, sending us the entire project (exported as a GLP package).