亡羊补牢
wáng yáng bǔ láo
Literally: “lose sheep, mend pen”
To fix a problem after a loss so it doesn't happen again; it's not too late to act.
English has a similar saying: better late than never
The story
In the state of Chu, the minister Zhuang Xin warned King Xiang that he spent all his time having fun with his favorite courtiers instead of ruling. The king would not listen, so Zhuang Xin left for the state of Zhao. Soon Qin attacked, took much of Chu's land and forced the king to flee. The king sent for Zhuang Xin and asked what to do. Zhuang Xin answered with an old saying: “If you lose a sheep and then mend the pen, it is still not too late.” Fixing a problem after a loss can still prevent worse ones.
Source: Zhan Guo Ce (Strategies of the Warring States)
How to use 亡羊补牢
Encourages fixing a mistake after a loss. Often in the full form 亡羊补牢,为时未晚. Unlike English “closing the barn door after the horse is gone”, it sounds hopeful.
Example sentences
这次考试没考好,亡羊补牢,现在开始复习还来得及。
Zhè cì kǎo shì méi kǎo hǎo, wáng yáng bǔ láo, xiàn zài kāi shǐ fù xí hái lái de jí.
I didn't do well on this exam, but it's not too late — if I start reviewing now, I can still catch up.
电脑坏过一次以后,他亡羊补牢,每周都备份文件。
Diàn nǎo huài guò yī cì yǐ hòu, tā wáng yáng bǔ láo, měi zhōu dōu bèi fèn wén jiàn.
After his computer crashed once, he learned his lesson and now backs up his files every week.