doc/zh_CN: add Chinese document coding style reminder
Subsystems (2)
[email protected]
maintainerPATCH 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 | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/translations/zh_CN/index.rst +4 -0
@@ -23,6 +23,10 @@ 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org 上的linux-doc邮件列表。 +顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文 +的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时, +中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。 + 许可证文档 ----------
Signature · 1 line
2.27.0
Quoted 21 lines · <[email protected]> 于2021年12月8日周三 19:41写道:
From: Alex Shi <[email protected]>
The coding style requirement for Chinese document is easy to be overlooked. Add the request as a remdiner.
Signed-off-by Alex Shi <[email protected]>Cc Yanteng Si <[email protected]>Cc Tang Yizhou <[email protected]>Cc Jonathan Corbet <[email protected]>--- Documentation/translations/zh_CN/index.rst | 4 ++++ 1 file changed, 4 insertions(+)Documentation/translations/zh_CN/index.rst +0
-0
Documentation/translations/zh_CN/index.rst line 28
Quoted 6 lines
Documentation/translations/zh_CN/index.rst +3
-0@@ -23,6 +23,10 @@ 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org 上的linux-doc邮件列表。 +顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文 +的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时, +中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。
How about:
另外,'-','=' 等符号需要与相关标题对齐, 为了照顾没有图形界面和习惯用vi查阅文档
的开发者,中文文档的文本块、段落等也应像英文文档那样整整齐齐。
在将补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试,网页版
文档在部分浏览器中暂时可能会出现多余的空格,目前已知firefox正常,据了解,浏
览器规范草案中已有该问题的解决方案,将来有希望解决。
.. 小技巧: 翻译时跟随英文文本块换行无需关心中文每行是否超字数,也不用担心漏掉空
行和缩进以及漏翻译,因为我们只需原地进行中英文字符串替换就可以了。
Thanks,
Yanteng
Quoted 7 lines
Documentation/translations/zh_CN/index.rst +1
-1+ 许可证文档 ---------- --2.27.0
Quoted 33 lines · yanteng si
Quoted 21 lines · <[email protected]> 于2021年12月8日周三 19:41写道:
From: Alex Shi <[email protected]>
The coding style requirement for Chinese document is easy to be overlooked. Add the request as a remdiner.
Signed-off-by Alex Shi <[email protected]>Cc Yanteng Si <[email protected]>Cc Tang Yizhou <[email protected]>Cc Jonathan Corbet <[email protected]>--- Documentation/translations/zh_CN/index.rst | 4 ++++ 1 file changed, 4 insertions(+)Documentation/translations/zh_CN/index.rst +0
-0Documentation/translations/zh_CN/index.rst line 28
Quoted 6 lines
Documentation/translations/zh_CN/index.rst +3
-0@@ -23,6 +23,10 @@ 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org 上的linux-doc邮件列表。 +顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文 +的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时, +中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。How about:
另外,'-','=' 等符号需要与相关标题对齐, 为了照顾没有图形界面和习惯用vi查阅文档
的开发者,中文文档的文本块、段落等也应像英文文档那样整整齐齐。
Quoted 3 lines
在将补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试,网页版
文档在部分浏览器中暂时可能会出现多余的空格,目前已知firefox正常,据了解,浏
览器规范草案中已有该问题的解决方案,将来有希望解决。
nice.
Quoted 3 lines
.. 小技巧: 翻译时跟随英文文本块换行无需关心中文每行是否超字数,也不用担心漏掉空
行和缩进以及漏翻译,因为我们只需原地进行中英文字符串替换就可以了。
the line by line replace may lead to unalignment issue, do we need this tips?
Thanks
Quoted 10 lines
Thanks,
YantengQuoted 7 lines
Documentation/translations/zh_CN/index.rst +1
-1+ 许可证文档 ---------- --2.27.0
Quoted 39 lines · Alex Shi <[email protected]> 于2021年12月9日周四 10:46写道:
Quoted 33 lines · yanteng si
Quoted 21 lines · <[email protected]> 于2021年12月8日周三 19:41写道:
From: Alex Shi <[email protected]>
The coding style requirement for Chinese document is easy to be overlooked. Add the request as a remdiner.
Signed-off-by Alex Shi <[email protected]>Cc Yanteng Si <[email protected]>Cc Tang Yizhou <[email protected]>Cc Jonathan Corbet <[email protected]>--- Documentation/translations/zh_CN/index.rst | 4 ++++ 1 file changed, 4 insertions(+)Documentation/translations/zh_CN/index.rst +0
-0Documentation/translations/zh_CN/index.rst line 28
Quoted 6 lines
Documentation/translations/zh_CN/index.rst +3
-0@@ -23,6 +23,10 @@ 另外,随时欢迎您对内核文档进行改进;如果您想提供帮助,请加入vger.kernel.org 上的linux-doc邮件列表。 +顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文 +的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时, +中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。How about:
另外,'-','=' 等符号需要与相关标题对齐, 为了照顾没有图形界面和习惯用vi查阅文档
的开发者,中文文档的文本块、段落等也应像英文文档那样整整齐齐。Quoted 3 lines
在将补丁提交到社区之前,一定要进行必要的checkpatch.pl检查和编译测试,网页版
文档在部分浏览器中暂时可能会出现多余的空格,目前已知firefox正常,据了解,浏
览器规范草案中已有该问题的解决方案,将来有希望解决。
Quoted 7 lines
nice.
Quoted 3 lines
.. 小技巧: 翻译时跟随英文文本块换行无需关心中文每行是否超字数,也不用担心漏掉空
行和缩进以及漏翻译,因为我们只需原地进行中英文字符串替换就可以了。the line by line replace may lead to unalignment issue, do we need this tips?
I mean that usually, the English document a line of chars is about 80, we translate, a line of Chinese written to the same length as the English, we will break the line, so that we do not have to count. 大意就是翻译时,把英文文档复制到zh_CN对应地方,直接在英文文档里面做段落替换,我们只要时刻保持对齐英文长度就不用频繁数数了。
It's up to you! >_<
Thanks,
Yanteng
Quoted 12 lines
Thanks
Quoted 10 lines
Thanks,
YantengQuoted 7 lines
Documentation/translations/zh_CN/index.rst +1
-1+ 许可证文档 ---------- --2.27.0