Skip to content

Commit 577d63f

Browse files
committed
fix: README.md
1 parent b96ef84 commit 577d63f

File tree

1 file changed

+61
-15
lines changed

1 file changed

+61
-15
lines changed

README.md

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# The Swift Programming Language (Simplified Chinese Version by SwiftGG)
22

3+
[English Version](#english-version) | [中文版本](#中文版本)
4+
5+
## English Version
6+
37
This repository contains the source for *The Swift Programming Language*
48
(sometimes abbreviated as TSPL),
59
which is published on [docs.swift.org][published]
@@ -28,20 +32,66 @@ to display a local preview in your browser.
2832

2933
2. Install the `docc` command-line tool by either downloading the toolchain from Swift.org or installing Xcode.
3034

31-
> Note:
32-
>
33-
> If you installed DocC by downloading a toolchain from Swift.org,
34-
> `docc` is located in `usr/bin/`,
35-
> relative to the installation path of the toolchain.
36-
> Make sure your shell's `PATH` environment variable
37-
> includes that directory.
38-
>
39-
> If you installed DocC by downloading Xcode,
40-
> run `xcrun docc preview swift-6-beta-translation.docc` instead.
35+
> Note:
36+
>
37+
> If you installed DocC by downloading a toolchain from Swift.org,
38+
> `docc` is located in `usr/bin/`,
39+
> relative to the installation path of the toolchain.
40+
> Make sure your shell's `PATH` environment variable
41+
> includes that directory.
42+
>
43+
> If you installed DocC by downloading Xcode,
44+
> run `xcrun docc preview swift-6-beta-translation.docc` instead.
4145
4246
3. Replace the content of the original Markdown file with your Chinese translation, following the terminology table below and the [SwiftGG style guide][swiftgg-style-guide]. Submit your translation through a Pull Request. Once verified by SwiftGG members, it will be merged into the current translation branch.
4347

44-
## Terminology Table
48+
## Contributors
49+
50+
We extend our heartfelt thanks to all our contributors. You can find the [list of contributors here][contributors].
51+
52+
## 中文版本
53+
54+
本仓库包含 *The Swift Programming Language* (缩写为 TSPL) 的源代码,
55+
该文档发布在 [docs.swift.org][published] 上,
56+
并使用 [Swift-DocC][docc] 构建。
57+
58+
本仓库包括 TSPL 的最新版本,以及对应不同 Swift 版本的简体中文翻译。
59+
60+
## 构建
61+
62+
克隆此仓库并在仓库根目录运行 `docc preview swift-6-beta-translation.docc`
63+
64+
运行 DocC 后,打开 `docc` 输出的链接,即可在浏览器中显示本地预览。
65+
66+
## 当前状态
67+
68+
- The Swift Programming Language 的最新英文版本。[最新提交: 11a2b29][11a2b29]
69+
- 对应的简体中文翻译 (进行中和已归档):
70+
- Swift 6 beta (当前正在翻译)
71+
- Swift 5.x 及更早版本 (可在 [GitBook][legacy-documentations] 上阅读)
72+
73+
## 如何贡献
74+
75+
1. 首先,将此仓库 fork 到您的账户。在 issues 中认领标记为 `Swift x translation` 的翻译任务。在您 fork 的仓库中创建与 issue 对应的分支,将源分支设置为当前正在翻译的 Swift 版本 (例如,swift-6-beta-translation)。
76+
77+
2. 通过从 Swift.org 下载 toolchain 或安装 Xcode 来安装 `docc` 命令行工具。
78+
79+
> 注意:
80+
>
81+
> 如果您通过从 Swift.org 下载 toolchain 安装了 DocC,
82+
> `docc` 位于 toolchain 安装路径下的 `usr/bin/` 目录中。
83+
> 确保您的 shell 的 `PATH` 环境变量包含该目录。
84+
>
85+
> 如果您通过下载 Xcode 安装了 DocC,
86+
> 请运行 `xcrun docc preview swift-6-beta-translation.docc`
87+
88+
3. 按照下面的术语表和 [SwiftGG 排版指南][swiftgg-style-guide] 将原始 Markdown 文件的内容替换为您的中文翻译。通过 Pull Request 提交您的翻译。经 SwiftGG 成员验证后,将合并到当前的翻译分支。
89+
90+
## 参与成员
91+
92+
我们衷心感谢所有的参与成员。您可以在[这里][contributors]找到参与成员列表。
93+
94+
## Terminology Table(术语表)
4595

4696
| Term | Suggest Transition |
4797
| --- | --- |
@@ -124,10 +174,6 @@ to display a local preview in your browser.
124174
| function | 函数 |
125175
| runtime | 运行时 |
126176

127-
## Contributors
128-
129-
We extend our heartfelt thanks to all our contributors. You can find the [list of contributors here][contributors].
130-
131177
[published]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/
132178
[docc]: https://github.com/apple/swift-docc
133179
[11a2b29]: https://github.com/swiftlang/swift-book/commit/11a2b29983e9401c179d6269c9becc1256b11bc6

0 commit comments

Comments
 (0)