I'm trying to create a TM Batch Import Tool according to the information provided here:
After some troubleshooting because of missing information and some small errors in the code I can run the TM Import tool. However, the following line in the TmImporter.cs class produces an error:
importer.Import(tmxPath);
Here is the error message:
Sdl.LanguagePlatform.Core.LanguagePlatformException: Die angeforderte Datendatei kann nicht gefunden werden.
bei Sdl.LanguagePlatform.TranslationMemoryApi.AbstractLocalTranslationMemory.get_Setup()
bei Sdl.LanguagePlatform.TranslationMemoryApi.FileBasedTranslationMemoryLanguageDirection.get_SourceLanguage()
bei Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryLanguageDirectionImportExport.get_SourceLanguage()
bei Sdl.Core.TM.ImportExport.Importer.CreateTmxReaderSettings()
bei Sdl.Core.TM.ImportExport.Importer.ImportTmxFile(String fileName)
bei Sdl.Core.TM.ImportExport.Importer.Import(String fileName, IImportDestination importDestination)
bei Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryImporter.Import(String fileName)
bei TMXimporttool.TmImporter.Import(String tmxPath)
Here is a sample from the TMX file:
<?xml version="1.0" encoding="utf-8"?>
<tmx version="1.4">
<header creationtool="SDL Language Platform" creationtoolversion="8.1" o-tmf="SDL TM8 Format" datatype="xml" segtype="sentence" adminlang="de-DE" srclang="de-DE" creationdate="20210525T060522Z" creationid="liNac\sbr">
<prop type="x-Quality:Integer"></prop>
<prop type="x-SourceFile:SingleString"></prop>
<prop type="x-TargetFile:SingleString"></prop>
<prop type="x-Recognizers">RecognizeDates, RecognizeTimes, RecognizeNumbers, RecognizeAcronyms, RecognizeVariables, RecognizeMeasurements</prop>
<prop type="x-IncludesContextContent">True</prop>
<prop type="x-TMName">de-DE_en-US</prop>
<prop type="x-TokenizerFlags">DefaultFlags</prop>
<prop type="x-WordCountFlags">DefaultFlags</prop>
</header>
<body>
<tu creationdate="20180808T123940Z" creationid="liNac\jen" changedate="20180808T123940Z" changeid="liNac\jen" lastusagedate="20180808T123940Z">
<prop type="x-LastUsedBy">liNac\jen</prop>
<prop type="x-Origin">Alignment</prop>
<prop type="x-ConfirmationLevel">ApprovedSignOff</prop>
<prop type="x-SourceFile:SingleString">PA01Projektverwaltung2017_02_22_okJEN_AW01ProjectAdministration2016_08_19_okCB.sdlalign</prop>
<prop type="x-TargetFile:SingleString">PA01Projektverwaltung2017_02_22_okJEN_AW01ProjectAdministration2016_08_19_okCB.sdlalign</prop>
<prop type="x-Quality:Integer">100</prop>
<tuv xml:lang="de-DE">
<seg>Seite <ph type="441" /> Praktisches Arbeiten</seg>
</tuv>
<tuv xml:lang="en-US">
<seg>Page <ph type="442" /> Applied Working</seg>
</tuv>
</tu>
Can you look into this and tell me if there is any mistake? For reference, please look at the RWS developers page (link see above).
Additional not: I coded everything exactly like on the RWS API developer page.
Added info on where code was retrieved.
[edited by: Matthias Burbank at 2:22 PM (GMT 0) on 16 Jan 2024]