Filtering on font with regex
Thread poster: rogerB
rogerB
rogerB  Identity Verified
Norway
Local time: 14:01
Member (2003)
English to Norwegian
+ ...
Sep 1, 2020

We have a text from a client where we only are to translate the display texts in a huge file.

The only thing that makes the display texts stand out from the rest is that they are formatted in Courier New, while the rest of the document is using another font

Is there any way to use regex to create a filter that only shows the text formated with Courier New in the source?


 
Natalie
Natalie  Identity Verified
Poland
Local time: 14:01
Member (2002)
English to Russian
+ ...

Moderator of this forum
SITE LOCALIZER
No need to use regex for this task Sep 1, 2020

This can be easily done in Word.

Select some text in your document that represents the formatting you want to change. It could be just one word.

In the Editing group choose Select > Select All Text With Similar Formatting.
All text in Courier new font will be highlighted.

Change it's formatting in some way, for example, make the font red, or highlight this text with yellow.

Use TransTools to hide everything but the highlighted text.
... See more
This can be easily done in Word.

Select some text in your document that represents the formatting you want to change. It could be just one word.

In the Editing group choose Select > Select All Text With Similar Formatting.
All text in Courier new font will be highlighted.

Change it's formatting in some way, for example, make the font red, or highlight this text with yellow.

Use TransTools to hide everything but the highlighted text.

You are done.
Collapse


 
rogerB
rogerB  Identity Verified
Norway
Local time: 14:01
Member (2003)
English to Norwegian
+ ...
TOPIC STARTER
Only Studio package received Sep 1, 2020

Yes, but we have only rceived a Studio project package from our client, and need to handle the text there

Natalie wrote:

This can be easily done in Word.

Select some text in your document that represents the formatting you want to change. It could be just one word.

In the Editing group choose Select > Select All Text With Similar Formatting.
All text in Courier new font will be highlighted.

Change it's formatting in some way, for example, make the font red, or highlight this text with yellow.

Use TransTools to hide everything but the highlighted text.

You are done.


 
Natalie
Natalie  Identity Verified
Poland
Local time: 14:01
Member (2002)
English to Russian
+ ...

Moderator of this forum
SITE LOCALIZER
Source file(s) Sep 1, 2020

Aren't there source files included in the package (as reference)?

If not, and you cannot get Word DOC from the client, you could try to export the file for review and do the same procedure as I have mentioned above.


 
rogerB
rogerB  Identity Verified
Norway
Local time: 14:01
Member (2003)
English to Norwegian
+ ...
TOPIC STARTER
Word not an option Sep 1, 2020

We need to handle the translation in studio, and the request for filtering is to speed thing sup, as there is a ton of the text, but spread scarsely in the file

Natalie wrote:

Aren't there source files included in the package (as reference)?

If not, and you cannot get Word DOC from the client, you could try to export the file for review and do the same procedure as I have mentioned above.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 14:01
Member (2006)
English to Afrikaans
+ ...
@Roger Sep 1, 2020

rogerB wrote:
The only thing that makes the display texts stand out from the rest is that they are formatted in Courier New, while the rest of the document is using another font.


I did a very brief test, and this worked for me, although your file may be more complex and it might not work for you. If you're into hacking, make a copy of your SDLXLIFF file, open it in a Unicode aware text editor (e.g. Akelpad) and then find this (near the top of the file):

<value key="FontName">Courier New</value>

and add this:

<value key="Bold">True</value><value key="TextColor">2, 22, 222</value>

so that you get this:

<value key="FontName">Courier New</value><value key="Bold">True</value><value key="TextColor">2, 22, 222</value>

and save the file. In Trados, remember to close the file (Ctrl+F4) so that it loads from scratch. This turns cells that are in Courier also into bold and blue. It makes it visually clearer, perhaps? Also don't forget to undo this in the end.

Plus, and I'm hoping the colour 2,22,222 doesn't occur anywhere else in your file, you can then use the Advanced Display Filter in Trados and select the Colours tab, select the right colour, and Apply Filter. If you don't have an "Advanced Display Filter" tab visible, you can find it at View > Information > and then an icon that says "Advanced Display Filter" when you hover over it.


Jaime Oriard
 
Natalie
Natalie  Identity Verified
Poland
Local time: 14:01
Member (2002)
English to Russian
+ ...

Moderator of this forum
SITE LOCALIZER
But the review file Sep 1, 2020

is intended to be reimported back to Studio. Then you can continue working with it.

rogerB wrote:

We need to handle the translation in studio...
[/quote]

And what are you expected to do with the rest of the text? Is is already translated? Or do you need to extract the onscreen terms only?


 
rogerB
rogerB  Identity Verified
Norway
Local time: 14:01
Member (2003)
English to Norwegian
+ ...
TOPIC STARTER
Will try! Sep 1, 2020

Thank you Samuel.

Will try this!

Samuel Murray wrote:

rogerB wrote:
The only thing that makes the display texts stand out from the rest is that they are formatted in Courier New, while the rest of the document is using another font.


I did a very brief test, and this worked for me, although your file may be more complex and it might not work for you. If you're into hacking, make a copy of your SDLXLIFF file, open it in a Unicode aware text editor (e.g. Akelpad) and then find this (near the top of the file):

Courier New

and add this:

True2, 22, 222

so that you get this:

Courier NewTrue2, 22, 222

and save the file. In Trados, remember to close the file (Ctrl+F4) so that it loads from scratch. This turns cells that are in Courier also into bold and blue. It makes it visually clearer, perhaps? Also don't forget to undo this in the end.

Plus, and I'm hoping the colour 2,22,222 doesn't occur anywhere else in your file, you can then use the Advanced Display Filter in Trados and select the Colours tab, select the right colour, and Apply Filter. If you don't have an "Advanced Display Filter" tab visible, you can find it at View > Information > and then an icon that says "Advanced Display Filter" when you hover over it.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 14:01
Member (2006)
English to Afrikaans
+ ...
On roundtripping via bilingual review Sep 1, 2020

Natalie wrote:
rogerB wrote:
Natalie wrote:
You could try to export the file for review [i.e. Bilingual Review]...

We need to handle the translation in Studio...

[The Bilingual Review file] is intended to be re-imported back to Studio.


This sounded like a nice idea... copy source to target for empty segments, then export to Bilingual Review, then change the colour of Courier New text in the exported DOCX file's target text using Microsoft Word (to e.g. blue), then import it back into Trados, and then you can use the Advanced Display Filter to filter on colour. Nice enough in theory, but... in my test file (which has segments in Courier New and in Candara), in the exported DOCX file, all segments have the same font (namely Calibri). I was unable to discover a method to have WYWIWIG (including font face) in the Bilingual Review file.


 
rogerB
rogerB  Identity Verified
Norway
Local time: 14:01
Member (2003)
English to Norwegian
+ ...
TOPIC STARTER
Would have worked well Sep 1, 2020

Ah, yes, the export for review option.

That will work,

Thank you both for the help!

Natalie wrote:

is intended to be reimported back to Studio. Then you can continue working with it.

rogerB wrote:

We need to handle the translation in studio...


And what are you expected to do with the rest of the text? Is is already translated? Or do you need to extract the onscreen terms only?
[/quote]


 
James Plastow
James Plastow  Identity Verified
United Kingdom
Local time: 13:01
Member (2020)
Japanese to English
community advanced display filter Sep 2, 2020

You can filter by tag content with the community advanced display filter.

[Edited at 2020-09-02 00:45 GMT]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Filtering on font with regex







Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »