Simplify the logic of translate_assert