mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Fixed blog plugin crashing for pt-BR locale
This commit is contained in:
parent
9ff75d1183
commit
9c73460e2c
@ -800,7 +800,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
|
|
||||||
# Format date
|
# Format date
|
||||||
def _format_date(self, date: datetime, format: str, config: MkDocsConfig):
|
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)
|
return format_date(date, format = format, locale = locale)
|
||||||
|
|
||||||
# Format date for post
|
# Format date for post
|
||||||
|
@ -800,7 +800,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
|
|
||||||
# Format date
|
# Format date
|
||||||
def _format_date(self, date: datetime, format: str, config: MkDocsConfig):
|
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)
|
return format_date(date, format = format, locale = locale)
|
||||||
|
|
||||||
# Format date for post
|
# Format date for post
|
||||||
|
Loading…
Reference in New Issue
Block a user