An employee was replacing a hydraulic cylinder on a mini-excavator. The employee was positioning the machine while it was in a trailer when their right leg became pinned between a track and the trailer, resulting in severe lacerations to the lower leg.