How to translate 举杯邀明月，对影成三人? Specifically, I'm trying to translate a paragraph of 琅琊榜, and I find poetry particularly difficult as it has imagery, metaphor, and meaning.

云氏庭院的花前柳下，依然是举杯邀明月，对影成三人。

Within context, this describes the state of a beautiful woman, nearing thirty and still single. You can say, "Yun Piaoliao still remained single". 

If you go by imagery, it's something like: 

"In the Yun family garden, she was still raising a glass to the moon and inviting her shadow to become a party of three."

If you go by reference, the phrase quotes 《月下独酌》 by 李白, which is basically an ode to loneliness. 

How would you translate it without losing the poetry, metaphor, and meaning?
邀明月 means "invite the bright moon" 

李白 felt lonely drinking by himself, so he invited the moon to drink with him (the moon was not a person, but there was no one else, so let's count it as one.) 

对影 means "facing (his own) shadow" 

Well, in his drunken state, his own shadow looked like another man raising a cup with him. 

成三人 ( The moon, I myself, and my shadow became three people)

"Let all three of us, the moon, I myself, and my shadow drink together!"


  举杯邀明月，对影成三人


"I raise my cup and invite the moon to drink with me. Along with my shadow, we become three drinking friends "  (describing how alone he felt that he had to drink with imaginary friends)


  Within context, this describes the state of a beautiful woman, nearing thirty and still single. You can say, "Yun Piaoliao still remained single". 


The narrative was comparing her situation to the one of 李白 when he wrote that poem - " utterly alone with no companion" 


  云氏庭院的花前柳下，依然是举杯邀明月，对影成三人。


"In the Yun family courtyard, in front the flowers and under the willow tree, she was still alone,  just like in the poem: "Raise the cup and invite the moon, along with my shadow, it makes a party of three."