This script is called from a BAT file. If I execute the BAT manually from CMD, everything works as expected.
If I execute the BAT through Jenkins it stops after pretranslating = doesn't update the translator files (*tbulic).
Any clues how to debug this?
Greetings,
Franz-Josef
Script:
;;;
;;; Open Project exclusive mode
;;;
/openproject:INFRASIGN_L10N.lpu normal
;;;
;;; Add new files - DLL, EXE
;;;
/addsource:CAD_PROG\*.dll
/addsource:CAD_PROG\*.exe
;;;
;;; Update from nightly build
;;; if required
;;;
/update ifrequired
;;;
;;; Import translations
;;;
/runmacro=InfrasignImportB8.bas
;;;
;;; Pretranslate with DeepL
;;;
/translate lang:Dutch
/translate lang:English
/translate lang:Spanish
;;;
;;; Export translations
;;;
/runmacro=InfrasignExportB8.bas
;;;
;;; Generate
;;; if required
;;;
/generate ifrequired
;;;
;;; Close project
;;;
/closeproject
Basic Export snippet:
''Exports translations in one TBULIC per lang.
Sub main
Dim prj As PslProject
Set prj = PSL.ActiveProject
If prj Is Nothing Then Exit Sub
Dim lang As PslLanguage
For Each lang In prj.Languages
' Create the translation bundle
Dim bundle As PslTransBundle
Set bundle = prj.PrepareTransBundle
Dim trn As PslTransList
dim i as Integer
For i = 1 to prj.TransLists.Count
set trn = prj.TransLists(i)
If trn.Language Is lang Then
bundle.AddTransList(trn)
End If
Next i
' Add glossaries
' bundle.AddGlossary("c:\Glossaries\myglossary.glo")
' bundle.AddGlossary(PSL.Glossaries(1))
' AddMacro
bundle.AddMacro("PslCheckCPP.bas")
' Make filename "test_<langcode>.tba/tbu"
Dim filename As String
filename = "F:\jenkins\jobs\l10n-infrasign-b8\workspace\INFRASIGN_L10N_" & PSL.GetLangCode(lang.LangID, pslCode639_1)
bundle.License ("")
prj.ExportTransBundle bundle, filename
Next lang
End Sub