Skip to content

Commit

Permalink
Docs: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Jun 29, 2023
1 parent 7b1bc92 commit 25f4ea1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/about/release-notes.md
Expand Up @@ -196,7 +196,7 @@ class MyPluginConfig(base.Config):
bar = c.Type(str, default='')

class MyPlugin(plugins.BasePlugin[MyPluginConfig]):
def on_page_markdown(self, markdown: str, *, config: base.MkDocsConfig, **kwargs):
def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs):
if self.config.foo < 5: # Error, `foo` might be `None`, need to check first.
if config.site_url.startswith('http:'): # Error, MkDocs' `site_url` also might be `None`.
return markdown + self.config.baz # Error, no such attribute `baz`!
Expand All @@ -206,7 +206,7 @@ This lets you notice the errors from a static type checker before running the co

```python
class MyPlugin(plugins.BasePlugin[MyPluginConfig]):
def on_page_markdown(self, markdown: str, *, config: base.MkDocsConfig, **kwargs):
def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs):
if self.config.foo is not None and self.config.foo < 5: # OK, `int < int` is valid.
if (config.site_url or '').startswith('http:'): # OK, `str.startswith(str)` is valid.
return markdown + self.config.bar # OK, `str + str` is valid.
Expand Down Expand Up @@ -1271,7 +1271,7 @@ work for version 0.16, but may be removed in a future version. Use
`config.var_name` instead, where `var_name` is the name of one of the
[configuration] variables.

[configuration]: /user-guide/configuration.md
[configuration]: ../user-guide/configuration.md

Below is a summary of all of the changes made to the global context:

Expand Down
8 changes: 4 additions & 4 deletions docs/dev-guide/translations.md
Expand Up @@ -54,8 +54,8 @@ translation by following the steps below.

Here is a quick summary of what you'll need to do:

1. [Fork and clone the MkDocs repository](#fork-and-clone-the-mkdocs-repository) and then [install MkDocs for development](/about/contributing/#installing-for-development) for adding and testing translations.
2. [Initialize new localization catalogs](#initializing-the-localization-catalogs) for your language (if a translation for your locale already exists, follow the instructions for [updating theme localization files](/user-guide/custom-themes/#localizing-themes) instead).
1. [Fork and clone the MkDocs repository](#fork-and-clone-the-mkdocs-repository) and then [install MkDocs for development](../about/contributing.md#installing-for-development) for adding and testing translations.
2. [Initialize new localization catalogs](#initializing-the-localization-catalogs) for your language (if a translation for your locale already exists, follow the instructions for [updating theme localization files](#updating-the-translation-catalogs) instead).
3. [Add a translation](#translating-the-mkdocs-themes) for every text placeholder in the localized catalogs.
4. [Locally serve and test](#testing-theme-translations) the translated themes for your language.
5. [Update the documentation](#updating-theme-documentation) about supported translations for each translated theme.
Expand All @@ -74,10 +74,10 @@ use of a term which differs from the general language translation.

In the following steps you'll work with a fork of the MkDocs repository. Follow
the instructions for [forking and cloning the MkDocs
repository](/about/contributing/#installing-for-development).
repository](../about/contributing.md#installing-for-development).

To test the translations you also need to [install MkDocs for
development](/about/contributing/#installing-for-development) from your fork.
development](../about/contributing.md#installing-for-development) from your fork.

### Initializing the localization catalogs

Expand Down
4 changes: 2 additions & 2 deletions mkdocs/plugins.py
Expand Up @@ -628,8 +628,8 @@ def get_plugin_logger(name: str) -> PrefixedLogger:
```python
from mkdocs.plugins import get_plugin_logger
logger = get_plugin_logger(__name__)
logger.info("My plugin message")
log = get_plugin_logger(__name__)
log.info("My plugin message")
```
"""
logger = logging.getLogger(f"mkdocs.plugins.{name}")
Expand Down

0 comments on commit 25f4ea1

Please sign in to comment.