Why did she say "this time I will thank Hashem"?
Rashi: Now she had [four, which is] more than her proper share of sons. 1
Hadar Zekenim, Moshav Zekenim #1: She saw that Resha'im would descend from Reuven (Dasan and Aviram), Shimon (Zimri) and Levi (Korach). She did not see any Resha'im from Yehudah 2 , rather, he will admit about Tamar!
Da'as Zekenim, Moshav Zekenim #2: She saw [through prophecy] that Yehudah will be Modeh (admit) about Tamar, so she was Modeh (thanked) Hashem.
Bechor Shor (34,35): Leah gave two shares of honor to Hashem, and one to her husband. She named two sons based on praise of Hashem, and the third relates to her connection to Yakov. For the fourth, she returned to name based on praise of Hashem.
Tosfos ha'Shalem (3): Yehudah was greater than the previous sons. Kohanim and Leviyim come from Levi, and kings from Yehudah.
No one thanked Hashem before Leah" (Brachos 7b). (Did the Avos not thank Hashem?! Adam said "Tov Lehodos la'Shem"! Rather, her Hoda'ah was different. Everyone else felt that that they received finite gifts from Hashem's unlimited ability to give. Leah was the first to feel that Hashem has a limit to what He can give (there will be only 12 Shevatim), and He gave to her more than her proper share. - PF)
Moshav Zekenim: However, Achaz, Amon and other evil kings come from Yehudah!
Why does it say "she ceased to give birth"?
Bechor Shor: In each of the first four years, she had one child every year. The fifth year she did not give birth, in the sixth year was Yisachar, and in the seventh year were Zevulun and Dinah together.
Moshav Zekenim: This was a punishment for not thanking Hashem until now. 1
No one thanked Hashem before Leah (Brachos 7b). Why was only she punished? And why was she punished now, after she corrected her mistake?! However, we find that converts are punished for not converting earlier (Yevamos 48b)! (PF)
מה משמעות השם יהודה?