Why is the work done by friction zero during translational motion but nonzero when the body is rolling on an inclined plane?
During pure rolling, at any instant of time, the point of contact between the roller and the ground will act as an instantaneous centre(the entire roller appears to rotate about that point at that instant).There is no sliding between the roller and the ground against friction.So the work done by friction is zero during pure rolling.But during sliding, work done by friction is not zero.
The work done by friction is zero in both cases. This is easiest to see in the formula for power: $$P=F\cdot v$$
Friction acts at the point of contact where the velocity of both the body and the ground is zero, so P is always zero, so no work is done by friction.
On the other hand, gravity acts at the center of mass where the velocity is nonzero. So P can be nonzero as long as there is a component of velocity in the same direction as gravity. This occurs on an incline but not on level ground.