Skip to content

Commit

Permalink
Change mkdocs mdpo extension name
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Feb 25, 2022
1 parent 09b7214 commit 4b8cd5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions mkdocs_mdpo_plugin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def on_config_event(plugin, config, **kwargs):
* Define properly `lc_messages`, `languages` and `locale_dir`
configuration settings.
* Loads `mkdocs.mdpo` extension.
* Loads `mkdocs-mdpo` extension.
* Configures md4c extensions accordingly to Python-Markdown extensions.
* Stores the Markdown extensions used in the build in the
``extensions.markdown`` property of the plugin instance.
Expand Down Expand Up @@ -128,10 +128,10 @@ def _languages_required():
if 'strikethrough' in plugin.extensions.md4c:
plugin.extensions.md4c.remove('strikethrough')

# configure internal 'mkdocs.mdpo' extension
if 'mkdocs.mdpo' in markdown_extensions: # pragma: no cover
config['markdown_extensions'].remove('mkdocs.mdpo')
config['markdown_extensions'].append('mkdocs.mdpo')
# configure internal 'mkdocs-mdpo' extension
if 'mkdocs-mdpo' in markdown_extensions: # pragma: no cover
config['markdown_extensions'].remove('mkdocs-mdpo')
config['markdown_extensions'].append('mkdocs-mdpo')

# store reference in plugin to markdown_extensions for later usage
plugin.extensions.markdown = markdown_extensions
Expand Down
4 changes: 2 additions & 2 deletions mkdocs_mdpo_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
self.extensions = Extensions()

# instance that represents the run
# (needed by `mkdocs.mdpo` extension)
# (needed by `mkdocs-mdpo` extension)
MkdocsBuild.instance(self)

super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -183,7 +183,7 @@ def on_page_markdown(self, markdown, page, config, files):
* For each documentation page, creates another documentation page
for each language that will be translated (part here and part
inside the `mkdocs.mdpo` extension, see
inside the `mkdocs-mdpo` extension, see
:py:mod:`mkdocs_mdpo_plugin.extension` module).
"""
# only process original files, pages created for translation
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include_package_data = True

[options.entry_points]
markdown.extensions =
mkdocs.mdpo = mkdocs_mdpo_plugin.extensions:MkdocsMdpoExtension
mkdocs-mdpo = mkdocs_mdpo_plugin.extensions:MkdocsMdpoExtension
mkdocs.plugins =
mdpo = mkdocs_mdpo_plugin.plugin:MdpoPlugin

Expand Down

0 comments on commit 4b8cd5c

Please sign in to comment.