You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many thanks for the work on ablog. I am developing a website with sphinx and pydata theme and I use ablog to manage events data as posts with comments disabled.
I had an unexpected behaviour but I don't know if it concerns directly ablog or sphinx itself. Indeed, setting language, blog_languages and blog_default_language options to 'en' properly as shown in sphinx and ablog documentation, dates visible in the result of a postlist directive are still in French. Why in French ? Because of the locale of my computer. Then, in addition to these 3 options, I had to set the locale to en_GB in the conf.py file directly to fix the problem. I don't think this unexpected behaviour is linked to another sphinx extension used, but I attach the relevant part of my conf.py to explain them.
By using %b, %B, %a and/or %A in the :date: parameter of a postlist directive, the printed words are in French if we comment the line setting the locale.
It is a bug of blog_languages and blog_default_language options ? or language option itself ?
Thanks in advance.
To Reproduce
Configuration file for the Sphinx documentation builder.
For the full list of built-in configuration values, see the documentation:
Describe the bug
Hi !
Many thanks for the work on ablog. I am developing a website with sphinx and pydata theme and I use ablog to manage events data as posts with comments disabled.
I had an unexpected behaviour but I don't know if it concerns directly ablog or sphinx itself. Indeed, setting
language
,blog_languages
andblog_default_language
options to 'en' properly as shown in sphinx and ablog documentation, dates visible in the result of a postlist directive are still in French. Why in French ? Because of the locale of my computer. Then, in addition to these 3 options, I had to set the locale to en_GB in theconf.py
file directly to fix the problem. I don't think this unexpected behaviour is linked to another sphinx extension used, but I attach the relevant part of myconf.py
to explain them.By using
%b
,%B
,%a
and/or%A
in the:date:
parameter of a postlist directive, the printed words are in French if we comment the line setting the locale.It is a bug of
blog_languages
andblog_default_language
options ? orlanguage
option itself ?Thanks in advance.
To Reproduce
Configuration file for the Sphinx documentation builder.
For the full list of built-in configuration values, see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
import locale
import datetime
we have to set the locale to en_GB for date prints
locale.setlocale(locale.LC_ALL, "en_GB")
-- Project information -----------------------------------------------------
https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
...
-- General configuration ---------------------------------------------------
https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["breathe",
"sphinx_copybutton",
"sphinx_design",
"sphinx_subfigure",
"sphinxcontrib.email",
"sphinxcontrib.moderncmakedomain",
"ablog",
"sphinx.ext.intersphinx"]
language = "en"
templates_path = ["_templates"]
exclude_patterns = []
breathe configuration
...
sphinx_copybutton configuration
...
sphinxcontrib-email configuration
email_automode = True
ablog configuration
blog_path = "events"
blog_title = "Events"
blog_languages = {
"en": ("English", None),
}
blog_default_language = "en"
fontawesome_included = True
-- Options for HTML output -------------------------------------------------
https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
...
Screenshots
No response
System Details
masOS Ventura, intel
every sphinx and ablog dependency installed with pip and up to date
Installation method
pip
The text was updated successfully, but these errors were encountered: