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.

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

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

Children
No Data