Localization on three-dimensional manifolds