1
0
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:
squidfunk 2023-11-14 09:33:48 +01:00
parent 9ff75d1183
commit 9c73460e2c
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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