[docs]defpo_interface(settings,init=False,update=False,compile_opt=False):""" Manage project translation catalogs for all registred languages. You may enable all available modes. Modes are always processed in the same order: "init" then "update" and finally "compile". Arguments: settings (optimus.conf.model.SettingsModel): Settings object which define paths for locale directory and path for template sources to possibly scan. Keyword Arguments: init (boolean): Enable init mode to initialize POT file and "locale" directory. update (boolean): Enable update mode to refresh POT file and PO files for template changes. compile_opt (boolean): Enable compile mode to compile MO files from PO files. """# Proceed to operationsi18n=I18NManager(settings)ifinitorupdateorcompile_opt:i18n.init_locales_dir()i18n.build_pot(force=update)i18n.init_catalogs()ifupdate:i18n.update_catalogs()ifcompile_opt:i18n.compile_catalogs()