Import translation Bundle

Hi Team,

I am using SDL Passolo 2016. Using Passolo automation I am not able to import previously exported file using prj.ImportTransBundle(fileToBeImported). The same file if importing manually, is being successfully imported. Using Passolo automation I have used both the flag pslImportMerge pslImportRelease still am not able to do it.

Can anyone please reply to this query as I want the solution urgently.

  • Hi,

    You can export to glossary the translation Bundle.

    You need to release the bundle before to import from glossary
    in the main file click on project, export manager and press the button un-export
    before to import from glossary.
    good day
    Dan
  • Thanks Daniel for the quick response.  Manually I am able to do it but while running it using SDL automation object prj.ImportTransBundle(fileToBeImported)  it's failing.

    Attached below the code:

     

     

    #PRE CONDITION:

    LicenseManager_ja_7.tbulic16 is the exported file from the LicenseManager.lpu and we want the same to be imported.

    //Tbulic file which need to be imported
    var tbulicFileName = @"D:\LicenseManager\LicenseManager_ja_7.tbulic16";


    //lpu file to which tbulic needs to be imported
    var lpuFile =@"D:\LicenseManager\LicenseManager.lpu";

    var app = new PassoloApp();

    PslProject m_PslProject = app.Projects.Open(lpuFile );

    var isImportSuccesful = m_PslProject.ImportTransBundle(tbulicFileName);

    //var isImportSuccesful = m_PslProject.ImportTransBundle(tbulicFileName, 512);
    //var isImportSuccesful = m_PslProject.ImportTransBundle(tbulicFileName, 1024);
    //var isImportSuccesful = m_PslProject.ImportTransBundle(tbulicFileName, 1536);

    if (!isImportSuccesful)
    {

       console.log("Import Failed");
    }
    m_PslProject.Close(0);

    app.Quit(0);

     

    # isImportSuccesful  is becoming false since the function m_PslProject.ImportTransBundle(tbulicFileName) is returning false as it is failing to import.

    # I also tried with both the flags i.e. pslImportMerge (Value = 512),  pslImportRelease (Value = 1024) and also combined the flag to use both functionality i.e. (Value = 1536) and the same is in commented line in the code.

     

    Please have a look into it.

  • I quickly run a test with an internal macro using VBA and the prj.ImportTransBundle(tbulicFileName) function runs without any problems. As the COM call ends up in the same internal function I assume there is no problem with the function itself.
  • ImportTransBundle(tbulicFileName) works fine with the same tbulic being exported from the corresponding lpu respectively. But I want to import different tbulic to a lpu. i.e implementing "Import Anyway" functionality in Passolo automation which I am not able to carry. Is there any way to do the same in automation?
  • While importing a bundle back into the project Passolo checks the internal IDs of translation lists and within the translation lists the internal record IDs. This is important to ensure the data integrity of a project. If this is NOT done the import would produce a huge amount of mistranslations/misalignments.

    The “Import Anyway” option is just available from the GUI and should be used just by advanced project managers as it will require checking if the import doesn’t create these mistranslations/misalignments.

    In automated process you must ensure that the bundle exported from Passolo is the same as the bundle you import (from the internal IDs). By not releasing the string list you can import bundles that change frequently over and over again.
  • Hi Guys,

    Any solution for the above problem. i.e. implementing "Import Anyway" functionality in Passolo2016 automation?