With the factory installed transfer switch, there'll be 4 wires in a junction box in the front compartment. Those wires go to the transfer switch. I think you'll find red and black, which are the 2 hot legs, a white, which is neutral, and a ground wire.
Your generator probably has a single hot wire, a neutral, and a ground. When you plug the 50 amp shore power cord into the 50-->30 adapter, the adapter connects the single hot wire to both of the 50 amp hot wires. That provides power to everything inside. When you connect the generator to a new connector in the front compartment, you'll need a similar arrangement.
You may want to install a twist-on 50 amp connector in the front compartment, similar to what the 50 amp shore power cord plugs into in the side of the trailer. With that, you'll probably have to fabricate the cord/adapter to the generator, but you won't have a "suicide cord" with live prongs, where it's possible to electrocute yourself if mishandled.
Our owner-written
Electrical user guide has pictures, drawings, and explanations that may be helpful to you.