Skip to content

Commit bfa6e12

Browse files
committed
translate zh /docs and add github action
1 parent 1c4baa7 commit bfa6e12

Some content is hidden

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

61 files changed

+19378
-99
lines changed

.github/workflows/i18n.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lingo.dev i18n
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
i18n:
14+
name: Run i18n
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: lingodotdev/lingo.dev@main
19+
env:
20+
GH_TOKEN: ${{ github.token }}
21+
with:
22+
api-key: ${{ secrets.LINGODOTDEV_API_KEY }}
23+
pull-request: true
24+
pull-request-title: "docs: update translations"
25+
commit-message: "docs: update translations"

content/docs/zh/clients/game-sdks.mdx

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
title: Solana 游戏 SDK
3+
description: Solana 游戏 SDK 列表,帮助您开始创建您的第一个 Solana 游戏
4+
h1: Solana 游戏 SDK
5+
---
6+
7+
由于 Solana 是一个高性能区块链,具有低费用和快速交易的特点,一个优秀的游戏开发者社区已经围绕它形成。
8+
9+
在这里,您可以找到关于生态系统中可用的 Solana 游戏开发 SDK 的详细信息。所有 SDK 都是开源的,由社区构建。如果您正在开发自己的 SDK,欢迎向本页面提交 PR 并添加它。
10+
11+
## Unity SDK
12+
13+
Unity 游戏引擎以其对初学者友好的方法和跨平台支持而闻名,包括 WebGL、iOS 和 Android。一次构建,随处导出。
14+
15+
* [文档](https://docs.magicblock.gg/introduction)
16+
* [源代码](https://github.com/magicblock-labs/Solana.Unity-SDK)
17+
* [示例游戏](https://github.com/solana-developers/solana-game-examples)
18+
* [井字游戏](https://blog.magicblock.gg/bolt-tic-tac-toe/)
19+
20+
Solana Unity SDK 由 [Magicblock](https://www.magicblock.gg/) 维护,并提供:
21+
22+
* NFT 支持
23+
* Candy machine 集成
24+
* 交易功能
25+
* RPC 功能
26+
* Phantom 深度链接
27+
* WebGL 连接器
28+
* 可靠的 WebSocket 连接支持
29+
* 移动钱包适配器
30+
* 用于自动批准交易的会话密钥
31+
* Anchor 客户端代码生成等更多功能。
32+
33+
## Godot SDK
34+
35+
[Godot 引擎](https://godotengine.org/)
36+
是一个开源游戏引擎,在过去几年中获得了大量支持。Solana SDK for Godot 由
37+
[ZenRepublic](https://twitter.com/ZenRepublicNDM)
38+
[Virus-Axel](https://twitter.com/AxelBenjam)
39+
维护。它提供钱包适配器集成、交易功能、RPC 函数和 Anchor 客户端代码生成。甚至还有功能完备的 Metaplex
40+
[candy machine 集成](https://zenwiki.gitbook.io/solana-godot-sdk-docs/guides/setup-candy-machine)
41+
42+
* [Solana Godot 引擎 SDK](https://github.com/Virus-Axel/godot-solana-sdk)
43+
* [文档](https://zenwiki.gitbook.io/solana-godot-sdk-docs)
44+
* [演示](https://github.com/ZenRepublic/GodotSolanaSDKDemoPackage)
45+
* [教程](https://www.youtube.com/watch?v=tszFPInYmXQ)
46+
* [维护者](https://twitter.com/ZenRepublicNDM)
47+
48+
## Turbo.Computer - Rust 游戏引擎
49+
50+
Turbo 是一个从零开始构建的 Rust 游戏引擎,专注于 Solana,具有轻量级架构和快速迭代时间。它对初学者友好,并提供完整的 Solana
51+
RPC 支持。你甚至可以使用其 AI 工具生成完整游戏。
52+
53+
* [网站](https://turbo.computer/)
54+
* [文档](https://docs.turbo.computer/)
55+
* [Twitter 账号](https://twitter.com/makegamesfast)
56+
* [维护者](https://twitter.com/jozanza)
57+
58+
# Honeycomb 协议
59+
60+
Honeycomb 提供一套链上程序和状态压缩工具,处理 Solana 虚拟机(SVM)中所有关键游戏生命周期功能和可组合性。它支持多种 NFT 功能,如质押、任务、战利品箱、玩家档案、状态压缩、自动批准交易等。
61+
62+
* [Twitter 账号](https://twitter.com/honeycomb_prtcl)
63+
* [文档](https://docs.honeycombprotocol.com/)
64+
65+
# Unreal SDKs
66+
67+
Unreal
68+
Engine 以其出色的视觉效果和基于节点的脚本框架而闻名。目前有多个由不同公司维护的 Solana
69+
SDK。
70+
71+
### Varmeta Unreal SDK
72+
73+
VAR
74+
META 提供了一个开源的虚幻引擎SDK,用于将Solana区块链功能集成到虚幻引擎项目中。它使开发者能够直接在虚幻引擎内与Solana的智能合约交互、管理钱包和执行交易。
75+
76+
* [Varmeta的虚幻引擎SDK](https://github.com/VAR-META-Tech/UnrealSolanaSDK)
77+
* [维护者](https://www.var-meta.com/)
78+
79+
### Bitfrost虚幻引擎SDK
80+
81+
Bitfrost正在开发一款虚幻引擎SDK,该SDK已在最近的Solana游戏开发马拉松中的多个游戏中使用。它提供C#`solnet`在C++和蓝图中的支持,metaplex
82+
NFT铸造功能,游戏内钱包支付处理器示例等。
83+
84+
* [Bitfrost的Solana虚幻引擎SDK](https://github.com/Bifrost-Technologies/Solana-Unreal-SDK)
85+
* [教程](https://www.youtube.com/watch?v=S8fm8mFeUkk)
86+
* [维护者](https://twitter.com/BifrostTitan)
87+
88+
### Thugz虚幻引擎SDK
89+
90+
Thugz是一家技术工作室和NFT项目,同时也在维护一个开源的Solana虚幻引擎SDK。它提供了大量以NFT为中心的功能,该插件也兼容iOS和Android平台。
91+
92+
* [Thugz区块链插件](https://www.fab.com/listings/a7e220ba-93e5-4a3b-99e7-17b13da76f05)
93+
* [代码库](https://github.com/ThugzLabs/Thugz-BC-Plugin-Packaged-for-UE5.4)
94+
* [文档](https://thugzblockchainplugin-docs.vercel.app/)
95+
* [视频教程](https://www.youtube.com/watch?v=dS7sTZd_E9U\&ab_channel=ThugzNFT)
96+
97+
### Star Atlas基础工具包
98+
99+
[Star Atlas](https://staratlas.com/)团队开源了他们的部分SDK堆栈,称为*Foundation
100+
Kit*。虽然它不再积极维护,但可以作为您项目的起点。
101+
102+
* [Star Atlas虚幻引擎SDK](https://github.com/staratlasmeta/FoundationKit)
103+
* [教程](https://www.youtube.com/watch?v=S8fm8mFeUkk)
104+
105+
## Next.js/React + Anchor
106+
107+
在Solana上构建的最简单方式之一是使用Web3js JavaScript框架结合Solana
108+
Anchor框架。对于更复杂的游戏,我们建议考虑使用游戏引擎,如[Unity](#unity-sdk)
109+
[Unreal](#unreal-sdks)
110+
111+
设置基于Next.js的游戏的最快方法:
112+
113+
```shell
114+
npx create-solana-game your-game-name
115+
```
116+
117+
这将生成一个很好的起始应用程序,包含`wallet-adapter`支持,一个Anchor程序,一个React应用程序,以及一个已配置好可以一起工作的Unity客户端。使用Next.js的好处是你可以在后端和前端使用相同的代码,加快开发速度。
118+
119+
* [Web3.js](https://solana.com/docs/clients/javascript)
120+
* [视频教程](https://www.youtube.com/watch?v=fnhivg_pemI\&t=1s\&ab_channel=Solana)
121+
122+
> 如果你正在开发Solana SDK并想将你的预设添加到预设中,你可以在这里提交PR:
123+
> [Solana游戏预设](https://github.com/solana-developers/solana-game-preset)
124+
125+
## Phaser
126+
127+
一个快速、免费且有趣的开源框架,用于Canvas和WebGL驱动的基于浏览器的游戏。[Phaser](https://phaser.io/)是在Solana上开始游戏开发的绝佳方式。Phaser
128+
Solana平台游戏模板是你游戏的绝佳起点。
129+
130+
* [源代码](https://github.com/Bread-Heads-NFT/phaser-solana-platformer-template)
131+
* [维护者](https://twitter.com/blockiosaurus)
132+
133+
## Flutter
134+
135+
Flutter是由Google维护的开源框架,用于从单一代码库构建美观、原生编译的多平台应用程序。Solana
136+
Flutter SDK由[Espresso Cash](https://www.espressocash.com/)团队维护。
137+
138+
* [源代码](https://github.com/espresso-cash/espresso-cash-public)
139+
140+
## Python
141+
142+
Python是一种易于学习且广泛使用的编程语言(常用于机器学习应用)。Seahorse框架使开发者能够用Python编写Solana程序。Seahorse建立在Anchor框架之上,将Python代码转换为基于Anchor的Rust代码。Seahorse目前处于测试阶段。
143+
144+
* [文档](https://www.seahorse.dev/)
145+
* [Github仓库](https://github.com/solana-developers/seahorse)
146+
* [Anchor演示示例](https://beta.solpg.io/tutorials/hello-seahorse)
147+
148+
## 原生C\#
149+
150+
Web3js到C#的原始移植。它带有大量功能,如交易处理、RPC函数和Anchor客户端代码生成。
151+
152+
* [源代码和文档](https://github.com/bmresearch/Solnet/blob/master/docs/articles/getting_started.md)

content/docs/zh/clients/go.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Go SDK
3+
description: 了解如何使用Go SDK(gagliardetto/solana-go) 与Solana进行交互。
4+
h1: Solana的Go SDK
5+
---
6+
7+
有一个[Go SDK](https://github.com/gagliardetto/solana-go)支持与Solana交互的大多数功能。如果你正在使用Anchor开发Solana程序,你可以使用[anchor-go](https://github.com/gagliardetto/anchor-go)配合你的idl生成兼容Golang的客户端。
8+
9+
## 安装
10+
11+
```bash title="Terminal"
12+
go get github.com/gagliardetto/[email protected]
13+
```
14+
15+
## 更多文档
16+
17+
请访问[Go SDK文档](https://github.com/gagliardetto/solana-go?tab=readme-ov-file#installation)
18+
获取更多关于将此Go SDK与Solana一起使用的信息。

content/docs/zh/clients/java.mdx

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Java SDK
3+
description: 了解如何使用Java SDK(sava-software/sava) 与Solana进行交互。
4+
h1: Solana的Java SDK
5+
---
6+
7+
有一个由[Java SDK](https://sava.software/welcome)
8+
[Sava Engineering](https://sava.engineering/)开发的,它支持大多数与Solana交互的功能。如果你正在使用Anchor开发Solana程序,你可以使用[anchor-src-gen](https://sava.software/utilities/anchor-src-gen)
9+
与你的idl一起生成Java兼容的客户端。
10+
11+
## 安装
12+
13+
### Maven
14+
15+
```xml title="pom.xml"
16+
<dependencies>
17+
<dependency>
18+
<groupId>software.sava</groupId>
19+
<artifactId>sava-core</artifactId>
20+
<version>VERSION</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>software.sava</groupId>
24+
<artifactId>sava-rpc</artifactId>
25+
<version>VERSION</version>
26+
</dependency>
27+
</dependencies>
28+
29+
<repositories>
30+
<repository>
31+
<id>gpr-sava</id>
32+
<name>sava</name>
33+
<url>https://maven.pkg.github.com/sava-software/sava</url>
34+
</repository>
35+
<repository>
36+
<id>gpr-json-iterator</id>
37+
<name>json-iterator</name>
38+
<url>https://maven.pkg.github.com/comodal/json-iterator</url>
39+
</repository>
40+
</repositories>
41+
```
42+
43+
```xml title="settings.xml"
44+
<settings>
45+
<servers>
46+
<server>
47+
<id>gpr-sava</id>
48+
<username>GITHUB_USERNAME</username>
49+
<password>GITHUB_PERSONAL_ACCESS_TOKEN</password>
50+
</server>
51+
<server>
52+
<id>gpr-json-iterator</id>
53+
<username>GITHUB_USERNAME</username>
54+
<password>GITHUB_PERSONAL_ACCESS_TOKEN</password>
55+
</server>
56+
</servers>
57+
</settings>
58+
```
59+
60+
### Gradle
61+
62+
```bash title="build.gradle"
63+
repositories {
64+
maven {
65+
url = "https://maven.pkg.github.com/sava-software/sava"
66+
credentials {
67+
username = GITHUB_USERNAME
68+
password = GITHUB_PERSONAL_ACCESS_TOKEN
69+
}
70+
}
71+
maven {
72+
url = "https://maven.pkg.github.com/comodal/json-iterator"
73+
credentials {
74+
username = GITHUB_USERNAME
75+
password = GITHUB_PERSONAL_ACCESS_TOKEN
76+
}
77+
}
78+
}
79+
80+
dependencies {
81+
implementation "software.sava:sava-core:$VERSION"
82+
implementation "software.sava:sava-rpc:$VERSION"
83+
}
84+
```
85+
86+
## 更多文档
87+
88+
请访问[Sava Software文档](https://sava.software/welcome) 获取有关将此Java
89+
SDK与Solana一起使用的更多信息。
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Typescript SDK
3+
description:
4+
了解如何使用JavaScript/TypeScript客户端 库(@solana/web3.js)与Solana交互。
5+
h1: Solana的JavaScript SDK
6+
---
7+
8+
##
9+
10+
有两个对使用Typescript开发有用的包:
11+
12+
* [`@solana/web3.js`](https://www.npmjs.com/package/@solana/web3.js)
13+
* [`@solana/wallet-adapter`](https://github.com/anza-xyz/wallet-adapter)
14+
15+
你可以使用`npx create-solana-dapp`创建一个同时使用这两个包的脚手架。
16+
17+
## 安装
18+
19+
### yarn
20+
21+
```shell title="Terminal"
22+
yarn add @solana/web3.js@1
23+
```
24+
25+
### npm
26+
27+
```shell title="Terminal"
28+
npm install --save @solana/web3.js@1
29+
```
30+
31+
### 捆绑包
32+
33+
```html title="index.html"
34+
<!-- 开发版本(未压缩) -->
35+
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
36+
37+
<!-- 生产版本(压缩) -->
38+
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.min.js"></script>
39+
```
40+
41+
## 使用方法
42+
43+
#### Javascript
44+
45+
```javascript
46+
const solanaWeb3 = require("@solana/web3.js");
47+
console.log(solanaWeb3);
48+
```
49+
50+
#### ES6
51+
52+
```javascript
53+
import * as solanaWeb3 from "@solana/web3.js";
54+
console.log(solanaWeb3);
55+
```
56+
57+
#### 浏览器捆绑包
58+
59+
```javascript
60+
// solanaWeb3由捆绑脚本在全局命名空间中提供
61+
console.log(solanaWeb3);
62+
```

content/docs/zh/clients/meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"title": "Solana SDK",
3+
"pages": ["rust", "javascript", "go", "python", "java", "game-sdks"],
4+
"defaultOpen": false
5+
}

content/docs/zh/clients/python.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Python SDK
3+
description: 了解如何使用Python SDK (michaelhly/solana-py)与Solana交互。
4+
h1: Solana的Python SDK
5+
---
6+
7+
有一个[Python SDK](https://github.com/michaelhly/solana-py)支持大多数与Solana交互的功能。如果你正在使用Anchor开发Solana程序,你可以使用[anchor-py](https://github.com/kevinheavey/anchorpy)配合你的idl生成Python兼容的客户端。
8+
9+
## 安装
10+
11+
```bash title="Terminal"
12+
pip install solders
13+
pip install solana
14+
```
15+
16+
## 更多文档
17+
18+
请访问[Python SDK文档](https://github.com/michaelhly/solana-py?tab=readme-ov-file#general-usage)获取更多关于在Solana上使用Python
19+
SDK的信息。

0 commit comments

Comments
 (0)