Passolo MT Workflow – Resetting MT-Only Strings After Glossary Update

Hi everyone,

I'm working with a localization workflow that integrates DeepL via Tralotec's API, which includes a glossary feature. In our setup, machine translation is applied only to segments not already translated by humans, and glossary terms are crucial for maintaining consistency.

Here's the challenge:
Whenever a new term is added to the glossary, I need to ensure that all strings previously translated only by MT (i.e., without human post-editing) and containing that term are reset to "untranslated." This way, the next MT pass will correctly apply the updated glossary term.

I've attempted to implement this logic in a macro, but unfortunately, the code isn't working as expected. Before diving deeper into debugging, I’d like to share the concept and code with the group to see if anyone has tackled a similar issue or has suggestions. This is the code:

' Dieses Makro setzt alle Segmente auf "Untranslated",
' die mit DeepL Pro MT übersetzt wurden UND einen Glossarbegriff enthalten.

Sub Main()

' Glossarbegriffe manuell eintragen (deutsche Quellbegriffe)
Dim glossaryTerms
glossaryTerms = Array( _
"ProduktnameXY", _
"FachbegriffZ", _
"MarkennameABC", _
"Abschattierung", _
"Absteckung" _
)

' Durchlaufe alle TranslationLists im aktiven Projekt
Dim tl
For Each tl In ActiveProject.TranslationLists

Dim str
For Each str In tl.Strings

If str.Property("Origin") = "DeepL Pro Machine Translation" Then
For Each term In glossaryTerms
If InStr(str.SourceText, term) > 0 Then
str.Status = TranslationStatus.Untranslated
Exit For
End If
Next
End If

Next
Next

End Sub

Has anyone implemented a reliable way to:

  1. Identify MT-only strings that contain newly added glossary terms?
  2. Reset those strings to untranslated so they can be reprocessed with the updated glossary?

Any insights, code snippets, or workflow tips would be greatly appreciated!

Best regards,
Franz-Josef Knelangen

emoji