Is there a way to update/pretranslate only some source or translation lists by macro?

Hi,

in my workflow, I'm using a macro tor updating and leveraging the source string lists, filtering some strings and to update and pretranslate the target string lists afterwards.

Unfortunately, I didn't found a possibility to update and leverage the source lists as a collection - not by updating/leveraging each source list one by one instead of all source lists as a collection.
And I didn't found a possibility to update and pretranslate the target string lists - for a single language - as a collection instead of one by one, too.

Please be so kind to let me know, how updating, leveraging and pretranslating can be run as a single action by a macro instead of updating, laveraging and pretranslating each string list one by one.
If you have any further questions, please don't hesitate to let me know.
Thank you very much in advance for your support.

Kind regards and have a nice day.
Nils

emoji
Parents Reply
  • I don't know whether it would make sense to talk about possible approaches to implementing a collection here. If this is really desired, I would probably implement a class (Class PslSourceListCollection), which then gets the methods I need implemented. Examples would be management functions such as RemoveAll, Add, etc. but also Passolo-specific functions such as PreTranslate or Update or Leverage. If such a class were designed and implemented, it could be used in various macros.

    Although I have already implemented a lot of macros, it never occurred to me to implement further classes and objects as macro classes in addition to the Passolo object model. The methods and properties (here Update and Leverage) provided by the Passolo object model have been sufficient for me in most of the use cases.

    In order to implement the required functions, I mostly worked with loops and in my opinion this would also be necessary if there were a collection. My approach would be:

    For Each src In prj.SourceLists
        If Condition Then
            src.Update
        End If
    Next src
    

    With the usage of a collection, it may look like this:

    Dim SrcColl As New PslSourceListCollection
    SrcColl.RemoveAll
    For Each src In prj.SourceLists
        If Condition Then
            SrcColl.Add src
        End If
    Next src
    SrcColl.UpdateAll
    

    My approach can't really be reused very well, but one of the goals was always to deliver a solution as quickly as possible and with as little effort as possible.

    emoji
Children