Here is an excerpt from Kovetz Minhagim, An Anthology of Chabad Lubavitch customs regarding
pregnancy,
childbirth,
circumcision,
redemption of the firstborn,
and the birth of girl:
It is the custom of chassidim who are careful to
conduct their lifestyles according to the practices of old that
they conceal their wives' pregnancies until they have entered
the fifth month. Undoubtedly, this practice has an inner
foundation. Of course, the precaution is about publicizing
the pregnancy.
It does not apply to divulging it to very close
relatives without broadcasting it.
See there for sources in the footnote. Of interest is footnote 3, which quotes a letter of the Previous Lubavitcher Rebbe:
"The accepted
practice is that until three months of pregnancy it is concealed even
from very close relatives..."