add guard condition to custom translation