From Wiktionary, the free dictionary
By the time the stable door was closed, these horses were already loose.
close the stable door after the horse has bolted (third-person singular simple present closes the stable door after the horse has bolted , present participle closing the stable door after the horse has bolted , simple past and past participle closed the stable door after the horse had bolted )
( idiomatic ) To attempt to prevent a problem that has already occurred ; to design and implement a preventive mechanism that is too late (after the first failure instead of before).
2019 May 15, Ian C. Lucas , “WhatsApp Data Breach”, in parliamentary debates (House of Commons)[1] , column 242 :We are now in an election period, with WhatsApp and closed Facebook groups being used, as we speak, in electoral campaigning, but the law has not changed since the DCMS Committee, on which I serve, raised these issues. We have yet another instance of shutting the door after the horse has bolted .
to attempt to prevent a problem that has already occurred
Chinese:
Mandarin: 亡羊補牢 / 亡羊补牢 (zh) ( wángyángbǔláo , literally “ to repair the pen after sheep is lost ” )
Czech: honit bycha
Dutch: als het kalf verdronken is, dempt men de put , achter de feiten aanlopen
Finnish: haukotella kissan suussa ( literally “ [it's too late for a mouse] to yawn when in a cat's mouth ” )
French: c'est de la moutarde après dîner (fr) ( literally “ it's mustard after dinner ” )
German: den Brunnen zudecken, wenn das Kind hineingefallen ist ( literally “ to cover the well after the child fell into it ” )
Greek: κατόπιν εορτής (el) ( katópin eortís , literally “ [we arrived] after the feast [was over] ” )
Hungarian: eső után köpönyeg (hu)
Italian: chiudere il recinto dopo che i buoi sono scappati ( literally “ to close the gate after the oxen have escaped ” ) , chiudere la stalla quando i buoi sono scappati , chiudere il cancello quando i buoi sono scappati
Korean: 소 잃고 외양간 고친다 (ko) ( so ilko oeyanggan gochinda , literally “ one fixes the barn after losing the cow ” )
Macedonian: по свадба тапани ( po svadba tapani )
Polish: mądry Polak po szkodzie (pl)
Russian: после пожара да за водой ( posle požara da za vodoj , literally “ fetching water after the fire ” ) , по́здно пить боржо́ми, когда́ по́чки отказа́ли ( pózdno pitʹ boržómi, kogdá póčki otkazáli )
Spanish: a buenas horas mangas verdes
Tagalog: aanhin pa ang damo kung patay na ang kabayo ( literally “ what good will be the grass if the horse is already dead? ” )
Thai: วัวหายล้อมคอก (th) ( wuua-hǎai-lɔ́ɔm-kɔ̂ɔk , literally “ to create a pen after the oxen have disappeared ” )
Turkish: at çalındıktan sonra ahırın kapısını kapamak (tr) ( literally “ to close the stable's door after the horse gets stolen ” )
Welsh: codi pais ar ôl piso ( literally “ to lift one's petticoat after pissing ” )