JS traslate refactor (WIP, do not merge)