Yoda knows that Leia is in danger and tells Luke to complete his training and sacrifice her if necessary
Here’s the thing, though. Yoda doesn’t actually know if Leia’s in danger. The future is always in motion, and Luke’s vision of her and Han in danger could have easily been nothing more than a hypothetical vision of a possible future.
But yes, they definitely didn’t plan in any concrete way for Leia to be the other. Maybe it was an option they were considering at that point, but George hadn’t decided yet. I heard a rumor once that they were considering having Wedge turn out to be the other, but that always seemed like a stretch.
Leia being Luke sister was definitely a Retcon
it wasnt planned as Vader being Luke real father Luke Real Sister was going to play an important role in the Lucas first version of the Sequels Lucas envisioned Star Wars as a series of 9 or 12 movies.Absolutely. Poor Nellith. We never got to know her.
You are correct in the OP, it is another retcon that causes issues in Leia becoming “the other” after the fact.
Luke says “they were in pain”, when Yoda explains he is seeing the future and Luke then asks “Will they die?”, Yoda answers with “Difficult to see” and so they were in a very real sense of immediate danger.
The retcon also clumsily fails to account for Yoda saying “there is another” privately to Ben, or Ben saying “that boy is our last hope”, since Ben is supposed to know about Leia.
It’s still pretty amazing how lucky George Lucas got with all these retcons, since there was always existing footage that serendipitously supported the retcon. Like with the Leia as sister retcon, they had the scene at the end of ESB where Luke is hanging underneath Cloud City, and calls out to her with the Force. And with the Vader as father retcon, they had the scene in ANH where Owen says “That’s what I’m afraid of” after Beru says Luke is too much like his father.
This stuff doubtlessly helped Lucas get away with claiming he had it all planned out since 1977. And plain old confirmation bias encourages the audience to ignore instances where the retcon fails, but remember instances where the retcon serendipitously seems to have been the plan all along.