Bug importing xliff 1.2

Hi, I downloaded a trial version of SDL Trados Studio 2019 and I found a bug preventing me to import an xliff generated with another tool.

 

I think the issue relates to an opening tag closing in a different segment of the same translation unit because when I generate the file without segmenting the source, the problem does not occur.

 

Here is the error dump generated by Trados:

 

<SDLErrorDetails time="01/04/2019 12:25:43">
  <ErrorMessage>Index out of range (3). It must be a number from 0 up to the number of items in the collection (2).
Nombre del parámetro: index</ErrorMessage>
  <Exception>
    <Type>System.ArgumentOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <ParamName>index</ParamName>
    <HelpLink />
    <Source>Sdl.FileTypeSupport.Framework.Implementation</Source>
    <HResult>-2146233086</HResult>
    <StackTrace><![CDATA[   en Sdl.FileTypeSupport.Framework.Bilingual.MarkupDataContainer.CheckIndexValue(Int32 index)
   en Sdl.FileTypeSupport.Framework.Bilingual.MarkupDataContainer.get_Item(Int32 index)
   en Sdl.FileTypeSupport.Framework.Bilingual.AbstractMarkerWithContent.get_Item(Int32 index)
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.ParagraphUnitBuilder.GetPlaceholderAt(Int32 position)
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.ParagraphUnitBuilder.ConvertPlaceholderToPairTagFrom(Int32 position)
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.Consumers.Parser.PairedConsumers.EndPairedPlaceholderElementConsumer.ConvertPlaceholdersToPairTagIfIdsMatch(String messageName)
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.Consumers.Parser.PairedConsumers.EndPairedPlaceholderElementConsumer.Consume(XmlNodeParsed message)
   en lambda_method(Closure , IMessage )
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.InMemoryBus.Publish(IMessage message)
   en Sdl.FileTypeSupport.Filters.Xliff.ParserImpl.Publish(XmlNodeParsed message)
   en Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.XmlParser.Parse(XmlTextReader reader)
   en Sdl.FileTypeSupport.Filters.Xliff.ParserImpl.Parse(String xliffPath)
   en Sdl.FileTypeSupport.Filters.Xliff.Parser.ParseNext()
   en Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
   en Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
   en Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
   en Sdl.ProjectApi.AutomaticTasks.Conversion.ConversionTask.ProcessFile(IExecutingTaskFile executingTaskFile)
   en Sdl.ProjectApi.AutomaticTasks.AbstractFileLevelAutomaticTaskImplementation.Execute()]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>15.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>15.0.0.29074</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>3082</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>DESKTOP-DIBTBC1\Miguel Alejandrez</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>DESKTOP-DIBTBC1</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>16659932 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

Thank you very much.

Parents
  • Hi  ,
    are you sure your XLIFF file is valid? There is a free XLIFF checker which is considered to be very reliable:
    www.maxprograms.com/.../xliffchecker.html
    Daniel

  • Hi Daniel,

    Thank you for your response.

    Yes, I've checked the xliff with the tool you mention and the response is "Selected file is a valid XLIFF 1.2".

    I think I've isolated the issue and I'm attaching a "minimal" file that reproduces the issue (please rename xml to xliff). The error occurs when converting the file to a translatable format stage.

     

    Thanks,

    Miguel

     

    <?xml version="1.0" encoding="UTF-8"?>
    <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" its:version="2.0">
    <file original="word/styles.xml" source-language="es" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8">
    <body>
    </body>
    </file>
    <file original="word/document.xml" source-language="es" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8">
    <body>
    <trans-unit id="NFDBB2FA9-tu27" xml:space="preserve">
    <source xml:lang="es"><g id="1">a</g><bx id="2"/>b<bx id="3"/>c <ex id="3"/><ex id="2"/></source>
    <seg-source><mrk mid="0" mtype="seg"><g id="1">a</g><bx id="2"/>b<bx id="3"/>c</mrk><mrk mid="1" mtype="seg"> <ex id="3"/><ex id="2"/></mrk></seg-source>
    <target xml:lang="fr"><mrk mid="0" mtype="seg"><g id="1">a</g><bx id="2"/>b<bx id="3"/>b</mrk><mrk mid="1" mtype="seg"> <ex id="3"/><ex id="2"/></mrk></target>
    </trans-unit>
    </body>
    </file>
    </xliff>
    

Reply
  • Hi Daniel,

    Thank you for your response.

    Yes, I've checked the xliff with the tool you mention and the response is "Selected file is a valid XLIFF 1.2".

    I think I've isolated the issue and I'm attaching a "minimal" file that reproduces the issue (please rename xml to xliff). The error occurs when converting the file to a translatable format stage.

     

    Thanks,

    Miguel

     

    <?xml version="1.0" encoding="UTF-8"?>
    <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its="http://www.w3.org/2005/11/its" xmlns:itsxlf="http://www.w3.org/ns/its-xliff/" its:version="2.0">
    <file original="word/styles.xml" source-language="es" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8">
    <body>
    </body>
    </file>
    <file original="word/document.xml" source-language="es" target-language="fr" datatype="x-undefined" okp:inputEncoding="UTF-8">
    <body>
    <trans-unit id="NFDBB2FA9-tu27" xml:space="preserve">
    <source xml:lang="es"><g id="1">a</g><bx id="2"/>b<bx id="3"/>c <ex id="3"/><ex id="2"/></source>
    <seg-source><mrk mid="0" mtype="seg"><g id="1">a</g><bx id="2"/>b<bx id="3"/>c</mrk><mrk mid="1" mtype="seg"> <ex id="3"/><ex id="2"/></mrk></seg-source>
    <target xml:lang="fr"><mrk mid="0" mtype="seg"><g id="1">a</g><bx id="2"/>b<bx id="3"/>b</mrk><mrk mid="1" mtype="seg"> <ex id="3"/><ex id="2"/></mrk></target>
    </trans-unit>
    </body>
    </file>
    </xliff>
    

Children