提交 4a036a53 编写于 作者: T Tink_Y 提交者: Cheerego

add chinese link in gen_doc.py (#439)

* modified gen_doc.py

* Update gen_doc.py

* update gen_doc.py
上级 d1f01160
......@@ -86,6 +86,7 @@ class DocGenerator(object):
:noindex:
'''.format(self.module_name, name))
self._print_cn_ref(name)
def print_method(self, name):
self._print_ref_(name)
......@@ -94,6 +95,7 @@ class DocGenerator(object):
:noindex:
'''.format(self.module_name, name))
self._print_cn_ref(name)
def _print_header_(self, name, dot, is_title):
dot_line = dot * len(name)
......@@ -109,6 +111,9 @@ class DocGenerator(object):
def _print_ref_(self, name):
self.stream.write(".. _api_{0}_{1}:\n\n".format("_".join(
self.module_name.split(".")), name))
def _print_cn_ref(self, name):
self.stream.write("Read Chinese Version: :ref:`cn_api_{0}_{1}`\n\n".format("_".join(
self.module_name.split(".")),name))
def main():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册