Qióngzédúshànqíshēn, dázéjiānjìtiānxià, zhè shì gǔrén de chǔshì zhī dào.
In adversity perfect yourself; in success benefit the world - this was the ancient way.
Tips
history
From 《孟子·尽心上》: 穷则独善其身,达则兼善天下. Mencius held that when scholars succeed they should benefit the world, and when frustrated they should cultivate their own virtue. This is the core of the Confucian view of advancing and withdrawing.
usage
Usually paired with the following line 达则兼济天下 to express an adaptable attitude toward success and setback. Here 穷 means 'frustrated, in straitened circumstances', not 'financially poor'.