Show differences in segment being translated and searched/recommended segment

Hi All,

I created our own translation service provider using Creating a Translation Service Provider Plug-in. I am able to retrieve recommended segments without any problem. However, the differences between the segment being translated and the searched segment is not being displayed. I need to show the differences the way a file-based translation memory is displaying as shown in the screenshot below.

Screenshot of Trados Studio showing a segment comparison with differences highlighted in blue and red, with the word 'therefore' duplicated and marked.

Can anybody point me to some resources on how to do this? Or can someone help me achieve this? This question was asked like 3 years and 6 years ago but nobody answered.

https://community.rws.com/developers-more/developers/language-developers/f/sdk_qa/20977/add-support-for-showing-differences-in-the-tm-source-in-a-translationprovider-plugin

https://community.rws.com/developers-more/developers/language-developers/f/sdk_qa/6449/show-differences-in-translation-source---tu-source

Hope someone out there can help me with this.

Best,

Edward



Generated Image Alt-Text
[edited by: Trados AI at 1:36 PM (GMT 0) on 5 Mar 2024]
emoji
Parents
  • Hi  ,

    As I've said in another thread as well,

    We've found a way to show differences between TUs in third party TM providers. It involves a bit of reflection, but we've hidden that away.
    Long story short:
    - we've created a sample project that shows just how simple it is to use in your own project - github.com/.../SimpleTranslationProvider
    - the key class is "ComputeSearchResults" that pretty much abstracts away all the complexity
    - to see how to use it, please check out MyTranslationProviderLanguageDirection.SearchSegments
    - obviously, we've made the code public, so you can extend/tweak it to your liking

    The core idea is you have an original text (in the source language), and a resulting text (what actually got translated). The code we've provided properly computes the differences between them, so that the differences are shown in the UI.

    To quickly see everything in action, just run the sample project:
    - Open the sample project from Trados Studio 2022
    - go to Project Settings >> ... Translation Memory and create a Translation Provider, and Automated Translation, select "Use", and select "smtiti".
    - Open the SecondSample.docx.sdlxliff file
    - Select with the 1st, 2nd, and 4th segments
    - Do note that in our simple sample, you should ignore the translation itself. Please focus on what needs to be done on the source segments

    Finally, I'd love to hear your thoughts! Please let me know if this works for you.

    Best,
    John

    emoji
Reply
  • Hi  ,

    As I've said in another thread as well,

    We've found a way to show differences between TUs in third party TM providers. It involves a bit of reflection, but we've hidden that away.
    Long story short:
    - we've created a sample project that shows just how simple it is to use in your own project - github.com/.../SimpleTranslationProvider
    - the key class is "ComputeSearchResults" that pretty much abstracts away all the complexity
    - to see how to use it, please check out MyTranslationProviderLanguageDirection.SearchSegments
    - obviously, we've made the code public, so you can extend/tweak it to your liking

    The core idea is you have an original text (in the source language), and a resulting text (what actually got translated). The code we've provided properly computes the differences between them, so that the differences are shown in the UI.

    To quickly see everything in action, just run the sample project:
    - Open the sample project from Trados Studio 2022
    - go to Project Settings >> ... Translation Memory and create a Translation Provider, and Automated Translation, select "Use", and select "smtiti".
    - Open the SecondSample.docx.sdlxliff file
    - Select with the 1st, 2nd, and 4th segments
    - Do note that in our simple sample, you should ignore the translation itself. Please focus on what needs to be done on the source segments

    Finally, I'd love to hear your thoughts! Please let me know if this works for you.

    Best,
    John

    emoji
Children
No Data