"After I broke my right leg, I needed an operation."
Translation:Post kiam mia dekstra kruro rompiĝis, mi bezonis operacion.
Because "post" is a preposition and not (also) a conjunction, unlike the English word "after" which is both.
So you can say "post la milito" for "after the war" ("post" here is a preposition, standing before a noun), but you can't say "post la milito ĉesis" for "after the war ended, since you have a clause here "la milito ĉesis".
There, you need a conjunction, and the appropriate conjunction is "post kiam".
You could also consider it short for "post la tempo, kiam (la milito ĉesis)" if you want -- "post" as a preposition before the noun "la tempo", with an explicit conjunction "kiam".
(Compare English "because", which is a conjunction but not a preposition -- you can say "because the war ended" but you cannot say, in standard English, "because the war" -- that has to be "because of the war", adding an extra word similarly to how you add an extra word to "post" in order to use it in a different grammatical context.)
The opposite of "post" is similar; it's also a preposition ("antaŭ la milito") but needs an extra word to be used as a conjunction -- which here is "ol": "antaŭ ol ma milito ĉesis" (before the war ended).
Why "post kiam" but "antaŭ ol"? That's just the way it is. (PIV says that you could also use "post ol", but that this method is hardly ever used.)
To make sure I understand:
You need two past tenses here because both clauses are independent, correct?
If one clause were subordinate, like "I needed an operation because I broke my leg", (in my understanding) Esperanto would use one past tense and one present tense: Mi bezonis operacion, cxar mia kruro rompigxas".
This sentence is driving me absolutely freneza! I was taught years ago by the "Teach Yourself Esperanto" book that the use of "post kiam" was either frowned upon, rare, or somehow inelegant. Rather, I was taught to use a participle. Examples:
Tion dirinta, li tuj bedaŭris. -- After he said that, he was immediately sorry. (That having been said...) Rigardinte la statuon, tiu diris al la skulptisto... -- After he looked at the statue (Having looked at the statue...)
However, I can't get DuoLingo to accept the following:
La dekstra gambo rompiĝinta, mi bezonis operacion.
The problem with your sentence is that you don’t have the same subject (mi, the one who needs the operation didn’t do any breaking in your sentence) for the two parts of the sentence
A correct sentence in line what your book so nicely taught you would be: Rompinte mian dekstran kruron, mi bezonis operacion.
I don’t easily find a good solution with the same meaning as the English sentence (as this is an translation exercise) with the intransitive rompiĝi without using post kiam. In a free translation this would work fine, though: Pro mia rompiĝinta dekstra kruro, mi bezonis operacion.
Another way to express this correctly would be: Post rompiĝo de mia deksta kruro ....
If Duolingo doesn’t accept the first version (Rompinte ...) it certainly should be instructed to accept it.