Detecting language please wait for.......
we're using Passolo 2018 (22.214.171.124) on multiple independent projects but with some similar vocabulary.
We want to create one gloassary per project and use these glossaries among all projects, so the translator does not need to download all projects to his machine.
To automate this we want to update the gloassaries automatically at night.
is there a possibility to export a gloassary file via pslcmd ? We did not find anything in the documentation.
yes, this is possible. We do this in our environment. We also merge all exported glossaries into one. So it is only needed to provide one glossary over all projects.
I am not sure if this is…
I am not sure if this is the best clean solution, but will share it nevertheless:
Fist, the macro that exports a glossary (and also a TMX file, we need both) of an active Passolo project. Add this to your Passolo installation
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
' Make filename "test<langcode>.tba/tbu"
Dim filename As String
filename = "<file path>" & prj.Name & "-" & lang.LangCode & ".glo"
filename2 = "<file path>" & prj.Name & "-" & lang.LangCode & ".tmx"
prj.Export "PASSOLO Glossary Maker", bundle, filename, expAllDeleted
prj.Export "TMX Export", bundle, filename2, expAllDeleted
I created a python script, that scans a folder for Passolo project files and calls the Macro for each project within a bat file:
from os import listdirfrom os.path import isfile, joinimport subprocess
lpufolder= "<path to your folder, where all Passolo projects are located>"
batfilepath="passolocommands.bat"batfile = open(batfilepath, 'w+')
batfile.write("cd \"C:\Program Files (x86)\SDL\SDL Passolo\SDL Passolo 2018\"\n")
onlyfiles = [f for f in listdir(lpufolder) if isfile(join(lpufolder, f))]
for lpu in onlyfiles: if lpu.endswith(".lpu"): print(lpu) batfile.write("pslcmd.exe "+lpufolder+"\\"+lpu+" /runmacro=<name of the macro bas file from above>.bas /quit\n")
Maybe this helps...
Thank you, this works fine ;)