Failure to translate a block that contains block properties

Found in

EPiServer.Labs.LanguageManager 3.1.2

Fixed in

EPiServer.Labs.LanguageManager 3.1.4

Created

May 10 2018

Updated

May 23 2018

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Create a block type that contains 2 block properties.
2. Create a block in English then publish.
3. Create a draft version in Swedish.
4. Add the draft version of the block to a project. Then, follow the instructions to export and import that block for translating (Importing and exporting XLIFF).

http://webhelp.episerver.com/latest/addons/languages.htm

Expected: The project is successfully translated.

Actual: Failure to translate the project with the following exception:

2018-05-10 10:00:20,288 [80] ERROR EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter: Exception when import translation package
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter.ImportTranslationFromXmlString(String xmlString, String fileName, Int32 projectId)
   at EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter.ImportTranslationPackage(String packageName, Int32& projectId, String& message)
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter.ImportTranslationFromXmlString(String xmlString, String fileName, Int32 projectId)
   at EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter.ImportTranslationPackage(String packageName, Int32& projectId, String& message)