Percolation, localization, and superconductivity