The chemistry of galaxies. I - The nature of giant extragalactic H II regions