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

fix: default to localized date formatting #1552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

David-Guillot
Copy link

@David-Guillot David-Guillot commented Jul 9, 2024

What does this PR change? What problem does it solve?

On a multilingual blog with translated posts, a non-English post displays an English-formatted non-English date like
juillet 8, 2024 instead of 8 juillet 2024 as it should be for French.

This PR changes the post_meta partial template to leverage Hugo's time.Format function's preset formats. I have chosen :date_long since it's the one that was hard-coded here before.

Was the change discussed in an issue or in the Discussions before?

Closes #1611. Is an alternative implementation of #1111.

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

@David-Guillot David-Guillot changed the title fix(post_meta): default to localized date formatting fix #1611: default to localized date formatting Oct 7, 2024
@David-Guillot David-Guillot changed the title fix #1611: default to localized date formatting fix: default to localized date formatting Oct 7, 2024
Copy link

sonarqubecloud bot commented Oct 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Non-English dates appear English-formatted
1 participant