Extract the compile functionality into an API function
Catalogs can currently only be compiled using the command line. To allow applications to leverage Babel to compile translations themselves, the relevant code can be extracted from babel.messages.frontend.compile_catalog() into its own API function, separating it from the command line.
Right now this has to be done by invoking the Babel command line, like in https://github.com/bartfeenstra/betty/pull/619
PR welcome!
PR welcome!
@akx Have you expectations on how this should be done? Just extracting the logic from the Command object in babel/messages/frontend.py is enough? Should the PR also do this for all the other commands in the file?