You can get pretty damn near to all electric with trains, trams and trolley buses.
The real difference is that now you can replace the diesel range extended trolley buses with battery range extended trolley buses.
I would strongly recommend against buying into the battery bus hype! If you are a city now that considered going all electric, do it with trolley wires and then some buses with somewhat more battery to extend some lines.
Buying a whole fleet of battery only buses causes a lot of issues. You still need a huge charging depot anyway. Its much worse for your roads. It causes much worse air pollution because those buses much heavier. The fire hazzard of electric buses, even with LFP, is pretty damn scary in a city. Trolley buses are also much saver in crashes because they are lighter.
So for cities that today have diesel buses, please, just put up trolley wires on all your main corridors. Modern trolley systems are great, and because of the battery tech we don't need crazy trolley switch anymore. The trolley wires just reconnect on the next stop instead.
Don't just buy fleets of battery buses that use up lithium that we could to better uses where less alternatives exists.
Also while we are at it, its incredibly dumb that we don't have trolley wires on highways. This is tech we could have deployed 30 years ago.