I designed and 3d printed a universal repair buckle for broken strap buckles on bags or backpacks.
Most buckles have the female part of the buckle sewn in tightly, but the male part of the buckle breaks. Due to the different dimensions, it is usually not possible to replace the broken male buckle because of the incompatibility with the remaining female buckle.

In my buckle, either the male or female part is present as a screwed bar. So any type of bag can be repaired completely flexible.