Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog plugin error with date convertion with pt-BR language #6328

Closed
4 tasks done
vmutter opened this issue Nov 13, 2023 · 2 comments
Closed
4 tasks done

Blog plugin error with date convertion with pt-BR language #6328

vmutter opened this issue Nov 13, 2023 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@vmutter
Copy link

vmutter commented Nov 13, 2023

Context

No response

Bug description

Using the blog plugin with the language set to pt-BR, there is a problem with the babel format_date, with the given locale.

The locale is set by getting the langauge config, in this case pt-BR, but babel does not support the hifen (it must be an undescore). So ther error happens.

Line 803 from https://github.com/squidfunk/mkdocs-material/blob/master/src/plugins/blog/plugin.py

This error problably happens with other languages with hifen (e.g. ku-IQ)

The solution would be to replace the hifen (-) with (_)

Related links

Reproduction

9.4.8-bug-blog-pt-br.zip

Steps to reproduce

  1. Setting up a blog
  2. Start the mkdocs, using docker: docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material

Browser

Chrome

Before submitting

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Nov 14, 2023
@squidfunk
Copy link
Owner

Thanks for reporting and the excellent reproduction! Fixed in 9c73460.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open and removed needs investigation Issue must be investigated by the maintainers labels Nov 14, 2023
@squidfunk
Copy link
Owner

Released as part of 9.4.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants