Fix #7175 - refine translation code