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

Doc: |today| format does not honor language's time format #103122

Closed
rffontenelle opened this issue Mar 29, 2023 · 1 comment
Closed

Doc: |today| format does not honor language's time format #103122

rffontenelle opened this issue Mar 29, 2023 · 1 comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@rffontenelle
Copy link
Contributor

The Sphinx |today| variable in Python Docs is rendered in the English time format "month day, year" even when browsing in other languages. This is mostly (or only?) noticeable in What's New in Python, e.g. 3.11.

I'd expect the date to honor the language's time format as translated in Sphinx. Taking version 4.5.0 which is used to build Python Docs 3.11, pt_BR and fr are translated to show "day month, year".

The source of this issue seems to be in Doc/conf.py which sets today_fmt's value, hence overriding Sphinx default value and its translations.

Steps to reproduce:

  • Browse original What's New in Python 3.11 and see Date: March 29, 2023
  • In the language drop-down menu, select Brazilian Portuguese and see Date: março 29, 2023 where should be 29 março, 2023
  • Now select French, see Date: mars 29, 2023 where should be 29 mars, 2023
@rffontenelle rffontenelle added the type-bug An unexpected behavior, bug, or error label Mar 29, 2023
@arhadthedev arhadthedev added the docs Documentation in the Doc dir label Mar 30, 2023
@hugovk
Copy link
Member

hugovk commented Aug 4, 2023

The |today| variable has been removed from the What's New pages, for example see:

And we can see it's been removed from the pages:

Therefore we can close this. Thanks for reporting!

@hugovk hugovk closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants