Id be cautious. Even though pregnancy discrimination isnt legal, doesnt mean it doesnt happen. I know this first hand when I got pregnant the 1st time. They immediately fired me for no apparent reason at all after I told them. I thought the sooner I made them aware the better. This time around I was job searching and even when it seemed like they were going to hire me I tried to be honest and tell them upfront I was expecting. They wouldnt hire. So I stopped mentioning it and wore loose fitting clothing. Immediate hire. I still didnt tell my boss I was expecting and legally they cant ask. Ive been at this job about 3 months now and just told my boss with a dr's note a few days ago (30wks along). Thankfully this place has been much kinder to me and hasnt seemed to be put off by the fact im pregnant.
My advice to you is if your job is not putting you or baby at risk (ie not very physical or medical field) then i really wouldnt say anything until it got closer to time for maternity leave. I only told my job because my position I work is very physically demanding and its getting to the point I cannot do alot of things per my dr's advice. You know the people you work for better than we do. If they seem shady, id wait. If you trust them go ahead! Just make sure you have a dr's note stating your pregnancy amd whatever limitations you may have so there is a paper trail in case they try to pull a fast one like with what happened to me.
Im 16 weeks & i really dont plan on telling them until im around 24 weeks especially since im not showing at all. People at my job are really nosey & im not up for sharing my personal life w/ them.
I think the big thing is to just give them enough time to prepare for when you'll be gone. And to give yourself enough time to figure out what your goal is in regards to coming back after or not.
I told my job around 10 weeks. I was really scared to make the announcement since I'm young and don't have a relationship with the baby's father. But I felt so relieved after I did, everyone has been super supportive and really excited for me! It feels good for people to share your excitement. Plus they ask me if I want a stool to sit on or if I need an extra break lol it's nice