Forum Discussion

DouweHarder's avatar
DouweHarder
Community Member
2 years ago

Error importing xliff translation

When I import a xliff translation file I get an error. Is there anybody who can tell me what might be wrong based on the error message below?

<?xml version="1.0" encoding="utf-16"?>
<ErrorReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserId>auth0|59ae53a1d1a25c6b807da557</UserId>
<HardwareId>R25WM-HVEU3-FU11A-U3VVT-1LH1S</HardwareId>
<Message>An item with the same key has already been added.</Message>
<StackTrace> at void System.Collections.Generic.Dictionary&lt;TKey, TValue&gt;.Insert(TKey key, TValue value, bool add)
at Dictionary&lt;TKey, TElement&gt; System.Linq.Enumerable.ToDictionary&lt;TSource, TKey, TElement&gt;(IEnumerable&lt;TSource&gt; source, Func&lt;TSource, TKey&gt; keySelector, Func&lt;TSource, TElement&gt; elementSelector, IEqualityComparer&lt;TKey&gt; comparer)
at IList&lt;XElement&gt; Articulate.Globalization.Internal.Xliff.V1_2.XliffItemsParser.GetBlocks(IEnumerable&lt;object&gt; source)
at XDocument Articulate.Globalization.Internal.Xliff.V1_2.DocumentStateTranslationUnitBuilder.CreateDocument(transunit translationUnit)
at bool Articulate.Globalization.Internal.Xliff.V1_2.DocumentStateTranslationUnitBuilder.Apply(ITranslationUnit projectTranslationUnit, transunit translationUnit)
at bool Articulate.Globalization.Internal.Xliff.V1_2.TranslationUnitFactory.Apply(transunit translationUnit, ITranslationLoader translationLoader, Func&lt;string, ITranslationUnit&gt; projectTranslationUnitLookup)
at void Articulate.Globalization.Internal.Xliff.V1_2.XliffBuilder.Apply(string fileName, ITranslationLoader translationLoader, IEnumerable&lt;ITranslationUnit&gt; units)
at bool Articulate.Globalization.TranslationProvider.LoadXliff(IList&lt;ITranslationUnit&gt; items, string fileName)
at void Articulate.Globalization.TranslationProvider.StartProvider()
at Articulate.Globalization.TranslationProvider()+(object _, EventArgs __) =&gt; { } [0]
at void Articulate.Globalization.TranslationImportResult.OnShown(EventArgs e)
at void System.Windows.Forms.Form.CallShownEvent()
at void System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at void System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj)
at void System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at void System.Windows.Forms.Control.InvokeMarshaledCallbacks()</StackTrace>
</ErrorReport>

  • Hi Douwe!

    Sorry to hear you've run into this error when importing an XLIFF translation file!

    I noticed that you've already opened a support case and shared your file with my teammate Lianne. Great move! I see that your file has been received, so you should be hearing back from Lianne shortly!

    We can continue this conversation in your support case to keep all information in one spot.

  • DouweHarder's avatar
    DouweHarder
    Community Member

    Hi Steven,

    Indeed your colleague Lianne is taking great care of it. And she discovered some errors in the xliff. The translation agency made some changes in the structure of the xliff. They are repairing it right now.

    I attach a file with an example. It might be usefull information for other people running into the same problem.

    • StevenBenassi's avatar
      StevenBenassi
      Staff

      Hi Douwe!

      So glad to hear Lianne was able to assist you! Thanks for following up and sharing the feedback on what was causing the error when importing an XLIFF translation file. I'm sure other users discovering this thread will find the insight very helpful!

      Have a great rest of your week!