Made minor changes to translate.py.