Skip to content

“3.5.2 新版功能.”,“在 3.7 版更改:”这样的版本变更信息是在哪里翻译的? #164

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jaystone776 opened this issue Dec 30, 2020 · 8 comments

Comments

@jaystone776
Copy link

请问诸如“3.5.2 新版功能.”,“在 3.7 版更改:”这样的版本变更信息是在哪里翻译的?在transifex里没找到

@zhsj
Copy link
Collaborator

zhsj commented Dec 30, 2020

文档的源文件可以在python源码中找到,比如 https://docs.python.org/zh-cn/3.7/library/functions.html#bool 显示:

在 3.7 版更改: x 现在只能作为位置参数

那么可以看对应的源文件,看原文是啥,

https://raw.githubusercontent.com/python/cpython/dcc997cd28ab33ebac44182ee55533c1b37689f7/Doc/library/functions.rst

可以看到这是sphinx的一个语法:

.. versionchanged:: 3.7

这个翻译是在 sphinx 项目中翻译的,可以看 https://github.com/sphinx-doc/sphinx/blob/c99412695d2dc9e5392ede894ce7354d3236761f/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po#L1879

@jaystone776
Copy link
Author

我在 sphinx.po 和 changes.po 里都没找到 versionadded:: 3.5,这样的翻译,能帮我看下具体是哪个文件吗

@zhsj
Copy link
Collaborator

zhsj commented Dec 30, 2020

versionchanged 是 sphinx 的一个语法,叫 Directives。对应的英文原文是在代码中定义的,https://github.com/sphinx-doc/sphinx/blob/68cc0f7e94f360a2c62ebcb761f8096e04ebf07f/sphinx/domains/changeset.py#L30

@jaystone776
Copy link
Author

那如果想改它的中文怎么改呢

@zhsj
Copy link
Collaborator

zhsj commented Dec 30, 2020

请参考 https://www.sphinx-doc.org/en/master/internals/contributing.html#writing-documentation sphinx本身的翻译也是托管在 transifex 上的,项目地址为 https://www.transifex.com/sphinx-doc/sphinx-1/

@jaystone776
Copy link
Author

了解了,多谢你这么耐心解答

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants