Skip to content

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

@rffontenelle

Description

@rffontenelle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions