hi, i was in a similar situation to you with my last pregnancy. i started a 6 month temporary job on 1st February (couple of years ago), because i really wanted to work for this particular company, but the company was in the process of being taken over hence why they were only giving temporary contracts.
1 week later i found out that I was pregnant. obviously i felt awful, and guilty and dreaded telling them as i thought they would think bad of me. Anyway, i told them when i was about 8 weeks because i didnt like that feeling hanging over my head, i needed to get it out. they were really good with me.
i was told a few months later that the new company who had taken over was ending lots of temporary contracts, one of which was mine. It was due to end in August, my baby was due in early october. so they extended it by one month, and then coincided my contract ending with my maternity. I didnt qualify for maternity pay with them, as i believe you need to have been working for the company for 25 weeks by the time you are 29 weeks pregnant - i.e. you need to have been working there for a month before you conceive. But i did qualify for the maternity allowance from the government because i had been working.
they cannot get rid of you because you are pregnant, and they will know that. they will probably be very nice to you, theyve got to be so careful with pregnant ladies nowadays. they would be within their rights to end your contract after the 6 months if the other lady comes back, and as far as I am aware, if you go on maternity leave before the lady comes back, they can still end your contract whilst you are on leave.
you dont have to tell them until like 25 weeks or something, personally i think you would be much better being honest with them now, otherwise it will bother you for the next few months and it doesnt give them much notice. if you wanted to tell them, you could tell them youve been trying for 2 years, and then im sure they would be very happy for you.
congratulations on your pregnancy!