Excluding ‘+’ signs in UI strings from word count

I am setting up a project in Studio 2022 for 116 Excel files of UI strings. The strings look like this:

head north to + [street_name] + and turn right

The parameters in square brackets, such as "[street_name]," do not need to be translated, so I set up a regex rule below, and it works fine. 

Start Tag: \[

End Tag: \]

Non-translatable

However, even though the text in square brackets is locked, there is a large number of ‘+’ signs throughout the files, and I suspect they significantly increase the word count.

Two lines of text with UI strings, showing 'head north to + street_name + and turn right' and 'head south to + street_name + and turn right'. The 'street_name' parts are highlighted and locked for translation.

I would like to know how to exclude the ‘+’ sign from the word count.

Thank you in advance.



Generated Image Alt-Text
[edited by: RWS Community AI at 12:31 PM (GMT 0) on 14 Nov 2024]
emoji
Parents
  •  

    Why don't you include them in the tag? 

    Start tag: (?:\+\s)?\[

    End tag: (?:\])(\s\+)?

    I made the plus symbols optional in case you didn't always get the plus signs in this string.

    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 Paul,

    I now have a similar issue now so it might make sense to discuss it in this thread.

    This time HTML files have variables in vertical brackets like this:

    |=patient_first_name=|

    How can I make them non-translatable?

    (I tried several regex options for parsing suggested by ChatGPT and they didn't produce the desirable outcome; not sure if the regex was wrong or my settings).

    Thank you in advance!

    emoji
  •  

    If you simply want to have this as a placeholder tag, try this

    \|=.*?=\|

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji
  • Tried it, it didn't work, unfortunately, the file looks like this:

    Screenshot of a text editor with code showing a personalized message. There are placeholders for patient_first_name and patient_hospital_name. A line break tag is visible.

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 7:21 AM (GMT 1) on 28 Jun 2024]
  •  

    It must work, at least according to Regex Buddy. Could you please copy & paste few sentences from the text here? Thanks.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji
  • Here:

    Hi |=patient_first_name=|,

    Your healthcare team from |= patient_hospital_name=| would like to learn more about your pregnancy experience so far. Your thoughts will help your healthcare team plan better programs for future patients.

    Click this link to begin:
    |=application_event_login_url=|

    emoji
  •  

    Thank you. I will test later in Studio, but here is the proof it should work:

    Screenshot of RegexBuddy software with a text pattern test. The text includes placeholders for patient first name and hospital name, and a link with an application event login URL. No visible errors or warnings.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 7:36 AM (GMT 1) on 28 Jun 2024]
  • I am not too familiar with setting up HTML files, so could it be something I didn't click or anything else specific to HTML file settings?

    Thank you in advance!

    emoji
  •  

    Where did you enter this regex I provided? And please check, if you are using the html file type you modified. There are some different html file types.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji
  •  

    You should create a new thread for this because you are confusing users who try to help you.  This time you are using HTML and the solution Jerzy gave you will certainly be ok when working with XML.  With HTML this is only possible with server side scripts used within the HTML so you should really provide a sample of the html (that does not mean the whole file!) that relates to the section you need to address, and then you will get some sensible assistance.

    It really helps when we have one thread per question so we can then verify it when  you have the correct answer and this helps users who might be looking for a solution to the same things.  Please create a new one.

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

    You should create a new thread for this because you are confusing users who try to help you.  This time you are using HTML and the solution Jerzy gave you will certainly be ok when working with XML.  With HTML this is only possible with server side scripts used within the HTML so you should really provide a sample of the html (that does not mean the whole file!) that relates to the section you need to address, and then you will get some sensible assistance.

    It really helps when we have one thread per question so we can then verify it when  you have the correct answer and this helps users who might be looking for a solution to the same things.  Please create a new one.

    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
Children
No Data