[UPDATE #3]
Hey LibreOffice Folk,
Since I rate his Translator’s Tools extension for Writer so highly, I’ve chosen to put my money where my mouth is, and donated $10 to this wonderful extension’s developer Sergei Medvedev, via the project’s Donate link at SourceForge.
I’ve also emailed Sergei to ask if he could please make me a custom recompilation of the extension installer binary file, incorporating the ‘Search with Ecosia/OneLook/Google UK’ customisations mentioned in UPDATEs #1 + #2 below – as illustrated in this before-&-after maquette:
Here’s hoping that, before too long, I’ll not only be continuing to enjoy the delicious cake of Translator’s Tools websearch functionality, but also the icing on the cake of custom websearch menu items.
Warm regards,
Tim
PS: I’m also deriving wry entertainment from the way my karma score and badge count hereabouts keep on rising as a result of this thread’s expansion and popularity. I guess this is one example of the way in which the gamer culture staples of (1) an ever-rising score and (2) striving to attain achievement awards is coming to cross-fertilise net-mediated social discourse – and I for one really rather like it. { sappy grin }
[UPDATE #2]
Hi Miguel, and apologies for my previously assuming your name was Mario.
I like trying to be the change I want to see in the world, so paying forward a Very Useful Improvement in a way that may assist other folk seeking just such an improvement is my pleasure – and thank you for your appreciation.
Following your welcome suggestion, I’ve taken a look a the Translator’s Tools source code. I’ve identified the source of the four changes that I’d like to make, and prepared modified versions of the appropriate files:
- file: addon.xcu – modded to include menu item titles ‘Search with Ecosia’, ‘Search with OneLook’, and ‘Search with Google UK’
- subdirectory: icons, file: lookupdict1.png – modded to Ecosia favicon, 16 × 16 px
- subdirectory: icons, file: lookupdict2.png – modded to OneLook favicon, 16 × 16 px
- subdirectory: icons, file: lookupdict3.png – modded to Google UK favicon, 16 × 16 px
I’ve uploaded these four files to a DropBox called TranslatorsToolsMods, from where they can be accessed online:
» Dropbox - TranslatorsToolsMods - Simplify your life
However, having taken a look at the Extensions Development wiki page (» Extensions development - Apache OpenOffice Wiki ), it looks like I might be facing several hours of climbing a steep learning curve to understand how to incorporate these and the other Translator’s Tools source files into a recompiled translatortools_1.02_eog.oxt extension installer binary file (which seems rather disproportionate to me).
So I’ll be asking Translator’s Tools maintainer Sergei Medvedev if he could please do this modified recompilation for me; and if yourself or any other readers have sufficient OOo/LibreOffice extension development skills that such a modified recompilation would be an easy favour which you could offer me, I’d be most grateful for such assistance.
Warm regards,
Tim
[UPDATE #1]
Hi Mario,
Thank you very much indeed for your suggestion of the…
• Translator’s Tools extension
» http://extensions.services.openoffice.org/en/project/translators-tools
…which – with a little tweaking – has led to not only the addition of my desired ‘Search with Google’ functionality, but also to adding ‘Search with Ecosia’, ‘Search with OneLook’, AND ‘Google Translate’ functionality too: RESULT! In order to help other LibreOffice Writer users, such as Greektranslation, get similar results, here’s my brief guide to said tweaking.
The Translator’s Tools extension adds a new menu of the same name to the LibreOffice menu bar:
The new Translator’s Tools menu
A click on ‘Settings’ opens translators-tools-ini.txt for writing in Writer. Since it’s designed to be human readable, it’s fairly easy to see that it defines which are the ‘Dict 1’, ‘Dict 2’, and ‘Dict 3’ of the new Translator’s Tools menu; in fact it contains 10 dictionary settings, including ‘Google define:’ as #7. So I discovered the appropriate search URLs for green search engine Ecosia, dictionary metasearch engine OneLook, and Google UK, then tweaked the top three Dict definitions as follows:
[Section 1. Online Dictionaries]
[Section 1.1 Dictionary 1]
OnlineDictionary01=https://www.ecosia.org/search?q=
SearchForWholeSentences1=False
UseQuotationMarks1=False
[Section 1.2 Dictionary 2]
OnlineDictionary02=http://www.onelook.com/?w=
SearchForWholeSentences2=False
UseQuotationMarks2=False
[Section 1.3 Dictionary 3]
OnlineDictionary03=http://www.google.co.uk/search?q=
SearchForWholeSentences3=False
UseQuotationMarks3=False
After saving the tweaked translators-tools-ini.txt file and restarting Writer, I can now select a word or phrase in a Writer document and use the selected text as search query term at Ecosia, OneLook, Google UK, and Google Translate – which is even better than I asked for!
The icing on the cake would be discovering how to modify my new Translator’s Tools menu:
- to change ‘Lookup Dict 1’ to ‘Search with Ecosia’
- to change ‘Lookup Dict 2’ to ‘Search with OneLook’
- to change ‘Lookup Dict 3’ to ‘Search with Google UK’
- to include the favicon images of Ecosia, OneLook, and Google UK
But the usual route of Tools menu > Customise… > Menus tab > ‘Menu’ pull-down menu doesn’t show my new Translator’s Tools menu. Can anybody please give me a pointer as to how to make these changes? (BTW, I’ll be asking this of the coder of Translator’s Tools, Sergei Medvedev, too.)
Many thanks,
Tim
[PREVIOUSLY…]
I now see I’m not the first person hereabouts to be after adding such a ‘Search with Google’ functionality to LibreOffice Writer:
“Select current word in Writer and lookup in Google
I want to have a macro so that when the cursor is in a word, it will
select the word and look it up in
Google (using system default browser).
When a word or phrase is already
selected, then it will look up in
Google straight away after trimming
whitespace before and after. The macro
should work with any language script,
not just Latin characters.”
~ Greektranslation, asked 02 Oct
2013 »
Select current word in Writer and lookup in Google
Here’s hoping that the Ask.LibreOffice.org community have become more helpful over the last year, since I note that Greektranslation’s question has remained unanswered.