Skip to contentSkip to conversation

doc/zh_CN: add Chinese document coding style reminder

PATCH Superseded [email protected] 2 participants 2 messages Dec 9, 2021 – Dec 10, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 doc/zh_CN: add Chinese document coding style reminder

From: Alex Shi <[email protected]>

The coding style requirement for Chinese document is easy to be overlooked. Add the request as a remdiner.

---
 Documentation/translations/zh_CN/index.rst | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/translations/zh_CN/index.rst +5 -0
index a34e58733ac8..b01c04227d8a 100644
@@ -23,6 +23,11 @@
 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org
 上的linux-doc邮件列表。
 
+顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文
+的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时,
+中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。在将
+补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试。
+
 许可证文档
 ----------
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 21 lines · <[email protected]> 于2021年12月9日周四 20:33写道:

From: Alex Shi <[email protected]>

The coding style requirement for Chinese document is easy to be overlooked. Add the request as a remdiner.

---
 Documentation/translations/zh_CN/index.rst | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/translations/zh_CN/index.rst +0 -0
index a34e58733ac8..b01c04227d8a 100644

Documentation/translations/zh_CN/index.rst line 30

Quoted 8 lines
Documentation/translations/zh_CN/index.rst +5 -0
@@ -23,6 +23,11 @@
 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org
 上的linux-doc邮件列表。
 
+顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文
+的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时,
+中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。在将
+补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试。
+

可能需要细化一下:
当出现中英文混排时,我们以对齐优先,此时文本编辑器显示的列数仅供参考,因为在编辑器
看来,1个英文字符或者1个汉字,都算1列。我们确保实际列宽没有超过汉字的50个字符即可。

Thanks,
Tang

Quoted 7 lines
Documentation/translations/zh_CN/index.rst +0 -1
 许可证文档
 ----------
 
--

2.25.1