Wait until you have an offer.
It's better for all parties involved that decisions about whether to employ you are based purely on your suitability for the job, without pregnancy clouding the issue. By mentioning it earlier, you are almost saying it's relevant to their decision, and of course it shouldn't be.
It's impossible to ignore and if a potential employer knows about pregnancy before making a decision, one of several things might happen
-They would have offered you the job but discriminate against you and change their mind - obviously bad for you and legally stupid for them
-They wouldn't have offered you the job but feel they must because they are worried about you claiming discrimination
-They would have offered you the job and continue to do so because you are the best person
-They wouldn't have offered you the job and still don't, but you feel it was discriminatory and bring a claim/blame your pregnancy for your lack of success
There is only one of those which is a good outcome really. Many employers would say they prefer to know upfront, and would say this is because they want employees to be open with them.
That's all well and good, but if they are not going to take the pregnancy into account there is absolutely no reason for them to know up front, is there?!
The best way to avoid discrimination, paranoid bad decisions, accusations of discrimination and wondering whether pregnancy is to blame for decisions is to only tell employers things about you which are relevant to their decision, rather than burdening them with information they are not supposed to take into account.