separate translateBuiltin function