Your employer must comply with the California Pregnancy Leave Law if you are a resident of CA and you do your work here in CA. If you are fired for taking lawfully-entitled pregnancy leave, your employer will be liable to you for all financial and emotional distress damages caused by its unlawful conduct, and you will have the right to seek your attorney fees from the employer, and possibly assert punitive damages against it as well.
If you face any kind of unlawful conduct, from harassment because you will need leave, to retaliation for taking the leave, you should locate and consult with an experienced employment law attorney as soon as possible to explore your facts and determine your options. I would suggest you look either on this site in the Find a Lawyer section, or go to www.cela.org, the home page for the California Employment Lawyers Association, an organization whose members are dedicated to the representation of employees against their employers.
Good luck to you.
This answer should not be construed to create any attorney-client relationship. Such a relationship can be formed only through the mutual execution of an attorney-client agreement. The answer given is based on the extremely limited facts provided and the proper course of action might change significantly with the introduction of other facts. All who read this answer should not rely on the answer to govern their conduct. Please seek the advice of competent counsel after disclosing all facts to that attorney. This answer is intended for California residents only. The answering party is only licensed to practice in the State of California.
If you are primarily employeed in CA, your employer must abide by CA labor laws. It is unlawful to discriminate against or retaliate against an employee because of her pregnancy or taking pregnancy related leave.
If employed in CA and the employer operates in CA, the employer has to abide by CA law. You can always get fired for taking materity leave, but if so, you would have a pretty strong case against your employer for retaliation and discrimination under both CA and federal law (as long as there are 15 or more employees). As for the calculation of maternity time, that should be listed online by the state and federal administrative agencies such as the EDD and US DOL.
If you are threatened with termination or terminated for anticipating taking the maternity leave, you will obviously want to consult with an attorney. You may wish to review your employment agreement/handbook if any. That may cover some important dispute resolution facts. While no agreement can preclude you from exercising your rights under California Fair Employment & Housing (FEHA), you may be limited in terms of where you could bring a civil lawsuit.
This answer is not a substitute for legal advice and it does not create an attorney-client relationship. Seek the advice of a licensed attorney before taking any action that may affect your rights