Complete naive implementation of CodeWriter#translate.