Complex sentence: Then, Japan stayed ahead as the world's largest producer of PV electricity until 2004, when its capacity amounted to 1,132 megawatts.
Split into simpler sentences: Then, Japan stayed ahead as the world's largest producer of PV electricity. Japan remained world leader until 2004, when its PV capacity amounted to 1,132 megawatts.