In the discussion in the comments to this question about Aladdin, people talk about puns being lost in translation.
For example:
After that, in the end, a free Genie quickly gives the lamp to Aladdin, and presses him to wish for something “impossible” (making a joke with the homophones “the Nile” and “denial”), so Aladdin wishes for the Nile/denial and gets a “No way!” in response.
Some translations did catch on to the pun, and tried to incorporate it in some way or another, as translating puns is hard:
in Spanish that joke is lost in translation too, but they came up with a "close" one: Aladdin asks for the Nile ("deseo el Nilo") and Genie answers "Don't even dream about it" ("Ni lo sueñes").
Comment by @AlvaroMontoro
But some don't:
By the way, thanks for explaining the Nile part. The play on denial is lost in the German dub, so that part always felt extremely random to me. I'd even go so far and wager that the translators missed the joke in the first place
Comment by @hiergiltdiestfu
This makes me wonder. Do translators get a list of jokes from the scriptwriters, so they know that they should pay close attention on translating puns, or is it up to them to catch on to the puns, and find a way to translate it?