Why did Leah call her daughter 'Dinah'?
Rashi and Targum Yonasan: She 'issued judgment' on herself - If it would turn out to be a boy, it would mean that her sister Rachel would only be able to have one boy, less than the two maidservants. She therefore took pity on her 1 and prayed that it be a girl, and Hashem responded by turning the fetus into a girl. 2
Rav C.P. Sheinberg: Even though Rachel did an awesome Chesed for Leah, she also sinned against her - you took my husband (30:15)! Only now that Leah prayed that Rachel have two sons, she totally forgave her, and Rachel was able to have children.
According to Targum Yonasan, she was pregnant with a boy (and Rachel with a girl), and Hashem performed a miracle and switched them.
Why does the Torah not record the reason for Dinah's name?
Rashbam: The reason for the mention of names is connected with thanksgiving, and one does not thank Hashem for a girl like one does for a boy. 1
The Torah nevertheless mentions her name to teach us that Dinah was Yaakov's only daughter. Similarly, it records the name of Asher's daughter, Serach, to teach us that of all the seventy souls that went down to Egypt, the only two granddaughters (of Yaakov) were Yocheved and Serach.
Why didn't the Torah mention that she became pregnant?
Da'as Zekenim, Hadar Zekenim: She was pregnant with Yosef (Ha'amek Davar - a male), and Hashem switched him to Dinah. It was not a daughter until the time of birth. 1
Tosfos ha'Shalem (3) and Maharsha (to Nidah 31a), both citing Pane'ach Raza: The primary pregnancy of Dinah was in Rachel's womb, and Hashem switched them.
Tosfos ha'Shalem (7): They thought that she was pregnant with a son. At the birth they realized that it is a daughter.
Bechor Shor: She was a twin with Zevulun.
Tosfos ha'Shalem (1, citing R. Efrayim): We read "v'Acher Yaldah" - she gave birth to something other than what she was pregnant with.
QUESTIONS ON RASHI
Rashi writes: "Leah pronounced judgment on herself, [saying that] if this [fetus] will be a male... She prayed, and it was turned into a female." Why did she rely on such a miracle occurring? She should have prayed prior to conceiving!
Gur Aryeh: Leah was worthy of bearing another male. Had she prayed to only conceive females, she would not have conceived at all! She waited until she conceived, and then her prayer was effective, in her own and Rachel's merit together. The developing baby could only turn into a female.