change translate to use python2.7