Word file type excluding placeholder even with the "Include" settings

Hello everyone,

I'd like to ask for your help. I have a source DOCX file with a product description. I have set the product name as a placeholder in the Word file type settings for embedded content, and made it "Include" the placeholder, as I need it to be a part of the text in all occurrences. Everything words OK when the placeholder is in the middle of a sentence, but there's one place where the sentence starts with the placeholder and despite the settings, Trados excludes it from the whole sentence. Please see the reference screenshots below.

Embedded content settings

Dialog box for 'AddEdit Embedded Content Rule' with Tag Type set to Placeholder, Tag Expression as 'Starry Mice', and Segmentation hint set to 'Include'.

Screenshot of the source DOCX file with marked problematic words

Screenshot of a DOCX file showing text with 'Starry Mice' highlighted in yellow where the placeholder is in the middle of a sentence.

Trados preview - note that the "Starry Mice" placeholder is excluded in segment 6

Trados preview showing two columns with text comparison, where 'Starry Mice' placeholder is missing in the left column in segment 6.

Any ideas what went wrong, and how to achieve that the placeholder is treated under "Include" settings?

Thank you in advance for your help!

Jan

Sample source file

 sample-text-starry-mice.docx



Generated Image Alt-Text
[edited by: RWS Community AI at 8:08 AM (GMT 0) on 9 Jan 2025]
emoji
Parents
  • Thank you but that doesn't change anything, works (or rather does not work) the same

    emoji
  •  

    The problem is that Trados Studio sees this placeholder at the start of the sentence and assumes (incorrectly in this case) that it's not needed in there as it's at the start anyway.  I'm not sure if this is intended behaviour or a bug, but I do think it should respect the "include" option -  fyi/comment?  If you view "All Content" instead of "All Segments" you'll see it and can move it in manually if needed:

    Screenshot of a text editor with a translation segment showing text in Polish, with placeholders and emojis within the text.

    One solution to this is to use tag pairs instead... lookahead for the opening and lookbehind for the closing.  For example:

    Dialog box titled 'AddEdit Embedded Content Rule' with fields for Regular Expression, Start Tag, End Tag, and options for Translate and Formatting.

    That will get you this:

    Screenshot of a document titled 'sample-text-starry-mice.docx' with highlighted text segments and annotations in Polish, indicating translation and formatting instructions.

    Not perfect but at least you have it automatically in segment and the content is locked.  Maybe that helps?

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 11:21 PM (GMT 0) on 9 Jan 2025]
  •  Dear  ,

    Thank you very much for looking into this. I'm aware about using the "All content" option, but it's not really convenient when preparing multiple languages, and it requires additional manual work either by us, or by our linguists.

    The other option - lookahead/lookbehind - is very interesting. We probably won't use it in this scenario, but I was looking for a way to create the locked content for quite some time now, so finally I know how to do that - thank you very much! It's always great to learn something new.

    As for the original issue - I think this is kind of a bug, as the option "Include" should simply work, that's why the option is there. But it might be somehow related to the formatting of the source document. If you select all text in Word and change the font to Courier New (for example), the "Include" option suddenly works well. I find it very interesting. We found two other ways how to make it work - which makes me think it has something to do with the formatting:

    1. If we remove emojis from the paragraph, the "Include" option starts working

    Before and after comparison of text formatting in a document. The 'Starry Mice' text changes from red with a font issue to standard black text matching the rest of the paragraph.

    2. If we just type Starry Mice so it uses the same font and colour as the rest of the text, the "Include" option starts working correctly as well

    Before and after comparison of text formatting in a document. The 'Starry Mice' text changes from red with a font issue to standard black text matching the rest of the paragraph.

    This all seems to be as an issue somehow connected to the formatting of the source DOCX file. But in either case, I still think that the option "Include" should work by default regardless of formatting or other things.

    Thank you again for your help with this one. If you come around anything more related to that, please let me know, as I'm curious ;)

    With kind regards,

    Jan

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 8:03 AM (GMT 0) on 10 Jan 2025]
  • Without spending more time to debug in code, I would assume this is due the nesting, having tag pairs around which are "may exclude" and there is not text to really attach to.

    My suggestion would be to use the "not translable styles" feature and mark the text to be excluded with it - that should simplify the structure, but of course needs to be tested.

    emoji
  •   

    Good suggestion Patrik... it does mean having to prepare the source files beforehand which could be a pain, although I imagine reasonably easy to automate.  But it works quite well:

    Screenshot of a software interface with a focus on a preview pane showing a Microsoft Word document. The document contains text in Polish with 'Starry Mice' collection mentioned and emojis inserted. A red arrow points to a style exclusion setting.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 10:52 PM (GMT 0) on 10 Jan 2025]
  • Dear  , how are you today?

    Thank you again for looking into this. Would you mind explaining your thoughts further, or give me some idea what to look for?

    prepare the source files beforehand

    Could you please shortly explain what preparation do you have in mind? Is it about formatting? If so, I'm afraid that's not a good option since the client insists on keeping the formatting exactly as they prepared it. Such manual preparation (and then reverting files back) is quite risky and it also means a lot of manual work to make sure everything is fine in all the translated languages.

    Styles - NoTranslate

    Could you share more about this, please? I've found some topics on help and forums, but I'm not sure what exactly you did to process the file correctly.

    Thank you in advance!

    Jan

    emoji
  •  

    Could you please shortly explain what preparation do you have in mind? Is it about formatting?

    Yes.  It's about applying a style to the words/phrases you would like to be non-translatable.  You can create a style that is nothing more than a name and then use that name in Trados Studio to make it non-translatable.  Like this the formatting generally would not be affected.  For example, if the style was called "NoTranslate" as I used in the example, you would create the style and then select the word/phrase, then in the Styles pane, click on "NoTranslate". This applies the character style over the selected text without altering the underlying paragraph style.  You could of course search & replace the styles for the whole file in one go.

    Once the translation is complete and you want to remove the NoTranslate styles just open the document in Word, then in the Styles pane, find the NoTranslate style, right-click on it and select Select All Instances.  Then press Ctrl+Spacebar to clear the character style while preserving the underlying paragraph style.

    You could also do this all programmatically with a VB Macro which might be a more efficient approach.

    If none of that is useful for you then another approach might be to try and use the Cleanup Tasks plugin from the AppStore - https://appstore.rws.com/Plugin/23

    I'm not sure how effective that would be given the formatting already around most of your phrases, but it might be worth investigating if you're worried about the source documents.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Dear  ,

    Thank you very much! We'll look into this further.

    Have a good day,

    Jan

    emoji
Reply Children
No Data