On Saturday 25th Sept, we are completing planned maintenance work on the SDL/RWS Account platform. The outage is expected to last from Saturday 03:00 BST to Monday 27th Sept 11:00 BST. During this time you will not be able to access SDL accounts or activate / deactivate licences. Apologies for the inconvenience this causes.

Any regex to filter all the texts or segments with the same color?

Hi Studio experts,

I have a survey file. All the programming codes or instructions (in blue) do not need translations. Is it possible to filter them all in studio so that I can lock and exclude them from analysis?

Thanks,

Ivan

  • Hi Pengfei,

    This could well be possible... depends on a couple of things:

    1. The file format you are translating
    2. Possible prep work on the source file itself rather than in Studio (depends on the file format)

    Can you share an example file?

    Regards

    Paul
  • Hi Paul,

    Thanks for your quick reply. It is a word file. 

    Sorry. It is my first time to ask question here. I cannot see the attachment link. How can I send you the example file?

    Thanks,

    Ivan

    ASK ALL
    Gender. Are you

    1.       Male

    2.       Female

     
    ASK ALL
    Age. How old are you? |_ _| RANGE 18-65
     
    ASK ALL
    Edu. Are you in possession of a college degree (bachelor degree, master of science, PHD – any comparable education level)?
    SINGLE ANSWER
    1.       Yes, I’m in possession of a college degree
    2.       No, I’m not in possession of a college degree
     
    ASK IF EDU=1
    Uni. How many years did you spend at college or university as a student? |_ _| RANGE 1-10
     
    ASK IF EDU=2
  • Hi Ivan,

    No worries... you just need to use the "Use rich formatting" option as this offers a toolbar where you can select a file from your computer:

    Then select this icon:

    Regards

    Paul

  • Thanks. Please see the example file. If I can select all the blue texts in the word file, make them hidden, then these texts will not be imported to Studio. Don't know if it can be achieved in Word, or if you have any better solution.  

    example file.docx

  • Hello Ivan,

    This video explains... was easier to show you:

  • Hi,

    Just a note. Make sure that you check the file type settings in Project Settings, if you add the file to an existing project (not just File > Options, since those settings will only apply to projects that you create from now on).

    After you have generated the file you might want to restore the hidden text to Not hidden before delivering to the client. Just do it the same way, Find and Replace > Format > Font > uncheck Hidden > OK > Replace All.

    And a tip: If you get these files regularly you can make macros for the search and replace operations and perform it by just clicking one button.

    Paul: Is there a way to convert text like this to inline tags, so that it can be visible in Studio? I haven't really tried it, but I suspect you already have the answer :)

  • Hi Paul,

    It works. I really appreciate your quick help. Thanks a million!!!

    Regards,

    Ivan

  • Daniel Fransson said:
    Is there a way to convert text like this to inline tags, so that it can be visible in Studio?

    Hi Daniel,

    My initial reaction was sure... just create a style and then add this to Studio so that style was converted to inline tags.  So I tested it with this:

    I could have used the tw4winMark that is already listed but thought I'd play with a new one as I have not messed around with this a lot before.  This works but has a problem that is more likely to be associated with my knowledge of Word.  I could not replace the fonts that were blue where they were also part of text in the same sentence, so I wound up with the entire sentence being the inlineTAG style.  I think this has something to do with me basing the new style on the normal style... but I'm not sure and don't have enough time to mess around with this at the moment.

    So might be possible... might be possible.  I guess the alternative would be to use the display filter as you could feasibly read the content in the tags like this... not pretty of course!

  • Yes, I used the All content filter as well, but thought it would be neat to have the info upfront.

    I had to create the tw4winInternal style in Word, but got the same result as you, when the blue text is on the same line it the entire paragraph gets the style, even if I create the style with Style type: Character. Well, we'll see if I figure it out later...

    Five minutes later: Now it worked. I must have done something differently. But the result is the same for this particular case, only the non-translatable text on the same line will show in the segments, so it's effectively the same as hiding the text. I guess it can be fixed with more search and replace options, but for most cases I guess it's just not worth it.

    Anyway, for the record: In Word, click Home > Create a Style > Modify and make sure the style type is Character.

  • That's a good tip!! Thanks Daniel.

    I guess the problem is where the style is a complete segment Studio will just move it external.