News:

Come Chat with us live! Learn how HERE!

Main Menu

building in translator

Started by Patriotpie, February 21, 2010, 11:50:28 PM

Patriotpie

I play with a lot of spanish people and my spanish is kind of rough, but I would like to be able to know what they are saying.
I've been using Google's translator thus far. So, I wanted to build Google Translate into Trem. I found this translator:

http://translate.reference.com/translate?query=[%s]&src=es&dst=en&v=1.0

I opted for this translator because it is easy to form a URL, and the resulting page is parseable - unlike with Google Translate, the source of the page changes to reflect the translated text. So, it's easy to form a URL on-the-fly, and the resulting page source is (relatively) easy to parse. Now that I have a program to work with, I need to put this code into the tremulous console. Ideally, it would be a command like

\translate text+to+be+translated

The page would be called, source would be parsed, and text would returned to console. (hopefully)



tl;dr: how do i put a program i made into the console

Demolution

It needs to be a part of the client itself, meaning you have to compile your own, after you code the function as a part of it. Or you could probably get it working from a qvm somehow, but it doesn't seem very likely.

Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
Quote from: swamp-cecil on October 05, 2010, 09:04:04 PM
my brain > your brain.
and i am VERY stupid.

David

I don't think QVM's have access to curl and whatnot, and you wouldn't be able to play on pure servers anyway.

The client already has curl in there, but probably not easy.  And it'll probably hitch while waiting for a response.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

MitSugna

Quote from: David on February 23, 2010, 10:48:58 AM
I don't think QVM's have access to curl and whatnot, and you wouldn't be able to play on pure servers anyway.

The client already has curl in there, but probably not easy.  And it'll probably hitch while waiting for a response.
qvm has access to whatever you allow. curl can work without blocking other things