A Translation-based Approach to Contingent Planning