Skip to contentSkip to conversation

convert TW translation sparse.txt to RST

PATCH In review Min-Hua Chen 2 participants 6 messages Sep 2, 2023 – Oct 3, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover convert TW translation sparse.txt to RST

These patches move TW sparse.txt to TW dev-tools and convert TW sparse.txt to RST, based on [1]. Add the RST to toctree [2].

Randy said [1]:
"
it would be good if someone would update/modify this sparse.txt file to be in Documentation/translation/zh_TW/dev-tools/ and convert it to sparse.rst (IMO).
"

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/

Min-Hua Chen (3):
docs: sparse: move TW sparse.txt to TW dev-tools
docs: sparse: convert sparse.txt to RST
docs: sparse: add sparse.rst to toctree

 .../translations/zh_TW/dev-tools/index.rst    | 40 +++++++++++++++++++
 .../{sparse.txt => dev-tools/sparse.rst}      |  2 +-
 Documentation/translations/zh_TW/index.rst    |  2 +-
 3 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/translations/zh_TW/dev-tools/index.rst
 rename Documentation/translations/zh_TW/{sparse.txt => dev-tools/sparse.rst} (99%)

---

Change since v1:
1. change subject to convert sparse.txt to RST
2. add Suggested-by tag to credit Randy

Change since v2:
rebase to next-20230831

Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/3 docs: sparse: move TW sparse.txt to TW dev-tools

Follow Randy's advice [1] to move Documentation/translations/zh_TW/sparse.txt to Documentation/translations/zh_TW/dev-tools/sparse.txt

[1] https://lore.kernel.org/lkml/[email protected]/

---
 Documentation/translations/zh_TW/{ => dev-tools}/sparse.txt | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Documentation/translations/zh_TW/{ => dev-tools}/sparse.txt (100%)
Documentation/translations/zh_TW/dev-tools/sparse.txt renamed from Documentation/translations/zh_TW/sparse.txt +0 -0
similarity index 100%
rename from Documentation/translations/zh_TW/sparse.txt
rename to Documentation/translations/zh_TW/dev-tools/sparse.txt
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/3 docs: sparse: convert sparse.txt to RST

In reply to Min-Hua Chen

Follow Randy's advice [1] to move Documentation/translations/zh_TW/dev-tools/sparse.txt to Documentation/translations/zh_TW/dev-tools/sparse.rst

[1] https://lore.kernel.org/lkml/[email protected]/

---
 .../translations/zh_TW/dev-tools/{sparse.txt => sparse.rst}     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/translations/zh_TW/dev-tools/{sparse.txt => sparse.rst} (99%)
Documentation/translations/zh_TW/dev-tools/sparse.rst renamed from Documentation/translations/zh_TW/dev-tools/sparse.txt +1 -1
similarity index 99%
rename from Documentation/translations/zh_TW/dev-tools/sparse.txt
rename to Documentation/translations/zh_TW/dev-tools/sparse.rst
index 35d3d1d748e6..a6d31a20018c 100644
@@ -27,7 +27,7 @@ Copyright 2006 Bob Copeland <[email protected]>
 使用 sparse 工具做類型檢查
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-"__bitwise" 是一種類型屬性,所以你應該這樣使用它:
+"__bitwise" 是一種類型屬性,所以你應該這樣使用它::
 
         typedef int __bitwise pm_request_t;
 
Signature · 1 line
2.34.1
#3 lore raw

PATCH v3 3/3 docs: sparse: add sparse.rst to toctree

In reply to Min-Hua Chen

Add sparst.rst to toctree, so it can be part of the docs build.

---
 .../translations/zh_TW/dev-tools/index.rst    | 40 +++++++++++++++++++
 Documentation/translations/zh_TW/index.rst    |  2 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_TW/dev-tools/index.rst
Documentation/translations/zh_TW/dev-tools/index.rst new file +40 -0
new file mode 100644
index 000000000000..8f101db5a07f
@@ -0,0 +1,40 @@
+.. include:: ../disclaimer-zh_TW.rst
+
+:Original: Documentation/dev-tools/index.rst
+:Translator: Min-Hua Chen <[email protected]>
+
+============
+內核開發工具
+============
+
+本文檔是有關內核開發工具文檔的合集。
+目前這些文檔已經整理在一起,不需要再花費額外的精力。
+歡迎任何補丁。
+
+有關測試專用工具的簡要概述,參見
+Documentation/dev-tools/testing-overview.rst
+
+.. class:: toc-title
+
+	   目錄
+
+.. toctree::
+   :maxdepth: 2
+
+   sparse
+
+Todolist:
+
+ - coccinelle
+ - kcov
+ - ubsan
+ - kmemleak
+ - kcsan
+ - kfence
+ - kgdb
+ - kselftest
+ - kunit/index
+ - testing-overview
+ - gcov
+ - kasan
+ - gdb-kernel-debugging
Documentation/translations/zh_TW/index.rst +1 -1
index d1cf0b4d8e46..ffcaf3272fe7 100644
@@ -55,11 +55,11 @@ TODOList:
    :maxdepth: 1
 
    process/license-rules
+   dev-tools/index
 
 TODOList:
 
 * doc-guide/index
-* dev-tools/index
 * dev-tools/testing-overview
 * kernel-hacking/index
 * rust/index
Signature · 1 line
2.34.1
maintainer
#4 lore raw
In reply to Min-Hua Chen
Quoted 21 lines · Min-Hua Chen

These patches move TW sparse.txt to TW dev-tools and convert TW sparse.txt to RST, based on [1]. Add the RST to toctree [2].

Randy said [1]:
"
it would be good if someone would update/modify this sparse.txt file to be in Documentation/translation/zh_TW/dev-tools/ and convert it to sparse.rst (IMO).
"

[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/

Min-Hua Chen (3):
docs: sparse: move TW sparse.txt to TW dev-tools
docs: sparse: convert sparse.txt to RST
docs: sparse: add sparse.rst to toctree

Quoted 6 lines
 .../translations/zh_TW/dev-tools/index.rst    | 40 +++++++++++++++++++
 .../{sparse.txt => dev-tools/sparse.rst}      |  2 +-
 Documentation/translations/zh_TW/index.rst    |  2 +-
 3 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/translations/zh_TW/dev-tools/index.rst
 rename Documentation/translations/zh_TW/{sparse.txt => dev-tools/sparse.rst} (99%)

So this series introduces a new warning:

WARNING: Unparseable C cross-reference: 'int'
Invalid C declaration: Expected identifier in nested name, got keyword: int [error at 3]
int
---^

That is ... somewhat unhelpful. I eventually tracked it down to this piece in sparse.rst:

Quoted 8 lines

所以更簡單的辦法只要這樣做:

	typedef int __bitwise pm_request_t;

	#define PM_SUSPEND ((__force pm_request_t) 1)
	#define PM_RESUME ((__force pm_request_t) 2)

現在你就有了嚴格的類型檢查所需要的所有基礎架構。

That needs to be a literal block to be parsed properly. I have taken the liberty of changing the first line above to:

Quoted 1 line

所以更簡單的辦法只要這樣做::

...and the warning is gone.

Thus: series applied, but please properly build-test changes like this in the future.

Thanks,

jon

#5 lore raw
Quoted 41 lines
Quoted 10 lines

docs: sparse: move TW sparse.txt to TW dev-tools
docs: sparse: convert sparse.txt to RST
docs: sparse: add sparse.rst to toctree

 .../translations/zh_TW/dev-tools/index.rst    | 40 +++++++++++++++++++
 .../{sparse.txt =3D> dev-tools/sparse.rst}      |  2 +-
 Documentation/translations/zh_TW/index.rst    |  2 +-
 3 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/translations/zh_TW/dev-tools/index.rst
 rename Documentation/translations/zh_TW/{sparse.txt =3D> dev-tools/spars=

e.rst} (99%)

So this series introduces a new warning:

WARNING: Unparseable C cross-reference: 'int'
Invalid C declaration: Expected identifier in nested name, got keyword: int= [error at 3]
int
---^

That is ... somewhat unhelpful. I eventually tracked it down to this piece in sparse.rst:

Quoted 1 line

=E6=89=80=E4=BB=A5=E6=9B=B4=E7=B0=A1=E5=96=AE=E7=9A=84=E8=BE=A6=E6=B3=95=

=E5=8F=AA=E8=A6=81=E9=80=99=E6=A8=A3=E5=81=9A=EF=BC=9A

Quoted 7 lines

=20

	typedef int __bitwise pm_request_t;
=20
	#define PM_SUSPEND ((__force pm_request_t) 1)
	#define PM_RESUME ((__force pm_request_t) 2)

=20 =E7=8F=BE=E5=9C=A8=E4=BD=A0=E5=B0=B1=E6=9C=89=E4=BA=86=E5=9A=B4=E6=A0=BC=

=E7=9A=84=E9=A1=9E=E5=9E=8B=E6=AA=A2=E6=9F=A5=E6=89=80=E9=9C=80=E8=A6=81=E7= =9A=84=E6=89=80=E6=9C=89=E5=9F=BA=E7=A4=8E=E6=9E=B6=E6=A7=8B=E3=80=82

That needs to be a literal block to be parsed properly. I have taken the liberty of changing the first line above to:

Quoted 1 line

=E6=89=80=E4=BB=A5=E6=9B=B4=E7=B0=A1=E5=96=AE=E7=9A=84=E8=BE=A6=E6=B3=95=

=E5=8F=AA=E8=A6=81=E9=80=99=E6=A8=A3=E5=81=9A::

Quoted 8 lines

...and the warning is gone.

Thus: series applied, but please properly build-test changes like this in the future.

Thanks,

jon

Got it, thank you for doing this.
I will do build-test with care in the future.

Min-Hua