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

 

 

  • 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.

  • hi,
    It worked, thanks!

    regards,
    tamas
  • Hi Tamas,

    You're welcome.

    If you have any questions do not hesitate to ask.

    Have a nice day,
    Andrea.
  • Unknown said:
    this is an already existing application (Migrating TMs) that should support both GS2015 and GS2017.

    Hi , is the "Migrating TMs" version working with GS 2017 ready?

    I'm asking because SDL wants to forcibly :( migrate us to GS Cloud 2017 in few weeks and Migrating TMs is critical application for us for making daily backups required by our client (as there is no other usable way to do this in GS Cloud).

  • Unknown said:
    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?

    , was the mentioned new versions already released?

    I'm asking because SDL plans to forcibly :( move us from GS Cloud 2015 to version 2017 and without option to automate export of all TMs to TMX, this move is absolutely out of question.

  • Hi ,

    Yes, we published the new version is available you can download it from NuGet.

    Kind regards,

    Andrea.
  • Hi, I too have recently encountered this problem and have changed our integration to use the ScheduledServerTranslationMemoryExport class, which I gather from some occasional errors, just forwards the request onto the REST service. There are a few problems with this approach.

    First is performance. With GS2015 and the TranslationExporter class I could export our memories in just over 1 hour whereas the Scheduled exporter takes significantly longer. I'm still looking into this though.

    The 2nd problem is storage. The scheduled exporter does not remove files stored in C:\ProgramData\SDL\SDLServer1\TM. We now have over 30GB in this folder (32,000 files), dating back 4 weeks. Is it safe to manually delete them?

    Thanks
    Alan