This blog has previously discussed the somewhat unsatisfying reveal of Leia being Luke's sister, and how it doesn't really fit well with the rest of the series. The cynical theory, of course, is just that while filming Episode 5 they didn't want to be wholly reliant on Mark Hamil coming back for Episode 6, so they left a loophole for them to introduce a new character. This is probably true, but art should be understood on it's own merits of what it actually says, and not just second-guessing the director and crew.
So what is actually said? Well I went back and watched the relevant scenes, and they are pretty interesting.
Empire Strikes Back:
BEN: That boy is our last hope.
YODA:(looks up) No. There is another.
Return of the Jedi:
YODA: Luke, the Force runs strong in your family. Pass on what you have learned, Luke...
(with great effort)
And then later, Obi-Wan gives the ghostly exposition dump to Luke, about Leia and stuff.
Yoda, in his dying moments, Yoda I trust. But Obi-Wan? Obi-Wan lies. Not just in general, but especially in matters related to Luke's family. This, remember, is the same conversation where Luke is all "hey why did you lie to me about my dad that kind of sucked" and Obi-Wan is all "Well, it's true from a certain point of view." Obi-Wan clearly has still not personally dealt with Anakin's betrayal.
Since when does anyone refer to Leia as a Skywalker? She's always identified as Leia Organa, and takes way more after her adopted home than anything to do with her patronym.
Huh. So what did Yoda actually say?
"There is another [hope.]"
"There is another Skywalker."
And of course these things are both true.
Luke goes to confront the Dark Side, and fails. He throws down his sword and gets electrocuted by the Devil incarnate.
And Anakin Skywalker steps up and frees the galaxy from tyranny. There is another.
Yoda knew. He knew that the son of suns was still out there, and even though he had betrayed the Jedi Order, he still represented at least some hope of bringing balance to the Force. He knew that Luke needed to pass on what he had learned to Darth Vader. He may not have known what entirely would be needed, but these lines still represent allusions to what actually ended up happening rather than "awkwardly creating a loophole then covering it up."