Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: chinese docs update #1484

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sansx
Copy link
Contributor

@sansx sansx commented Jan 22, 2025

Issue

This PR improved the Chinese localization docs for Tact base on #942 #1206.

Format check

  • yarn fmt:check -w
  • running yarn build inside docs/
  • update relative links start with /zh-cn

preview:
https://tact-git-chinesedocsupdate-townsquarexyz.vercel.app?_vercel_share=6oGTR7LEJrx63QCWiACVusaLgPjyaTGs

Checklist

  • I have updated CHANGELOG.md
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

@sansx sansx requested a review from a team as a code owner January 22, 2025 07:45
@novusnota novusnota self-requested a review January 22, 2025 12:34
@novusnota
Copy link
Member

novusnota commented Jan 22, 2025

Awesome, thanks for the follow-up! I'll go over this PR today and correct some http(s) links here and there, especially in book/config :)

@novusnota novusnota added this to the Doc: 2025-01 milestone Jan 22, 2025
Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tremendous work! Left a couple of nitpicks — once resolved, we can merge this


:::

## `$schema` {#schema}

编辑器可使用[JSON 模式](https://json-schema.org/) 文件提供自动完成和悬停提示:[configSchema.json](http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json)。
编辑器可使用[JSON 模式](https://json-schema.org/) 文件提供自动完成和悬停提示:[configSchema.json](http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
编辑器可使用[JSON 模式](https://json-schema.org/) 文件提供自动完成和悬停提示:[configSchema.json](http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json)
编辑器可使用[JSON 模式](https://json-schema.org/) 文件提供自动完成和悬停提示:[configSchema.json](http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json)

Some links have changed


只需在配置文件顶部添加 `$schema` 字段即可:

```json filename="tact.config.json" {2}
{
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",
"projects":[]
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json",
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",

Some links have changed

@@ -372,7 +373,7 @@ Value | Description

```json filename="tact.config.json" copy=false
{
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/schemas/configSchema.json",
"$schema": "http://raw.githubusercontent.com/tact-lang/tact/main/src/config/configSchema.json",

Some links have changed


| 退出码 | 来源 | 说明 |
| :----------------------------------------------------------------------------------------------- | :------------------------------ | :------------------------------------- |
| [$0$](#0) | [计算][c]和[动作][a]阶段 | 标准成功执行退出码 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table seems a bit too broad :)

| [`@stdlib/stoppable`][6] | 允许合同停止的特征。 需要 [@stdlib/ownable][5]。 | [`Stoppable{:tact}`][stp],[`Resumable{:tact}`][res]。 |
| 库 | 描述 | 常用的 API |
| :----------------------------------------------------------------------------- | :------------------------------------------------------ | :---------------------------------------------------------------------- |
| [`@stdlib/config`][1] | 配置和选举地址检索。 | [`getConfigAddress(){:tact}`][gca], [`getElectorAddress(){:tact}`][gea] |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large gaps

| 数据 | [`单元格{:tact}`][单元格] | [合同](/zh-cn/book/contracts)的初始数据(合同的 `init(){:tact}`函数参数 |
| 字段 | 类型 | 说明 |
| :----- | :--------------------- | :-------------------------------------------------- |
| `code` | [`Cell{:tact}`][cell]C | [合约](/zh-cn/book/contracts)的初始代码(编译后的字节码) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `code` | [`Cell{:tact}`][cell]C | [合约](/zh-cn/book/contracts)的初始代码(编译后的字节码) |
| `code` | [`Cell{:tact}`][cell] | [合约](/zh-cn/book/contracts)的初始代码(编译后的字节码) |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants