GS2017 TMX export through API returns 0 TUs

Hi,

I try to export TUs from a GS2017 TM like this:

var exp = new TranslationMemoryExporter(tmld);
exp.BatchExported += ((sender, e) =>
{
OnCurrentTuChanged(e.TotalProcessed);
});

exp.Export(tmxPath, true);

But the result TMX file contains 0 TUs, though, the TM language direction contains ~ 6k TUs.

The same code with a GS2015 server works (Same Studio 2017 instance). If I export the TM in the Studio GUI, then I receive TUs in the TMX.

 

Probably related:

var ri = new RegularIterator( );
ri.MaxScan = 1000;
var tus = tmld.GetTranslationUnits(ref ri);

=> after this call, ri.ScannedTranslationUnits equals to 0, though, tus contains items.

(Repeating this on GS2015 results ScannedTranslationUnits=1000)

Do you have an idea how to fix / workaround this problem?

(GS version: 14.0.5094.4)

Thanks,

Tamas

 

 

Parents
  • Hi,

    We have a small .Net library which facilitates the interaction with GS 2017 API. You can find the library on Nuget the name is: GroupShareKit. 

    The library is open source, you can find the source code here .  In the solution you can see a project with unit test which shows examples on how you can consume the library. 

     

    Also we have a demo project which consumes the library. The project is open source you can find it here.

     

    The method which  Exports the TUs is:  GetTranslationUnitForTm(...) . You can see a example in unit test solution -> TranslationMemoryClientTest.cs -> GetTusForTm(string tmId) method.

     

     

    I hope this will help you. If you have any question do not hesitate to ask.

     

    Kind regards,

    Andrea Ghisa.

  • Hi Andrea,

    this is an already existing application (Migrating TMs) that should support both GS2015 and GS2017. Also, we need not the undividual TUs but the TMX export itself, that's why we use the desktop API, because the REST API has no solution for this at the moment - apart from writing a TMX renderer ourself. But this would work only for GS2017 again. (I see, that there is an ExportTm method on the TranslationMemoryClient class in groupsharekit, but it seems to add the export task to the queue only, but I found no way to download the generated file afterwards. )

    Do you see any chance that this is really a bug in the API? 

    regards,
    Tamas

  • Hi Tamas,

     

    Thank you for reporting the issue in GroupShare Kit, I fixed ExportTm method now it returns the tm as byte[]. The new version is not released on Nuget packages  because we still need to implement some functionality. But until we release the new version can you please use this build? And tell me if this fix your issue with GS 2017?

    In order to get the name of the tm, you need to make a call to GetTmById() and take the name from the response.

    I'll come back to you when we release the version on Nuget to get the latest version.

    If you have any questions do not hesitate to ask.

     

    Kind regards,

    Andrea.

Reply Children