Jump to content




Terminal Glasses Translate (OpenPeripherals, MoarPeripherals)


  • You cannot reply to this topic
13 replies to this topic

#1 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 15 July 2014 - 12:55 PM

A friend of mine (American) started playing on a server with a couple of his Canadian buddies, unfortunately the majority of the chat is in French and he feels a little left out at times

To remedy this I made him this code which uses OP and MP to automatically translate (using viluon's PHP script here) any French chat and display it on his terminal glasses. It also allows him to type in English and have the Chatbox say it in French.

The Code

Do NOT use in SMP for now - the translate script will get blocked by Google, will update when this is fixed.

Spoiler

The Pastebin
http://pastebin.com/DdYiCudC

The P.S.
I know I could have used the Chatbox's tell() method which would have freed up a headslot and given my current failure to do text-wrapping would probably have looked better, but he wanted a HUD

Edited by hilburn, 22 July 2014 - 10:21 PM.


#2 viluon

  • Members
  • 183 posts
  • LocationCzech Republic

Posted 15 July 2014 - 12:57 PM

Proud to see somebody's using it :)

Edit: though you apparently forgot about

You can use this if:
You will PM me first and ask for detailed information
You will only use the script inside CC
You will only provide the product using my script for free
You will give me the credit for this script visible inside both the program (eg sth like about tab) and the source code

[Why should I PM you?]
As @ApeManZilla mentioned, the utility may stop working if Google realizes its a bot. If you plan to bombard the script with server chat, ask me first so I can get ready for it (you know, some Ajax request header magic and we're good to go).

Edited by viluon, 15 July 2014 - 01:13 PM.


#3 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 15 July 2014 - 01:02 PM

Whoa, scary quick response, are you like Beetlejuice? Does mentioning your name summon you? :P

Seriously though, he thanks you muchly for that script and I thank you for enabling a fun little project

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 15 July 2014 - 01:43 PM

this is quite a novel idea! :) I quite like the use of my ChatBox ;) I'm glad to see people starting to use my mod :)

To extend on your P.S. using the tell would also mass spam his chat.

#5 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 15 July 2014 - 01:55 PM

The server I play on doesn't have MoarPeripherals, I installed it for single player to test this code for him while I was writing it. Now my server admin is getting annoyed at me constantly bugging him to add it in ;)

View Postviluon, on 15 July 2014 - 12:57 PM, said:

Proud to see somebody's using it :)

Edit: though you apparently forgot about

You can use this if:
You will PM me first and ask for detailed information
You will only use the script inside CC
You will only provide the product using my script for free
You will give me the credit for this script visible inside both the program (eg sth like about tab) and the source code

[Why should I PM you?]
As @ApeManZilla mentioned, the utility may stop working if Google realizes its a bot. If you plan to bombard the script with server chat, ask me first so I can get ready for it (you know, some Ajax request header magic and we're good to go).

Very sorry, I derped. He's agreed to stop using it until we get things sorted out. Changed the Pastebin and code in the spoiler to give you credit

Edited by hilburn, 15 July 2014 - 03:11 PM.


#6 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 15 July 2014 - 11:24 PM

Wow.

This is genius! Well done to you.

#7 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 16 July 2014 - 04:59 AM

Coming from you that is high praise :)

#8 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 20 July 2014 - 06:07 PM

Can it do any language? It sounds awesome!
You might want to simply have the chatbox say it to him, though.
I feel like joining a different-language server with these 2 peripherals just so I can try it out.

Edited by Geforce Fan, 20 July 2014 - 06:12 PM.


#9 hilburn

  • Members
  • 153 posts
  • LocationLondon, England

Posted 20 July 2014 - 11:12 PM

Anything that google translate can pick up as "XX" language can be translated into english, and you can translate into any langauge and text prefaced with ## (the chatbox command precursor) so long as you change the "fr" in the code to whatever other code is used by google for the language in question.

The reason I didn't get it to send it to the player's chat is that it would result in a LOT of text going through there and you could lose track of the conversation quite quickly, plus this way was more fun. However if you feel it would work better a different way then feel free to modify it however you like.

The only thing I would ask is that as pointed out above I actually screwed up posting it, viluon is currently working on a fix for his google translate mirror which will (hopefully) let it work when bombarded with server chat, until he gives the goahead please don't implement this in a SMP server as it could get it blocked by google

#10 Cookiezi

  • Members
  • 9 posts

Posted 21 July 2014 - 06:15 PM

This is a nice tool, I'm Japanese so my English isn't so good.
Could I use this except with Japanese and English?

#11 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 22 July 2014 - 05:20 PM

It's a great program, just a little bug I found. If you continuously use it in SMP, you can get the server blocked by google.

#12 secret6timb1

  • Members
  • 78 posts

Posted 30 July 2014 - 07:59 PM

Can someone help me? What is OP and MP? I googled it and nothing

#13 LeonTheMisfit

  • Members
  • 30 posts

Posted 30 July 2014 - 08:22 PM

View Postsecret6timb1, on 30 July 2014 - 07:59 PM, said:

Can someone help me? What is OP and MP? I googled it and nothing

OP = OpenPeripheral
MP = MoarPeripherals

#14 secret6timb1

  • Members
  • 78 posts

Posted 30 July 2014 - 09:30 PM

(Had two windows open and accidentally posted to this forum again)

Edited by secret6timb1, 30 July 2014 - 10:38 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users