Segmentation rules - help

Hello

I need help, i need to set up Studio so that it doesn't create a new segment after a list of specific tags

  • V5
  • MT
  • VR
  • NVR
  • NextM
  • NoNextM

Anyone could help me with that, it is in html files

emoji
  •  

    I think we'll need more information than this.  Can you share some of the html itself, and then show what happens now and what you would like to see.

    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
  • hi and sorry to get back so late, i was on holidays

    where can i safely share the file?

    emoji
  •  

    Don't share the file.  Just recreate it using a small part that demonstrates your problem and change the text so it's safe to share.  You can then either use the "Insert" menu to copy paste the html or attach the sample file.

    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
  • Hello

    examples:

    <td>La txyz gdfghk dans la <nvr><a href="../2-Window_D2/WIN_Toolbar_ins_program_dmis.html"></nvr>barre d&#39;insertion DMIS<nvr></a></nvr> (standard, standard plus ou avancé).</td>

    Indique la xabc de <NoNextM><a href="FEAT_Surface_ign_.html"></NoNextM>comation<NoNextM>

    the fact that sdl segments after these tabs is a problem because when we start a new segment we dont add a space and then in the final result the words are not separated but should be

    emoji
  •  

    This is either a poor way to write html or you have extracted it incorrectly and not provided sufficient information to show you properly how to handle it:

    • The tags <nvr> and <NoNextM> are not standard HTML tags.  This may be intended, in which case you need to add the rules for them to behave as you wish.
    • The custom tags <nvr> and <NoNextM> are not closed properly.  In HTML, every opening tag should have a corresponding closing tag (e.g., </nvr> and </NoNextM>), unless it is a self-closing tag like <br> or <img>.

    If I try and guess a more complete example I can process in Trados Studio I might do something like this:

    If I process this in Studio with defaults I see this:

    Screenshot of an HTML preview in Trados Studio. The preview displays the document title 'test.html' at the top left corner and again at the bottom. The body of the document shows two lines of text: 'La txyz gdfghk dans la barre d'insertion DMIS' which is in bold, indicating it's a link, followed by '(standard, standard plus ou avancé).' The second line reads 'Indique la xabc de comation' with 'comation' also in bold as a link. All text is against a white background with the links highlighted in blue.

    To prevent the segmentation I add two rules for the non-standard tags and make them translatable, inline and include:

    Screenshot of an HTML preview in Trados Studio, highlighting HTML tags and content. The window title 'test.html' is shown at the top left and again at the bottom. The HTML content displayed includes two segments with visible HTML tags. The first segment: 'La txyz gdfghk dans la', followed by a purple 'nvr' tag, a hyperlink 'barre d'insertion DMIS' encapsulated by 'a' tags, and closing 'nvr' tag, with text '(standard, standard plus ou avancé)'. The second segment: 'Indique la xabc de', followed by a purple 'NoNextM' tag, a hyperlink 'comation' encapsulated by 'a' tags, and a closing 'NoNextM' tag. The 'nvr' and 'NoNextM' tags are highlighted in purple, and the 'a' tags in lighter purple.

    That seems to do the trick, but note that if I use your snippet exactly as you provided it then this will not work because the tags in your example are not closed properly.  So I have applied some artistic licence to try and explain this to you.

    The two rules are here under the parser rules for html:

    Screenshot from Trados Studio HTML filetype settings, focusing on the parser rules section. Two custom HTML tags, 'nvr' and 'NoNextM', are highlighted at the bottom of the parser rules list. Both are set as 'Always Translatable' and classified as 'Inline' elements within the document structure. A red arrow points towards these two tags, indicating their addition to the list of standard HTML tags like 'td', 'u', and 'bdi'.

    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
  • Hi and thank you for your help

    i will try

    is there a way i could send you a sample file?

    emoji
  •  

    is there a way i could send you a sample file?

    So you tried to set some rules along the lines I suggested and it didn't work?

    If so and if it's a sample file you can use the Insert menu here to attach the file.

    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
  • it seems to work indeed. shall i do the same rule for  the ohters?

    • V5
    • MT
    emoji
  •  

    shall i do the same rule for  the ohters?

    Given I can't see how these are used I have no idea.  Why don't you try it and see?

    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