converted translation script to dart