Text this: Reversible to irreversible transitions for ac driven skyrmions on periodic substrates