Los mineros del rio Kern han ceasdao de trabajar y se han encerrado en sus cabañas para defenderse a todo trance.
The miners of Kern River have ceased working and have shut themselves in their cabins in order to defend themselves ... a todo trance.
What does "a todo trance" mean? Is this a form of trancar, to bar'
I would say here: at all cost
It is a set phrase in Spanish. It means "with absolute determination", "no matter what the consequences are".
"Trance" means "a difficult time", and in extreme situations, "dying moments" (also a mental condition, like "trance" in English).
It comes from Latin "trans-ire" (over/accross go), related to the idea of going "to the other side".
No "trancar" or "bar" here at all.