Kirk asks wow long would it take Scotty to reproduce a hundred flintlocks. Scotty seems nonplussed by the question, this alone could indicate this isn't that easy a request. They may be able to fabricate the materials, but it's apparent they aren't going to call up the computer and say "replicate a hundred flintlocks." There will probably be a team of engineers slapping these together.
Regarding having Nazi uniforms on hand: "Patch historical computer into uniform section. I want McCoy outfitted as a Gestapo doctor Nazi Germany, old Earth date 1944. Make him a colonel."
Could be replicator tech or just really super fast sewing machines.
They still can't make dilithium crystals, though.