I agree, don't say anything till you've got 2 years. Legally they can't discriminate for gender/pregnancy at any stage in your service, but employers are often less brave (stupid) after 2 years.
Start building your file of evidence now - hopefully you'll never need it, but it might alleviate some stress if you know you're prepared if things go bad.
For your whole time with them, print out any performance appraisal documents you have. Or any emails complementing your work - from bosses, colleagues, clients etc. Then you'll be able to show that across the 2 years there were no performance issues, so if they try that angle it'll be linked to pregnancy, as their views will change at the same time as your announcement. Also take notes of any comments that might be discriminatory. Put down the comment, who said it, context, date, time & witnesses. Do it in detail from this point forward. Also think back and make as detailed notes as you can about previous convents. Make sure you've got your job description, and if your job has evolved while you've been there, any evidence about that - then if they try to change your job after announcing, you might have evidence that the change is linked.
Often collecting all this makes people feel in control, more confident and less vulnerable - so they're braver if their employer tries anything stupid. Then, if you need to refer to a stack of evidence during a difficult conversation, they'll see how prepared you are and may be less stupid. And absolute worst case, you'll be prepared for a tribunal claim. Though in reality if they are stupid about it, you'll use your evidence to negotiate an exit package as got won't want to go back anyway!
Know that you are protected and start building your evidence now, just in case.
Good luck.