On the nonlinear transformation of breaking and non-breaking waves induced by a weakly submerged shelf