C'est dans le malheur qu'on reconnaît ses amis.

English Translation

Everybody loves a winner.

The French says: “It is during unhappiness that we know our friends.”
The English says: Something completely different.

The French and the English do not mean the same thing. (The notion that success is popular is not the same as the notion that true friends stick with you in adversity.) Their meanings overlap but are not equivalent.

Clozemaster, please do better with your English translations. They are sometimes, as in this instance, loose to the point of counterproductive. I am presently using the app for accent practice. I would never in a million years use it to learn vocabulary or phraseology because so much of the English translation here is garbage. That seems like a wasted opportunity on your side. Thank you!