Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
151 user(s) are online (143 user(s) are browsing Forums)

Members: 0
Guests: 151

more...

Support us!

Headlines

 
  Register To Post  

Contextual Menus for translate.google.com
Home away from home
Home away from home


See User information
@All
Can anybody help me with proper Contextual Menu entry which will translate me page via translate.google.com in the current tab ?

So far i have that:

CategoryPage
Label
translate
Action
rx "address ODYSSEY.1; OPEN NAME 'http://translate.google.com/translate?sl=auto&tl=en&u=' %u"


Problem with that one that once i had any "=" after translate part, then nothing works. Also i don't like that it's "odyssey.1" port, as i want it to works on all owb instances. Or maybe that can be done without Arexx ? And i want to avoid external scripts too if possible.

Thanks

Go to top
Re: Contextual Menus for translate.google.com
Just can't stay away
Just can't stay away


See User information
Seems prohlems if qith quotes on url, I couldn't make it wotk on a single line.

Just try this, but as a file.rexx (not sure if %u would be replaced by correct url):
/* */
ADDRESS ODYSSEY.1;
OPEN NAME '"'"http://translate.google.com/translate?sl=auto&tl=en&u="'%u"'

Go to top
Re: Contextual Menus for translate.google.com
Home away from home
Home away from home


See User information
@Javier
Want to make it without external script, with external script that all can be done easyly of course.

Also in your example its again "Odyssey.1" , which mean only one instance of odyssey will be ok with. Second running odyssey window will open stuff in older owb which is with Odyssey.1 port , that thing i also want to avoid somehow.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Contextual Menus for translate.google.com
Just can't stay away
Just can't stay away


See User information
about port name , use "%p", but dunnot if it can be done in one line as you want.

If there is an ARexx (non)script expert out there, please heeeelp!!!

Go to top
Re: Contextual Menus for translate.google.com
Home away from home
Home away from home


See User information
@Javier
Yeah, that one:

Quote:

rx "address %p; OPEN NAME 'https://translate.google.com'"


Make Odyssey port be used from the necesary owb instance, cool.

Now only to deal how to spend url to , and how to use "= & ? " things in the url, so all will works for that:


Quote:

'http://translate.google.com/translate?sl=auto&tl=en&u=' %u'".


That should be just something about " ' and stuff. On linux i easyly add backslash at begining of them, but do not remember how it all on amigaos. Maybe need double quotes few times ?

Go to top
Re: Contextual Menus for translate.google.com
Quite a regular
Quite a regular


See User information
@kas1e
Quote:
Can anybody help me with proper Contextual Menu entry which will translate me page via translate.google.com in the current tab ?


I don't remember why but this is what I use that works.

OPENURL "http://translate.google.com/translate ... ayout=2&eotf=1&u=%u" NOLAUNCH

Go to top
Re: Contextual Menus for translate.google.com
Just popping in
Just popping in


See User information
I've been using:
openurl "https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%u"


But AFAIK openurl is 3rd party for OS4 and OS4 comes with URLOpen by default, but maybe it'll work with that too?

Go to top
Re: Contextual Menus for translate.google.com
Home away from home
Home away from home


See User information
Still trying to make it via RX..

It seems that "rx" line do not like when there is "=" in the link. All the ? or & takes fine, but once there "=" things start bork.

I also tried to replace = on %3D, but that didn't help as well :(

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Contextual Menus for translate.google.com
Home away from home
Home away from home


See User information
@jPV

That way it work too:

urlopen "https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%u"


Through it open for me window with question in which browser do open stuff, and open it in new instance, not in the current window. Probably some option need to be send to as well.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Contextual Menus for translate.google.com
Supreme Council
Supreme Council


See User information
That's because you have multiple browsers set up for https, so the URL handler asks you which one you want to use. AFAIK there is no way to force urlopen to use a specific browser. You could, however, simply disable any others you have set up, just leave Odyssey enabled.

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: Contextual Menus for translate.google.com
Just popping in
Just popping in


See User information
Hi,

To open the translated page in a new tab, I'm using OWBLauncher2 from OS4Depot..

The menu entry look like this on my setup for french translation :
Appdir:OdysseyLauncher "https://translate.google.fr/translate?hl=fr&sl=auto&tl=fr&u=%u"


Regards,
Petrol.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project