Skip to content

Commit 478e5ca

Browse files
author
SamYin Kim
committed
Merge branch 'main' into upstream-sync
2 parents b57ec7b + 568f959 commit 478e5ca

File tree

218 files changed

+3914
-4130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+3914
-4130
lines changed

.github/workflows/jekyll.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["main"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-22.04
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
38+
with:
39+
ruby-version: '3.1' # Not needed with a .ruby-version file
40+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41+
cache-version: 0 # Increment this number if you need to re-download cached gems
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v5
45+
- name: Build with Jekyll
46+
# Outputs to the './_site' directory by default
47+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
48+
env:
49+
JEKYLL_ENV: production
50+
- name: Upload artifact
51+
# Automatically uploads an artifact from the './_site' directory by default
52+
uses: actions/upload-pages-artifact@v3
53+
54+
# Deployment job
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

404.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
layout: new-layouts/base
3-
title: Internal Server Error
3+
title: 页面未找到
44
permalink: /404.html
55
---
66

77
<section id="exception">
88
<div class="content">
9-
<h1>Not Found</h1>
10-
<p>The page you're looking for can’t be found.</p>
9+
<h1>页面未找到</h1>
10+
<p>抱歉,您访问的页面不存在。</p>
1111
</div>
1212
</section>

500.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
layout: new-layouts/base
3-
title: Internal Server Error
3+
title: 服务器内部错误
44
permalink: /500.html
55
---
66

77
<section class="section">
8-
<h1>Internal Server Error</h1>
9-
The server encountered an error and was unable to complete your request.
8+
<h1>服务器内部错误</h1>
9+
服务器遇到错误,无法完成您的请求。
1010
</section>

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
swift.swiftgg.team

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GEM
77
bigdecimal (3.1.8)
88
colorator (1.1.0)
99
concurrent-ruby (1.3.4)
10-
csv (3.3.0)
10+
csv (3.3.2)
1111
em-websocket (0.5.3)
1212
eventmachine (>= 0.12.9)
1313
http_parser.rb (~> 0)
@@ -58,15 +58,15 @@ GEM
5858
rb-fsevent (0.11.2)
5959
rb-inotify (0.11.1)
6060
ffi (~> 1.0)
61-
rexml (3.3.9)
61+
rexml (3.4.0)
6262
rouge (4.5.1)
6363
safe_yaml (1.0.5)
6464
sass-embedded (1.81.0-arm64-darwin)
6565
google-protobuf (~> 4.28)
6666
terminal-table (3.0.2)
6767
unicode-display_width (>= 1.1.1, < 3)
6868
unicode-display_width (2.6.0)
69-
webrick (1.9.0)
69+
webrick (1.9.1)
7070

7171
PLATFORMS
7272
arm64-darwin

README.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
1-
# Swift.org Website
1+
# Swift.org 官方网站
22

3-
## Overview
3+
> 本项目由 [SwiftGG 翻译组](https://swiftgg.team)负责翻译维护。
44
5-
Swift.org website goals include:
65

7-
1. Welcome the curious about the Swift programming language.
8-
2. Share knowledge with the Swift users community and prospective users, including instructions for getting started with Swift as easily as possible, user guides, best practices, API documentation and feature announcements.
9-
3. Share knowledge with the Swift contributors community and prospective contributors, including contribution guides, technical details that assist contributions, project governance and legal information.
10-
4. Highlight community driven initiatives and technical work that have broad applicability to Swift users in all or some of its core usage domains.
6+
## 概述
117

12-
See [website overview](/website) for more information about the Swift.org website goals, content governance and contribution guidelines.
8+
Swift.org 网站的目标包括:
139

14-
## Technical
10+
1. 欢迎对 Swift 编程语言感兴趣的人。
11+
2. 与 Swift 用户社区和潜在用户分享知识,包括尽可能简单的 Swift 入门指南、用户指南、最佳实践、API 文档和功能公告。
12+
3. 与 Swift 贡献者社区和潜在贡献者分享知识,包括贡献指南、辅助贡献的技术细节、项目治理和法律信息。
13+
4. 突出展示社区驱动的计划和技术工作,这些工作适用于 Swift 在其所有或部分核心使用领域的用户。
1514

16-
Swift.org uses [Jekyll](https://jekyllrb.com), a blog-aware, static site generator in Ruby.
15+
有关 Swift.org 网站目标、内容治理和贡献指南的更多信息,请参阅[网站概述](/website)
1716

18-
### Running locally
17+
## 技术细节
1918

20-
Requirements
19+
Swift.org 使用 [Jekyll](https://jekyllrb.com),这是一个用 Ruby 编写的支持博客的静态站点生成器。
20+
21+
### 本地运行
22+
23+
要求:
2124
- Git
22-
- Ruby 3.3 or higher
23-
_(a Ruby installation manager, such as
24-
[rbenv](https://github.com/sstephenson/rbenv) or
25-
[RVM](https://rvm.io) is recommended, but not required)_
25+
- Ruby 3.3 或更高版本
26+
_(推荐使用 Ruby 安装管理器,如
27+
[rbenv](https://github.com/sstephenson/rbenv)
28+
[RVM](https://rvm.io),但不是必需的)_
2629
- [Bundler](https://bundler.io/)
2730

28-
To run the site locally, enter the following commands into a terminal window:
31+
要在本地运行网站,请在终端窗口中输入以下命令:
2932

3033
```shell
3134
git clone https://github.com/swiftlang/swift-org-website.git
3235
cd swift-org-website
3336
bundle install
3437
LC_ALL=en_us.UTF-8 bundle exec jekyll serve --config _config.yml,_config_dev.yml
3538
open "http://localhost:4000"
36-
```
3739

3840
If you’d like to contribute to this project, please run Prettier before submitting your pull request to ensure consistent code style across the project.
3941

@@ -48,18 +50,18 @@ npm install
4850
npm run prettify
4951
```
5052

51-
### Running in Docker
53+
### Docker 中运行
5254

53-
First build the site with Docker Compose:
55+
首先使用 Docker Compose 构建站点:
5456

5557
```bash
5658
docker compose run build
5759
```
5860

59-
Then you can run the site:
61+
然后你可以运行站点:
6062

6163
```bash
6264
docker compose up website
6365
```
6466

65-
The website will be available on `http://localhost:4000`
67+
网站将在 `http://localhost:4000` 上可用

0 commit comments

Comments
 (0)