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

feat(i18n/zh-cn): add Chinese Simplified translation #259

Merged
merged 6 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 速查表

点击此预览以下载 PDF 文件。

<a href="https://terrastruct-site-assets.s3.us-west-1.amazonaws.com/documents/d2_cheat_sheet.pdf">
<img src={require('@site/static/img/screenshots/cheatsheet.png').default} alt="d2 速查表" style={{width:'600px'}}/>
</a>
35 changes: 35 additions & 0 deletions i18n/zh-cn/docusaurus-plugin-content-docs/current/tour/comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 注释

D2 语言支持行注释和块注释。

## 行注释

行注释以井号(`#`)开头。

它们可以单独成行:

```d2
# 注释以井号开头,直至遇到换行符或 EOF。
x -> y
```

也可以放在一行的末尾:

```d2
x -> y # 我在行尾
```

## 块注释

块注释以三个双引号(`"""`)开头和结尾:

```d2
x -> y

"""
这是一个
块注释
"""

y -> z
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
pagination_next: tour/shapes
---
import CodeBlock from '@theme/CodeBlock';
import HelloWorld from '@site/static/d2/hello-world.d2';

# Hello World

<CodeBlock className="language-d2">
{HelloWorld}
</CodeBlock>

<div
className="embedSVG" dangerouslySetInnerHTML={{__html: require('@site/static/img/generated/hello-world.svg2')}}></div>

这里声明了两个形状 `x` 和 `y` 之间的连接,并带有标签 `hello world`。