Fixed translation sync issue

When the source of the translation includes unicode characters syncing terms fails because unable to sort _to_translate list (line 371 of translate.py). This pull request address this issue by encoding translation source since it is not necessarily in ascii.