Fix SyntaxError when translating text with special chars on Py3