Live data from Hacker News

WorldChat.io: Chat with realtime translation

worldchat.io

11–20 of 31 posts

Re: WorldChat.io: Chat with realtime translation

#12

I choose the "German" flag. Does it mean that I should type in German or others ' messages are translated to German? It's not at all clear from the wording: "Choose your username and language to start chatting with the world"... What if I want to type in English but read others' messages in German?

Both? It probably means that you write in German and other messages are translated to your language (German). That's the only thing that would make sense.

This is correct. Basically whatever flag you choose is what determines the "From" translation language on your outgoing messages and the "To" language for incoming.

Re: WorldChat.io: Chat with realtime translation

#14

I choose the "German" flag. Does it mean that I should type in German or others ' messages are translated to German? It's not at all clear from the wording: "Choose your username and language to start chatting with the world"... What if I want to type in English but read others' messages in German?

Sorry to confuse you, the UX is kinda wonky. Whatever flag you choose is what determines your language for both outgoing and incoming messages. So if you choose German, that is what will determine the "From" language to translate on your outgoing messages and the "To" language for incoming.

Re: WorldChat.io: Chat with realtime translation

#15

Earlier quoted context omitted.

JavaScript in the body of the message box executes 0.o very cool none-the-less.

Only for you, it gets filtered before going over the wire. Have fun :)

Should still be sanitizing user input, there's no reason to be passing the message as an html variable in handlebars {{{message}}} :/

You trust your server-side sanitization that much?

Re: WorldChat.io: Chat with realtime translation

#16

{{{message}}} in handlebars means that if someone one gets around your server-side sanitization your client side is wide open to XSS ... also, rate limit the users, this is thing is managing to crash chrome!

Working on it, any tips to keep entity encoding in handlebars without the triple stash?

Re: WorldChat.io: Chat with realtime translation

#18

{{{message}}} in handlebars means that if someone one gets around your server-side sanitization your client side is wide open to XSS ... also, rate limit the users, this is thing is managing to crash chrome!

Working on it, any tips to keep entity encoding in handlebars without the triple stash?

Don't encode entities on the server side if you are using handlebars, it will do that for you (that's the point of using {{}} it will make all user input "safe").

Re: WorldChat.io: Chat with realtime translation

#19

Earlier quoted context omitted.

Only for you, it gets filtered before going over the wire. Have fun :)

Should still be sanitizing user input, there's no reason to be passing the message as an html variable in handlebars {{{message}}} :/ You trust your server-side sanitization that much?

Do you trust the client side at all?

Re: WorldChat.io: Chat with realtime translation

#20
I built a proof of concept for something like this for someone quite a while ago... what he had that you desperately need is channels. This is entirely useless with any amount of people (particularly when spammers can't be controlled, which is just how the net is). Excellent idea, but it needs some concept of segmentation to be useful.
Post reply on HN