babel icon indicating copy to clipboard operation
babel copied to clipboard

Extract the compile functionality into an API function

Open bartfeenstra opened this issue 5 years ago • 2 comments

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

bartfeenstra avatar Nov 29 '20 00:11 bartfeenstra

PR welcome!

akx avatar Jan 25 '22 15:01 akx

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?

azmeuk avatar Jun 16 '23 07:06 azmeuk