|
1 |
| -《The Swift Programming Language》in Chinese |
2 |
| -============================================= |
| 1 | +# The Swift Programming Language (Simplified Chinese Version by SwiftGG) |
3 | 2 |
|
4 |
| -中文版 Apple 官方 Swift 教程《The Swift Programming Language》 |
| 3 | +This repository contains the source for *The Swift Programming Language* |
| 4 | +(sometimes abbreviated as TSPL), |
| 5 | +which is published on [docs.swift.org][published] |
| 6 | +and built using [Swift-DocC][docc]. |
5 | 7 |
|
6 |
| -[英文原版在线版](https://docs.swift.org/swift-book/) |
| 8 | +This repository includes the latest version of TSPL, as well as Simplified Chinese translations corresponding to different Swift versions. |
7 | 9 |
|
8 |
| -# 在线阅读 |
| 10 | +## Building |
9 | 11 |
|
10 |
| -使用 GitBook 制作,可以在 [GitBook](https://swiftgg.gitbook.io/swift/) 网站阅读。 |
| 12 | +Clone this repository and run `docc preview swift-6-beta-translation.docc` |
| 13 | +in this repository's root directory. |
11 | 14 |
|
12 |
| -# 当前阶段 |
| 15 | +After running DocC, open the link that `docc` outputs |
| 16 | +to display a local preview in your browser. |
13 | 17 |
|
14 |
| -- 更新到 Swift 5.7,2022-06-06 |
15 |
| -- 更新到 Swift 5.6,2022-03-14 |
16 |
| -- 更新到 Swift 5.5,2021-06-07 |
17 |
| -- 更新到 Swift 5.4,2021-04-26 |
18 |
| -- 更新到 Swift 5.3,2020-09-16 |
19 |
| -- 更新到 Swift 5.2,2020-02-15 |
20 |
| -- 更新到 Swift 5.1,2019-11-11 |
21 |
| -- 更新到 Swift 5.0,2019-04-05 |
22 |
| -- 更新到 Swift 4.5,2019-03-16 |
23 |
| -- 更新到 Swift 4.2,2019-01-29 |
24 |
| -- 更新到 Swift 4.1,2018-04-12,感谢 [@Mylittleswift](https://github.com/Mylittleswift) |
25 |
| -- 更新到 Swift 3.0,2016-09-23 |
| 18 | +## Current Status |
26 | 19 |
|
| 20 | +- Latest English version of The Swift Programming Language. [Latest commit: 11a2b29][11a2b29] |
| 21 | +- Corresponding Simplified Chinese translations (in progress and archived): |
| 22 | + - Swift 6 beta (currently in translation) |
| 23 | + - Swift 5.x and earlier versions (available for reading on [GitBook][legacy-documentations]) |
27 | 24 |
|
28 |
| -# 贡献力量 |
| 25 | +## How to Contribute |
29 | 26 |
|
30 |
| -如果想做出贡献的话,你可以: |
| 27 | +1. Fork this repository to your account. Claim a translation task labeled as `Swift x translation` in the issues. Create a branch in your forked repository corresponding to the issue, setting the source branch to the current Swift version being translated (e.g., swift-6-beta-translation). |
31 | 28 |
|
32 |
| -- 参与翻译 |
33 |
| -- 帮忙校对,挑错别字、病句等等 |
34 |
| -- 提出修改建议 |
35 |
| -- 提出术语翻译建议 |
| 29 | +2. Install the `docc` command-line tool by either downloading the toolchain from Swift.org or installing Xcode. |
36 | 30 |
|
37 |
| -# 翻译建议 |
| 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. |
38 | 41 |
|
39 |
| -如果你有兴趣参与项目,请仔细阅读说明: |
| 42 | +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. |
40 | 43 |
|
41 |
| -排版格式和流程说明: |
| 44 | +## Terminology Table |
42 | 45 |
|
43 |
| -- 翻译排版格式要求参考 SwiftGG [排版指南](https://github.com/SwiftGGTeam/translation/blob/master/SwiftGG%20排版指南.md) |
44 |
| -- Pull Request 发起方式参考 SwiftGG [Pull Request 说明](https://github.com/SwiftGGTeam/translation/blob/master/%E7%BF%BB%E8%AF%91%E6%B5%81%E7%A8%8B%E6%A6%82%E8%BF%B0%E5%8F%8APR%E8%AF%B4%E6%98%8E.md#%E5%A6%82%E4%BD%95%E5%8F%91%E8%B5%B7-pull-request) |
45 |
| - |
46 |
| -原版文档差异比较: |
47 |
| - |
48 |
| -在翻译时可以通过 Calibre 软件对 [document 目录下](https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/tree/gh-pages/document) 不同版本的文档进行 diff,检查待更新部分。 |
49 |
| - |
50 |
| -diff 操作如下: |
51 |
| - |
52 |
| -将最新文档加入到 Calibre 中,点击 **Edit Book**,然后在编辑界面选择 **File** -> **Compare to other book** 检查各模块的更新内容,详见 [链接](https://manual.calibre-ebook.com/diff.html)。 |
53 |
| - |
54 |
| -其他说明: |
55 |
| - |
56 |
| -- 相关术语请严格按照术语表来翻译,如果有问题可以发 Issue 大家一起讨论 |
57 |
| -- 使用 Markdown 进行翻译,文件名必须使用英文 |
58 |
| -- 翻译后的文档请放到 source 文件夹下的对应章节中,然后 Pull Request 即可,我们会用 GitBook 编译成网页 |
59 |
| -- 有其他任何问题都欢迎发 Issue |
60 |
| - |
61 |
| -# 术语表 |
62 |
| - |
63 |
| -翻译术语的时候请参考这个对照表: |
64 |
| - |
65 |
| -| 术语 | 备选翻译 | |
| 46 | +| Term | Suggest Transition | |
66 | 47 | | --- | --- |
|
67 | 48 | | result builder | 结果构造器 |
|
68 |
| -| property wrapper | 属性包装器([翻译相关讨论](https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/issues/982#issuecomment-536244784)) | |
| 49 | +| property wrapper | 属性包装器 | |
69 | 50 | | projected value | 被呈现值 |
|
70 | 51 | | wrapped value | 被包装值 |
|
71 | 52 | | argument | 实参 |
|
@@ -143,11 +124,13 @@ diff 操作如下:
|
143 | 124 | | function | 函数 |
|
144 | 125 | | runtime | 运行时 |
|
145 | 126 |
|
146 |
| -# 贡献者 |
147 |
| - |
148 |
| -[贡献者列表](https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/blob/gh-pages/source/contributors.md),感谢大家! |
149 |
| - |
| 127 | +## Contributors |
150 | 128 |
|
| 129 | +We extend our heartfelt thanks to all our contributors. You can find the [list of contributors here][contributors]. |
151 | 130 |
|
152 |
| -# 协议 |
153 |
| -和 [苹果官方文档](https://swift.org/documentation/) 协议一致:[Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/)。 |
| 131 | +[published]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/ |
| 132 | +[docc]: https://github.com/apple/swift-docc |
| 133 | +[11a2b29]: https://github.com/swiftlang/swift-book/commit/11a2b29983e9401c179d6269c9becc1256b11bc6 |
| 134 | +[legacy-documentations]: https://swiftgg.gitbook.io/swift/ |
| 135 | +[swiftgg-style-guide]: https://github.com/SwiftGGTeam/translation/blob/master/SwiftGG%20排版指南.md |
| 136 | +[contributors]: https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/blob/gh-pages/source/contributors.md |
0 commit comments