[translate] Add testcase for unicode input
[translate] minor code style fixes

nitpicking all around (aka PEP8)