[Python-checkins] Doc: Disable smartquotes for zh-tw, zh-cn, fr and ja translations (GH-9423)

Julien Palard webhook-mailer at python.org
Sun Nov 4 16:04:54 EST 2018


https://github.com/python/cpython/commit/c03bf0ae794c3bec9b56f38164535fd1f5bfc04a
commit: c03bf0ae794c3bec9b56f38164535fd1f5bfc04a
branch: master
author: Adrian Liaw <adrianliaw2000 at gmail.com>
committer: Julien Palard <julien at palard.fr>
date: 2018-11-04T22:04:51+01:00
summary:

Doc: Disable smartquotes for zh-tw, zh-cn, fr and ja translations (GH-9423)

files:
D Doc/docutils.conf
M Doc/conf.py

diff --git a/Doc/conf.py b/Doc/conf.py
index 6060ac176c95..eb57ee0c9339 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -41,13 +41,18 @@
 # By default, highlight as Python 3.
 highlight_language = 'python3'
 
-# Require Sphinx 1.2 for build.
-needs_sphinx = '1.2'
+# Require Sphinx 1.7 for build.
+needs_sphinx = '1.7'
 
 # Ignore any .rst files in the venv/ directory.
 venvdir = os.getenv('VENVDIR', 'venv')
 exclude_patterns = [venvdir+'/*', 'README.rst']
 
+# Disable Docutils smartquotes for several translations
+smartquotes_excludes = {
+    'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
+}
+
 
 # Options for HTML output
 # -----------------------
diff --git a/Doc/docutils.conf b/Doc/docutils.conf
deleted file mode 100644
index bda4f5dc2351..000000000000
--- a/Doc/docutils.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[restructuredtext parser]
-smartquotes-locales: ja: ""''



More information about the Python-checkins mailing list