Skip to contentSkip to conversation

docs/zh_CN add three core api docs

PATCH Superseded Yanteng Si 4 participants 8 messages May 6, 2021 – May 15, 2021

Subsystems (2)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Yanteng Si

author
#0 lore raw

v5 cover docs/zh_CN add three core api docs

v4 -> v5:

* Pick Alex's review-by tag for [patch 1-3/3]

v3 -> v4:

Some bad translations have been modified as suggested by Jiaxun. Thank you for your review.

v2 -> v3:

* Pick Xiangcheng Wu's review-by tag for [patch 1-3/3]

* fix two original links. [1/3 and 3/3]

v1 -> v2:

* Some bad translations have been modified as suggested by Xiangcheng.Thank you for your review

https://lore.kernel.org/linux-doc/[email protected]/T/#t

* As Matthew and Xiangcheng suggested:

call kernel-doc to generate related docs (0001 and 0002).Thanks!

I tested it on other computers (at least three) with no problem,
But on my computers it prints 1000+ warnings, I tried to find the cause in the past few days but no clue.
So, the two patches may print as follows:(maybe your computer won't print anything)

linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *prev'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *next'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: void (*sync)(void)'.
linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:283: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:283. Declaration is '.. c:function:: void list_splice_init_rcu(struct list_head *list, struct list_head *head, void (*sync)(void))'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:283: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:283. Declaration is '.. c:None:: struct list_head *list'.
...

I'm a little skeptical now that something's wrong with my computer.

Yanteng Si (3):
docs/zh_CN: add core-api kernel-api.rst translation docs/zh_CN: add core-api printk-basics.rst translation docs/zh_CN: add core-api printk-formats.rst translation

 .../translations/zh_CN/core-api/index.rst     |   7 +-
 .../zh_CN/core-api/kernel-api.rst             | 385 ++++++++++++
 .../zh_CN/core-api/printk-basics.rst          | 111 ++++
 .../zh_CN/core-api/printk-formats.rst         | 580 ++++++++++++++++++
 4 files changed, 1081 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/translations/zh_CN/core-api/kernel-api.rst
 create mode 100644 Documentation/translations/zh_CN/core-api/printk-basics.rst
 create mode 100644 Documentation/translations/zh_CN/core-api/printk-formats.rst
Signature · 1 line
2.27.0
author
#1 lore raw

PATCH v5 1/3 docs/zh_CN: add core-api kernel-api.rst translation

This patch translates Documentation/core-api/kernel-api.rst into Chinese.

---
 .../translations/zh_CN/core-api/index.rst     |   5 +-
 .../zh_CN/core-api/kernel-api.rst             | 385 ++++++++++++++++++
 2 files changed, 389 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/core-api/kernel-api.rst
Documentation/translations/zh_CN/core-api/index.rst +4 -1
index f1fa71e45c77..60e1566d57eb 100644
@@ -19,9 +19,12 @@
 来的大量 kerneldoc 信息;有朝一日,若有人有动力的话,应当把它们拆分
 出来。
 
-Todolist:
+.. toctree::
+   :maxdepth: 1
 
    kernel-api
+
+Todolist:
    workqueue
    printk-basics
    printk-formats
Documentation/translations/zh_CN/core-api/kernel-api.rst new file +385 -0

385 lines not on this page · raw message

Signature · 1 line
2.27.0
author
#2 lore raw

PATCH v5 2/3 docs/zh_CN: add core-api printk-basics.rst translation

In reply to Yanteng Si

This patch translates Documentation/core-api/printk-basics.rst into Chinese.

---
 .../translations/zh_CN/core-api/index.rst     |   2 +-
 .../zh_CN/core-api/printk-basics.rst          | 111 ++++++++++++++++++
 2 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/core-api/printk-basics.rst
Documentation/translations/zh_CN/core-api/index.rst +1 -1
index 60e1566d57eb..5ecb23e3ba8c 100644
@@ -23,10 +23,10 @@
    :maxdepth: 1
 
    kernel-api
+   printk-basics
 
 Todolist:
    workqueue
-   printk-basics
    printk-formats
    symbol-namespaces
 
Documentation/translations/zh_CN/core-api/printk-basics.rst new file +111 -0

111 lines not on this page · raw message

Signature · 1 line
2.27.0
author
#3 lore raw

PATCH v5 3/3 docs/zh_CN: add core-api printk-formats.rst translation

In reply to Yanteng Si

This patch translates Documentation/core-api/printk-formats.rst into Chinese.

---
 .../translations/zh_CN/core-api/index.rst     |   2 +-
 .../zh_CN/core-api/printk-formats.rst         | 580 ++++++++++++++++++
 2 files changed, 581 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/core-api/printk-formats.rst
Documentation/translations/zh_CN/core-api/index.rst +1 -1
index 5ecb23e3ba8c..c2d4614d9e68 100644
@@ -24,10 +24,10 @@
 
    kernel-api
    printk-basics
+   printk-formats
 
 Todolist:
    workqueue
-   printk-formats
    symbol-namespaces
 
 数据结构和低级实用程序
Documentation/translations/zh_CN/core-api/printk-formats.rst new file +580 -0

580 lines not on this page · raw message

Signature · 1 line
2.27.0
#4 lore raw
In reply to Yanteng Si

Hi all:

Quoted 5 lines

I tested it on other computers (at least three) with no problem,
But on my computers it prints 1000+ warnings, I tried to find the cause in the past few days but no clue.
So, the two patches may print as follows:(maybe your computer won't print anything)

Quoted 11 lines

linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *prev'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *next'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: void (*sync)(void)'.
linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:283: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:283. Declaration is '.. c:function:: void list_splice_init_rcu(struct list_head *list, struct list_head *head, void (*sync)(void))'. linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:283: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:283. Declaration is '.. c:None:: struct list_head *list'.
...

I've done a lot of testing and found that these warnings are only reported in very old (sphinx 1.7.6)
or very new (sphinx 3.5.2, this is the version I'm currently using),
and the default version (sphinx 2.4.4)
is all right, so the current warnings can be ignored.>_<

Thanks,
Yanteng

maintainer
#5 lore raw
In reply to Yanteng Si
Quoted 11 lines · Yanteng Si

* As Matthew and Xiangcheng suggested:

call kernel-doc to generate related docs (0001 and 0002).Thanks!

I tested it on other computers (at least three) with no problem,
But on my computers it prints 1000+ warnings, I tried to find the cause in the past few days but no clue.
So, the two patches may print as follows:(maybe your computer won't print anything)

linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *prev'.

This is the same problem I just talked about in my other message. I really think we need to just leave the kernel-doc directives out of translations; we certainly don't want to add all those warnings.

Thanks,

jon

#6 lore raw
Quoted 12 lines · Jonathan Corbet <[email protected]> 于2021年5月14日周五 上午12:20写道:
Quoted 9 lines · Yanteng Si

* As Matthew and Xiangcheng suggested:

call kernel-doc to generate related docs (0001 and 0002).Thanks!

I tested it on other computers (at least three) with no problem,
But on my computers it prints 1000+ warnings, I tried to find the cause in the past few days but no clue.
So, the two patches may print as follows:(maybe your computer won't print anything)

Quoted 6 lines
Quoted 2 lines

linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *prev'.

This is the same problem I just talked about in my other message. I really think we need to just leave the kernel-doc directives out of translations; we certainly don't want to add all those warnings.

OK! I will remove them and then direct the reader to the original document. But the patch 1/3 has too many kernel-doc directives, In order to give the reader a good reading experience, I decided to remove it.~>_<~

Thanks,

Yanteng

Quoted 4 lines

Thanks,

jon

#7 lore raw
Quoted 17 lines · yanteng si <[email protected]> 于2021年5月14日周五 下午5:24写道:
Quoted 15 lines · Jonathan Corbet <[email protected]> 于2021年5月14日周五 上午12:20写道:
Quoted 11 lines · Yanteng Si

* As Matthew and Xiangcheng suggested:

call kernel-doc to generate related docs (0001 and 0002).Thanks!

I tested it on other computers (at least three) with no problem,
But on my computers it prints 1000+ warnings, I tried to find the cause in the past few days but no clue.
So, the two patches may print as follows:(maybe your computer won't print anything)

linux-next/Documentation/translations/zh_CN/core-api/kernel-api.rst:235: WARNING: Duplicate C declaration, also defined at core-api/kernel-api:235. Declaration is '.. c:None:: struct list_head *prev'.

Quoted 7 lines
Quoted 3 lines

This is the same problem I just talked about in my other message. I really think we need to just leave the kernel-doc directives out of translations; we certainly don't want to add all those warnings.

OK! I will remove them and then direct the reader to the original document. But the patch 1/3 has too many kernel-doc directives, In order to give the reader a good reading experience, I decided to remove it.~>_<~

I decided not to remove this patch(1/3) because it was needed to guide the reader, and the new translation looks good.

Thanks,

Yanteng