Getting Translators to Code II - A Powerful (yet simple) Search Script
Thread poster: Juan Martín Fernández Rowda
Juan Martín Fernández Rowda
Juan Martín Fernández Rowda  Identity Verified
United States
Local time: 06:56
English to Spanish
+ ...
Jan 10, 2017

How much time do you spend researching when you translate? I mean, searching for information, terminology, pictures, definitions, context, etc. Did you ever think how much of your work day does this take?

Searches can be easily automated
... See more
How much time do you spend researching when you translate? I mean, searching for information, terminology, pictures, definitions, context, etc. Did you ever think how much of your work day does this take?

Searches can be easily automated. So, following up on a previous forum post (http://www.proz.com/forum/translation_theory_and_practice/310216-getting_translators_to_code.html), here's a second, brief and simple post where you can learn how to create you own personal search script.

The code is very basic, and the goal is getting you to understand how it works and hopefully encourage you to try it and personalize it.

Here's the link: https://juanrowdablog.wordpress.com/2017/01/07/getting-translators-to-code-ii-a-powerful-yet-simple-search-script/

I hope you find it helpful.

[Editado a las 2017-01-10 16:00 GMT]
Collapse


 
Christopher Schröder
Christopher Schröder
United Kingdom
Member (2011)
Swedish to English
+ ...
Quotes Jan 10, 2017

I've tried it, it works, I've even made it use Google UK. Thanks!

But I cannot, for the life of me, work out how to put the search string in quotes, which is how I always search (exact match). Any ideas?


PS You've messed up the link to the blog in your post above


 
Juan Martín Fernández Rowda
Juan Martín Fernández Rowda  Identity Verified
United States
Local time: 06:56
English to Spanish
+ ...
TOPIC STARTER
You need to escape quotes... Jan 10, 2017

Chris, first of all, thanks, I didn't realize i missed the actual link!

To fix your issue, you need to escape quotes. Quotes are used to tell the content enclosed is text - if you want to include actual quotes, try duplicating them, using "" instead of ".

Juan

Chris Schröder wrote:

I've tried it, it works, I've even made it use Google UK. Thanks!

But I cannot, for the life of me, work out how to put the search string in quotes, which is how I always search (exact match). Any ideas?


PS You've messed up the link to the blog in your post above


 
Christopher Schröder
Christopher Schröder
United Kingdom
Member (2011)
Swedish to English
+ ...
Quotes Jan 10, 2017

Juan Martín Fernández Rowda wrote:

To fix your issue, you need to escape quotes. Quotes are used to tell the content enclosed is text - if you want to include actual quotes, try duplicating them, using "" instead of ".



What I mean is, if I highlight the phrase white cat, Google will search for pages containing the words white and cat separately. What I would like is for the hotkey to search for "white cat", i.e. insert quotes around the text on the clipboard, so that Google doesn't give me matches for pages about brown cats and white dogs, just white cats...

(White cats rule...)


 
Juan Martín Fernández Rowda
Juan Martín Fernández Rowda  Identity Verified
United States
Local time: 06:56
English to Spanish
+ ...
TOPIC STARTER
Quotes in searches Jan 10, 2017

Gotcha - I get it now. So, here's a tip for that, as different sites may handle searches differently.

When you search for white cat (no quotes) in Google, this is the resulting URL: https://www.google.com/#q=white%20cat
when you sea
... See more
Gotcha - I get it now. So, here's a tip for that, as different sites may handle searches differently.

When you search for white cat (no quotes) in Google, this is the resulting URL: https://www.google.com/#q=white%20cat
when you search for "white cat", you get: https://www.google.com/#q="white%20cat"

Since you can't have quotes in a URL, they get encoded as %22 (the same is the case with other characters, like &). You can find a list here: http://www.w3schools.com/tags/ref_urlencode.asp

So, you can concatenate the %22s with your Clipboard - probably something like Run, % "http://www.google.com/search?hl=en&q="" Clipboard "%22"

BTW, I used to have a white cat, so cute I made everybody believe it was a Turkish Angora

Chris Schröder wrote:

Juan Martín Fernández Rowda wrote:

To fix your issue, you need to escape quotes. Quotes are used to tell the content enclosed is text - if you want to include actual quotes, try duplicating them, using "" instead of ".



What I mean is, if I highlight the phrase white cat, Google will search for pages containing the words white and cat separately. What I would like is for the hotkey to search for "white cat", i.e. insert quotes around the text on the clipboard, so that Google doesn't give me matches for pages about brown cats and white dogs, just white cats...

(White cats rule...)
Collapse


 
Christopher Schröder
Christopher Schröder
United Kingdom
Member (2011)
Swedish to English
+ ...
Nailed it Jan 12, 2017

Juan Martín Fernández Rowda wrote:


So, you can concatenate the %22s with your Clipboard - probably something like Run, % "http://www.google.com/search?hl=en&q="" Clipboard "%22"



Slight modification required:

Run, % "http://www.google.co.uk/search?hl=en&q=" "%22" Clipboard "%22"

This works brilliantly and is making me very happy. Thanks!


 
Juan Martín Fernández Rowda
Juan Martín Fernández Rowda  Identity Verified
United States
Local time: 06:56
English to Spanish
+ ...
TOPIC STARTER
That Jan 12, 2017

My bad, I forgot to include the first %22, but I see you got the idea

Working on an autocomplete/spelling corrector script for post #3.

Cheers,
Juan

Chris S wrote:

Juan Martín Fernández Rowda wrote:


So, you can concatenate the %22s with your Clipboard - probably something like Run, % "http://www.google.com/search?hl=en&q="" Clipboard "%22"



Slight modification required:

Run, % "http://www.google.co.uk/search?hl=en&q=" "%22" Clipboard "%22"

This works brilliantly and is making me very happy. Thanks!


 


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


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

Getting Translators to Code II - A Powerful (yet simple) Search Script







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 »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »