英语misfortune turns to blessing (idiom); to turn an inauspicious start to good account
法语transformer le malheur surv