Translate only specific text with a particular pattern (txt file)

Hello all,

In the sample below, we would like to translate only the red text from the text exists in {{curly}} brackets.

<li>Klicken Sie {{clik|ff|OK}} und {{clik|OK}}.</li>
==some text here {{click|..\path}} bzw {{click|..\path}} some other text here.==

<ol>some text here [[click|..\path]] bzw [[click|text|..\path]] some other text here.</ol>

(tags and "==" have been already taken care of).

Is there a quick way how to do that? Please note that source is in txt format.

/cfs-file/__key/communityserver-discussions-components-files/171/custom_5F00_txt.zip

/cfs-file/__key/communityserver-discussions-components-files/171/test.zip

Thanks!

Parents
  • Hi

    I assume you made a typo when you enclosed your <ol>...</ol> text in [] instead of {}.

    So I assumed this input:

    <li>Klicken Sie {{clik|ff|OK1}} und {{clik|OK2}}.</li>
    ==some text here {{click|..\path1}} bzw {{click|..\path2}} some other text here.==

    <ol>some text here {{click|..\path3}} bzw {{click|text|..\path4}} some other text here.</ol>

    Generally speaking, I tried to cut off the part before the first red text and after the last red text and block out the in-between stuff as inline tag:

    Trados Studio screenshot showing the 'Desired structure' dialog with regex patterns for opening, closing, and inline tags.

    and

    Trados Studio screenshot displaying 'Inline tags' settings with options for opening and closing patterns, tag type, and translatability.

    which results in this:

    Trados Studio screenshot highlighting text with 'OK1' and 'OK2' in orange, indicating potential issues or warnings in the code.

    (I never felt the slightest inclination to Sudoku, but Regex is sheer fun.)

    Daniel

     

    Opening: ^(.*?)(\|[\w]*\|?(?!}))

    Closing: }}(?!(.*})).*$

    Inline: (}}.*)({{)([\w\|]*)(?![\w^}])\|

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:08 AM (GMT 0) on 5 Mar 2024]
  • Hello

    Thanks for the input.

    Although it exports only what has been marked as red in my initial post, this was only a sample, so practically for the other cases we have to further expand your regex..

    Anyway, it would be good (and I up-voted for that) to have the negation option in Studio.

    Regards
    Pavlos
Reply Children
No Data