Skip to content

Commit

Permalink
Fixed blog plugin crashing for pt-BR locale
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Nov 14, 2023
1 parent 9ff75d1 commit 9c73460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion material/plugins/blog/plugin.py
Expand Up @@ -800,7 +800,7 @@ def _format_path_for_pagination(self, view: View, page: int):

# Format date
def _format_date(self, date: datetime, format: str, config: MkDocsConfig):
locale = config.theme["language"]
locale: str = config.theme["language"].replace("-", "_")
return format_date(date, format = format, locale = locale)

# Format date for post
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/blog/plugin.py
Expand Up @@ -800,7 +800,7 @@ def _format_path_for_pagination(self, view: View, page: int):

# Format date
def _format_date(self, date: datetime, format: str, config: MkDocsConfig):
locale = config.theme["language"]
locale: str = config.theme["language"].replace("-", "_")
return format_date(date, format = format, locale = locale)

# Format date for post
Expand Down

0 comments on commit 9c73460

Please sign in to comment.