(self, version, build_data)
| 5 | |
| 6 | class CustomBuildHook(BuildHookInterface): |
| 7 | def initialize(self, version, build_data): |
| 8 | from babel.messages.frontend import compile_catalog |
| 9 | |
| 10 | for theme in 'mkdocs', 'readthedocs': |
| 11 | cmd = compile_catalog() |
| 12 | cmd.directory = os.path.join('mkdocs', 'themes', theme, 'locales') |
| 13 | cmd.finalize_options() |
| 14 | cmd.run() |