Nucleation theory for diffuse interfaces