diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-02-14 20:07:28 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-02-14 21:48:24 +0900 |
commit | 4452cc3d2ec02b8b4bbca049761e40729d288d8c (patch) | |
tree | bb1527bea9600da56e28c2d3f8cdcfb375071380 /sphinx/transforms.py | |
parent | 77e3246fb1a97630a8c58f8077c90e5affa2a20b (diff) | |
download | sphinx-git-4452cc3d2ec02b8b4bbca049761e40729d288d8c.tar.gz |
Fix #794: Date formatting in latex output is not localized
Diffstat (limited to 'sphinx/transforms.py')
-rw-r--r-- | sphinx/transforms.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/transforms.py b/sphinx/transforms.py index a5d44d73f..583271116 100644 --- a/sphinx/transforms.py +++ b/sphinx/transforms.py @@ -24,8 +24,7 @@ from sphinx.util.nodes import ( traverse_translatable_index, extract_messages, LITERAL_TYPE_NODES, IMAGE_TYPE_NODES, apply_source_workaround, ) -from sphinx.util.osutil import ustrftime -from sphinx.util.i18n import find_catalog +from sphinx.util.i18n import find_catalog, format_date from sphinx.util.pycompat import indent from sphinx.domains.std import make_glossary_term, split_term_classifiers @@ -54,7 +53,8 @@ class DefaultSubstitutions(Transform): text = config[refname] if refname == 'today' and not text: # special handling: can also specify a strftime format - text = ustrftime(config.today_fmt or _('%B %d, %Y')) + text = format_date(config.today_fmt or _('MMMM dd, YYYY'), + language=config.language) ref.replace_self(nodes.Text(text, text)) |