Improve JS translation helper.