{"id":13469841,"url":"https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese","last_synced_at":"2025-03-26T09:31:28.980Z","repository":{"id":17625701,"uuid":"20429943","full_name":"SwiftGGTeam/the-swift-programming-language-in-chinese","owner":"SwiftGGTeam","description":"中文版 Apple 官方 Swift 教程《The Swift Programming Language》","archived":false,"fork":false,"pushed_at":"2024-10-22T03:05:02.000Z","size":51347,"stargazers_count":21060,"open_issues_count":2,"forks_count":5103,"subscribers_count":1267,"default_branch":"main","last_synced_at":"2024-10-29T11:21:34.047Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://gitbook.swiftgg.team/swift/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwiftGGTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["SketchK","numbbbbb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-06-03T04:44:09.000Z","updated_at":"2024-10-29T07:56:20.000Z","dependencies_parsed_at":"2023-01-14T07:00:52.836Z","dependency_job_id":"d35e9cf6-36d3-496f-bbd6-d7235e9595de","html_url":"https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese","commit_stats":null,"previous_names":["numbbbbb/the-swift-programming-language-in-chinese"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftGGTeam%2Fthe-swift-programming-language-in-chinese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftGGTeam%2Fthe-swift-programming-language-in-chinese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftGGTeam%2Fthe-swift-programming-language-in-chinese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftGGTeam%2Fthe-swift-programming-language-in-chinese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwiftGGTeam","download_url":"https://codeload.github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222131035,"owners_count":16936304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-07-31T16:00:17.491Z","updated_at":"2025-03-26T09:31:28.972Z","avatar_url":"https://github.com/SwiftGGTeam.png","language":"CSS","funding_links":["https://github.com/sponsors/SketchK","https://github.com/sponsors/numbbbbb"],"categories":["CSS","HTML","Markdown","其他"],"sub_categories":["网络服务_其他"],"readme":"# The Swift Programming Language (Simplified Chinese Version by SwiftGG)\n\n[English Version](#english-version) | [中文版本](#中文版本)\n\n## English Version\n\nThis repository contains the source for *The Swift Programming Language*\n(sometimes abbreviated as TSPL),\nwhich is published on [docs.swift.org][published]\nand built using [Swift-DocC][docc].\n\nThis repository includes the latest version of TSPL, as well as Simplified Chinese translations corresponding to different Swift versions.\n\n## Building\n\nClone this repository and run `docc preview swift-6.docc`\nin this repository's root directory.\n\nAfter running DocC, open the link that `docc` outputs\nto display a local preview in your browser.\n\n## Current Status\n\n- Latest English version of The Swift Programming Language. [Latest commit: 11a2b29][11a2b29]\n- Corresponding Simplified Chinese translations (in progress and archived):\n  - Swift 6 beta (currently in translation)\n  - Swift 5.x and earlier versions (available for reading on [GitBook][legacy-documentations])\n\n## How to Contribute\n\n1. 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).\n\n2. Install the `docc` command-line tool by either downloading the toolchain from Swift.org or installing Xcode.\n\n\u003e Note:\n\u003e\n\u003e If you installed DocC by downloading a toolchain from Swift.org,\n\u003e `docc` is located in `usr/bin/`,\n\u003e relative to the installation path of the toolchain.\n\u003e Make sure your shell's `PATH` environment variable\n\u003e includes that directory.\n\u003e\n\u003e If you installed DocC by downloading Xcode,\n\u003e run `xcrun docc preview swift-6.docc` instead.\n\n3. 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.\n\n## Contributors\n\nWe extend our heartfelt thanks to all our contributors. You can find the [list of contributors here][contributors].\n\n## 中文版本\n\n本仓库包含 *The Swift Programming Language* (缩写为 TSPL) 的源代码，\n该文档发布在 [docs.swift.org][published] 上，\n并使用 [Swift-DocC][docc] 构建。\n\n本仓库包括 TSPL 的最新版本，以及对应不同 Swift 版本的简体中文翻译。\n\n## 构建\n\n克隆此仓库并在仓库根目录运行 `docc preview swift-6.docc`。\n\n运行 DocC 后，打开 `docc` 输出的链接，即可在浏览器中显示本地预览。\n\n## 当前状态\n\n- The Swift Programming Language 的最新英文版本。[最新提交: fe0121d][https://github.com/swiftlang/swift-book/commit/fe0121d1f2d86d6139c2b424d45a7889b82ff5e2] \n- 对应的简体中文翻译 (进行中和已归档)：\n  - Swift 6 beta (当前正在翻译)\n  - Swift 5.x 及更早版本 (可在 [GitBook][legacy-documentations] 上阅读)\n\n## 如何贡献\n\n1. 首先，将此仓库 fork 到您的账户。在 issues 中认领标记为 `Swift x translation` 的翻译任务。在您 fork 的仓库中创建与 issue 对应的分支，将源分支设置为当前正在翻译的 Swift 版本 (例如，swift-6-beta-translation)。\n\n2. 通过从 Swift.org 下载 toolchain 或安装 Xcode 来安装 `docc` 命令行工具。\n\n\u003e 注意：\n\u003e\n\u003e 如果您通过从 Swift.org 下载 toolchain 安装了 DocC，\n\u003e `docc` 位于 toolchain 安装路径下的 `usr/bin/` 目录中。\n\u003e 确保您的 shell 的 `PATH` 环境变量包含该目录。\n\u003e\n\u003e 如果您通过下载 Xcode 安装了 DocC，\n\u003e 请运行 `xcrun docc preview swift-6.docc`。\n\n3. 按照下面的术语表和 [SwiftGG 排版指南][swiftgg-style-guide] 将原始 Markdown 文件的内容替换为您的中文翻译。通过 Pull Request 提交您的翻译。经 SwiftGG 成员验证后，将合并到当前的翻译分支。\n\n## 参与成员\n\n我们衷心感谢所有的参与成员。您可以在[这里][contributors]找到参与成员列表。\n\n## Terminology Table（术语表）\n\n| Term | Suggest Transition |\n| --- | --- |\n| alias | 别名 |\n| array | 数组 |\n| argument | 实参 |\n| assertion | 断言 |\n| associated type | 关联类型 |\n| associated value | 关联值 |\n| attribute | 特性或者属性，根据上下文 |\n| automatic reference counting | 自动引用计数 |\n| availability-condition | 可用性条件 |\n| base class | 基类 |\n| binary operator | 二元运算符 |\n| boxed protocol type | 封装协议类型 |\n| branch statement | 分支语句 |\n| Class Hierarchy | 类层次结构 |\n| closure | 闭包 |\n| collection | 集合 |\n| computed property | 计算属性 |\n| conditional compilation | 条件编译 |\n| conform protocol | 遵循协议 |\n| control transfer statement | 控制传递语句 |\n| convenience initializer | 便利构造器 |\n| convention | 约定 |\n| decompose | 分解 |\n| deinitialization | 析构过程 |\n| deinitializer | 析构器 |\n| designated initializer | 指定构造器 |\n| dictionary | 字典 |\n| downcast | 向下转型 |\n| enumeration | 枚举 |\n| expression | 表达式 |\n| extension | 扩展 |\n| fallback (value) | 后备值 ?? 回退值 |\n| fallthrough | 贯穿 |\n| first-class | 一等 |\n| function | 函数 |\n| generic | 泛型 |\n| getter | 不翻译 |\n| implicitly unwrapped optional | 隐式解包可选值 |\n| inheritance | 继承 |\n| initialization | 构造过程 |\n| initializer | 构造器 |\n| iterate | 迭代 |\n| labeled statement | 具名语句 |\n| list | 列表 |\n| literal (value) | 字面量 |\n| metatype type | 元类型 |\n| method | 方法 |\n| nest | 嵌套 |\n| nil-coalescing | 不译 |\n| note | 注意 |\n| opaque type | 不透明类型 |\n| operator | 运算符 |\n| optional | 可选 |\n| optional binding | 可选绑定 |\n| optional chaining | 可选链 |\n| override | 重写 |\n| parameter | 形参 |\n| playground | 不翻译 |\n| projected value | 被呈现值 |\n| property | 属性 |\n| property wrapper | 属性包装器 |\n| protocol | 协议 |\n| protocol composition type | 复合协议类型 |\n| result builder | 结果构造器 |\n| range | 区间 |\n| raw value | 原始值 |\n| runtime | 运行时 |\n| scope | 作用域 |\n| setter | 不翻译 |\n| statement | 语句 |\n| stored property | 存储属性 |\n| string interpolation | 字符串插值 |\n| structure | 结构体 |\n| subscript | 下标 |\n| ternary operator | 三元运算符 |\n| tuple | 元组 |\n| type alias | 类型别名 |\n| type annotation | 类型注解 |\n| type identifier | 类型标识符 |\n| type property | 类型属性 |\n| type inference | 类型推断 |\n| type casting | 类型转换 |\n| unary operator | 一元运算符 |\n| unwrapped | 解包 |\n| variadic parameters| 可变参数 |\n| wrapped | 包装 |\n| wrapped value | 被包装值 |\n| superclass | 父类 |\n| subclass | 子类 |\n\n[published]: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/\n[docc]: https://github.com/apple/swift-docc\n[11a2b29]: https://github.com/swiftlang/swift-book/commit/11a2b29983e9401c179d6269c9becc1256b11bc6\n[legacy-documentations]: https://swiftgg.gitbook.io/swift/\n[swiftgg-style-guide]: https://github.com/SwiftGGTeam/translation/blob/master/SwiftGG%20排版指南.md\n[contributors]: https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/blob/gh-pages/source/contributors.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSwiftGGTeam%2Fthe-swift-programming-language-in-chinese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSwiftGGTeam%2Fthe-swift-programming-language-in-chinese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSwiftGGTeam%2Fthe-swift-programming-language-in-chinese/lists"}