Documentation/translations/zh_CN/how-to.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/how-to.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/how-to.rst- Extension
.rst- Size
- 17137 bytes
- Lines
- 474
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
==========================
Linux 内核中文文档翻译规范
==========================
修订记录:
- v1.0 2025 年 3 月 28 日,司延腾、慕冬亮共同编写了该规范。
制定规范的背景
==============
过去几年,在广大社区爱好者的友好合作下,Linux 内核中文文档迎来了蓬勃的发
展。在翻译的早期,一切都是混乱的,社区对译稿只有一个准确翻译的要求,以鼓
励更多的开发者参与进来,这是从 0 到 1 的必然过程,所以早期的中文文档目录
更加具有多样性,不过好在文档不多,维护上并没有过大的压力。
然而,世事变幻,不觉有年,现在内核中文文档在前进的道路上越走越远,很多潜
在的问题逐渐浮出水面,而且随着中文文档数量的增加,翻译更多的文档与提高中
文文档可维护性之间的矛盾愈发尖锐。由于文档翻译的特殊性,很多开发者并不会
一直更新文档,如果中文文档落后英文文档太多,文档更新的工作量会远大于重新
翻译。而且邮件列表中陆续有新的面孔出现,他们那股热情,就像燃烧的火焰,能
瞬间点燃整个空间,可是他们的补丁往往具有个性,这会给审阅带来了很大的困难,
reviewer 们只能耐心地指导他们如何与社区更好地合作,但是这项工作具有重复
性,长此以往,会渐渐浇灭 reviewer 审阅的热情。
虽然内核文档中已经有了类似的贡献指南,但是缺乏专门针对于中文翻译的,尤其
是对于新手来说,浏览大量的文档反而更加迷惑,该文档就是为了缓解这一问题而
编写,目的是为提供给新手一个快速翻译指南。
详细的贡献指南:Documentation/translations/zh_CN/process/index.rst。
环境搭建
========
工欲善其事必先利其器,如果您目前对内核文档翻译满怀热情,并且会独立地安装
Linux 发行版和简单地使用 Linux 命令行,那么可以迅速开始了。若您尚不具备该
能力,很多网站上会有详细的手把手教程,最多一个上午,您应该就能掌握对应技
能。您需要注意的一点是,请不要使用 root 用户进行后续步骤和文档翻译。
拉取开发树
----------
中文文档翻译工作目前独立于 linux-doc 开发树开展,所以您需要拉取该开发树,
打开终端命令行执行::
git clone git://git.kernel.org/pub/scm/linux/kernel/git/alexs/linux.git
如果您遇到网络连接问题,也可以执行以下命令::
git clone https://mirrors.hust.edu.cn/git/kernel-doc-zh.git linux
这是 Alex 开发树的镜像库,每两个小时同步一次上游。如果您了解到更快的 mirror,
请随时 **添加** 。
命令执行完毕后,您会在当前目录下得到一个 linux 目录,该目录就是您之后的工作
仓库,请把它放在一个稳妥的位置。
安装文档构建环境
----------------
内核仓库里面提供了一个半自动化脚本,执行该脚本,会检测您的发行版中需要安
装哪些软件包,请按照命令行提示进行安装,通常您只需要复制命令并执行就行。
::
cd linux
./tools/docs/sphinx-pre-install
以 Fedora 为例,它的输出是这样的::
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.