Skip to content

Commit

Permalink
l10n(zh-CN): New translations from Crowdin (#2229)
Browse files Browse the repository at this point in the history
Co-authored-by: hexo-crowdin[bot] <159447924+hexo-crowdin[bot]@users.noreply.github.com>
  • Loading branch information
hexo-crowdin[bot] committed Jul 30, 2024
1 parent d47b1f5 commit 6ddbf0c
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 50 deletions.
16 changes: 8 additions & 8 deletions source/zh-cn/api/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ box.addProcessor("posts/:id", function (file) {
});
```

Box passes the content of matched files to processors. This information can then be read straight from the `file` argument in the callback:

| 属性 | 描述 |
| -------- | --------------------------------------------- |
| `source` | 文件完整路径 |
| `path` | 文件相对于 Box 的路径 |
| `type` | 文件类型。 `create`, `update`, `skip`, `delete`|
| `params` | 从路径对比中取得的信息 |
Box 将匹配文件的内容传递给处理器。 然后,可以从回调中的 `file` 参数直接读取该信息。

| 属性 | 描述 |
| -------- | ----------------------------------------------- |
| `source` | 文件完整路径 |
| `path` | 文件相对于 Box 的路径 |
| `type` | 文件类型。 值可以是 `create``update``skip` `delete`|
| `params` | 从路径对比中取得的信息 |

Box 还提供了一些方法,让您无须手动处理文件 I/O。

Expand Down
4 changes: 2 additions & 2 deletions source/zh-cn/api/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ hexo.extend.tag.register("youtube", tagFn);

### async

启用异步模式。 This option is `false` by default.
启用异步模式。 此选项默认为 `false`

## 示例

Expand Down Expand Up @@ -90,7 +90,7 @@ hexo.extend.tag.register(
);
```

### Async Rendering
### 异步渲染

插入文件。

Expand Down
28 changes: 14 additions & 14 deletions source/zh-cn/docs/one-command-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ deploy:

[Netlify](https://www.netlify.com/) 提供持续部署(Git 触发构建)、智能全球 CDN、完整 DNS(包括自定义域)、自动 HTTPS、资产加速等功能。 它是一个统一的平台,可自动执行代码,创建高性能、易于维护的网站和网络应用程序。

There are two different ways to deploy your sites on Netlify. 首先,也是最通用的方式,就是使用Netlify提供的网页端用户界面。 前往[新建一个网站页面](https://app.netlify.com/start),选择需要关联的 Github/BitBucket/Gitlab 库,然后遵循网站提示。
Netlify 上部署站点,有两种不同的方式。 首先,也是最通用的方式,就是使用Netlify提供的网页端用户界面。 前往[新建一个网站页面](https://app.netlify.com/start),选择需要关联的 Github/BitBucket/Gitlab 库,然后遵循网站提示。

另一种方式是使用Netlify提供的命令行客户端工具 [Node based CLI](https://www.netlify.com/docs/cli/) 管理和部署您的站点。

Expand Down Expand Up @@ -185,7 +185,7 @@ deploy:

## SFTP

安装 [hexo-deployer-sftp][]。 Deploys the site via SFTP, allowing for passwordless connections using ssh-agent.
安装 [hexo-deployer-sftp][]。 通过 SFTP 部署站点,允许使用 ssh-agent 进行无密码连接。

```bash
$ npm install hexo-deployer-sftp --save
Expand All @@ -206,18 +206,18 @@ deploy:
agent: [path/to/agent/socket]
```

| 选项 | 描述 | 默认值 |
| ------------- | --------------------------------------- | ---------------- |
| `host` | 远程主机的地址 | |
| `port` | 端口 | 22 |
| `user` | 使用者名称 | |
| `pass` | 密码 | |
| `privateKey` | SSH 私钥的目录地址 | |
| `passphrase` | Optional passphrase for the private key | |
| `agent` | ssh套接字的目录地址 | `$SSH_AUTH_SOCK` |
| `remotePath` | 远程主机的根目录 | `/` |
| `forceUpload` | 覆盖现有的文件 | false |
| `concurrency` | 同时处理的 SFTP 任务的最大数量 | 100 |
| 选项 | 描述 | 默认值 |
| ------------- | ------------------ | ---------------- |
| `host` | 远程主机的地址 | |
| `port` | 端口 | 22 |
| `user` | 使用者名称 | |
| `pass` | 密码 | |
| `privateKey` | SSH 私钥的目录地址 | |
| `passphrase` | 私钥的可选密码 | |
| `agent` | ssh套接字的目录地址 | `$SSH_AUTH_SOCK` |
| `remotePath` | 远程主机的根目录 | `/` |
| `forceUpload` | 覆盖现有的文件 | false |
| `concurrency` | 同时处理的 SFTP 任务的最大数量 | 100 |

## Vercel

Expand Down
4 changes: 2 additions & 2 deletions source/zh-cn/docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Hexo 有强大的插件系统,使您能轻松扩展功能而不用修改核心
}
```

You'll also need to list your plugin as a dependency in the root `package.json` of your hexo instance in order for Hexo to detect and load it.
您还需要将您的插件列在您的 hexo 项目实例根目录下的 `package.json` 文件中的依赖项中,以便 Hexo 检测并加载它。

### 工具

Expand All @@ -45,7 +45,7 @@ You'll also need to list your plugin as a dependency in the root `package.json`

当您完成插件后,可以考虑将它发布到 [插件列表](/plugins),让更多人能够使用您的插件。 发布插件的步骤和 [更新文档](contributing.html#更新文档) 非常类似。

1. Fork [hexojs/site][]
1. 复刻 [hexojs/site][]
2. 把库(repository)复制到电脑上,并安装所依赖的插件。

```shell
Expand Down
2 changes: 1 addition & 1 deletion source/zh-cn/docs/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 服务器

## [hexo-server][]

Hexo 3.0 把服务器独立成了个别模块 您必须先安装 [hexo-server][] 才能使用。
Hexo 3.0 把服务器独立成了个别模块 您必须先安装 [hexo-server][] 才能使用。

```bash
$ npm install hexo-server --save
Expand Down
2 changes: 1 addition & 1 deletion source/zh-cn/docs/setup.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Setup
title: 安装
---

{% youtube xvIRGmKWpFM %}
Expand Down
2 changes: 1 addition & 1 deletion source/zh-cn/docs/syntax-highlight.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Syntax Highlighting
title: 语法高亮
---

Hexo 对 [highlight.js](https://github.com/highlightjs/highlight.js)[prismjs](https://github.com/PrismJS/prism) 两种代码高亮库提供内建支持。 本篇教程将展示如何将 Hexo 的内建语法高亮组件整合至你的模板中。
Expand Down
36 changes: 18 additions & 18 deletions source/zh-cn/docs/tag-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ _标签插件不应该被包裹在 Markdown 语法中,例如: `[]({% post_pa

## 引用块

Perfect for adding quotes to your post, with optional author, source and title information.
非常适用于将引文添加到您的帖子中,包括可选的作者、原文和标题信息。

**别号** quote
**别名** quote

```
{% blockquote [author[, source]] [link] [source_link_title] %}
Expand All @@ -24,7 +24,7 @@ content

### 示例

**No arguments. Plain blockquote.**
**无参数。 普通引用块。**

```
{% blockquote %}
Expand Down Expand Up @@ -74,7 +74,7 @@ Every interaction is both precious and an opportunity to delight.

## 代码块

A useful feature for adding code snippets to your post.
可以将代码片段添加到您的帖子的有用功能。

**别名:** code

Expand Down Expand Up @@ -198,23 +198,23 @@ To embed a Gist snippet:
{% iframe url [width] [height] %}
```

## Image
## 图像

在文章中插入指定大小的图片。

```
{% img [class names] /path/to/image [width] [height] '"title text" "alt text"' %}
```

## Link
## 链接

在文章中插入链接,并自动给外部链接添加 `target="_blank"` 属性。

```
{% link text url [external] [title] %}
```

## Include Code
## 包含代码

插入 `source/downloads/code` 文件夹内的代码文件。 `source/downloads/code` 不是固定的,取决于你在配置文件中 `code_dir` 的配置。

Expand Down Expand Up @@ -295,15 +295,15 @@ To embed a Gist snippet:
如果你正在使用 `v7.0.0+`,请使用 [hexo-tag-embed](https://github.com/hexojs/hexo-tag-embed) 替代。
{% endnote %}

Inserts a responsive or specified size Vimeo video.
添加响应式或指定大小的 Vimeo 视频。

```
{% vimeo video_id [width] [height] %}
```

## Include Posts
## 包含帖子

Include links to other posts.
包含到其他帖子的链接。

```
{% post_path filename %}
Expand All @@ -322,34 +322,34 @@ This will work as long as the filename of the post is `how-to-bake-a-cake.md`, e

例如:

**Display title of the post.**
**帖子的外显标题。**

`{% raw %}{% post_link hexo-3-8-released %}{% endraw %}`

{% post_link hexo-3-8-released %}

**Display custom text.**
**显示自定义文本。**

`{% raw %}{% post_link hexo-3-8-released 'Link to a post' %}{% endraw %}`

{% post_link hexo-3-8-released 'Link to a post' %}

**Escape title.**
**转义标题。**

```
{% post_link hexo-4-released 'How to use <b> tag in title' %}
```
{% post_link hexo-4-released 'How to use <b> tag in title' %}

**Do not escape title.**
**不转义标题。**

```
{% post_link hexo-4-released '<b>bold</b> custom title' false %}
```

{% post_link hexo-4-released '<b>bold</b> custom title' false %}

## Include Assets
## 包含资源

引用文章的资源,与 [资源文件夹](/zh-cn/docs/asset-folders) 一起使用。

Expand Down Expand Up @@ -472,17 +472,17 @@ url: https://example.com/blog # example

## Raw

If certain content is causing processing issues in your posts, wrap it with the `raw` tag to avoid rendering errors.
如果帖子中的某些内容会导致处理问题,将其封装在 `raw` 标签中,以避免渲染错误。

```
{% raw %}
content
{% endraw %}
```

## Post Excerpt
## 帖子摘要

在文章中使用 `<!-- more -->`,那么 `<!-- more -->` 之前的文字将会被视为摘要。 `excerpt:` value in the [front-matter](/docs/front-matter#Settings-amp-Their-Default-Values), if specified, will take precedent.
在文章中使用 `<!-- more -->`,那么 `<!-- more -->` 之前的文字将会被视为摘要。 如果在 [front-matter](/docs/front-matter#Settings-amp-Their-Default-Values) 中指定了 `excerpt:` 值,则优先使用此值。

**示例:**

Expand Down
6 changes: 3 additions & 3 deletions source/zh-cn/docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ layout.njk - 使用 Nunjucks

### source

Source 文件夹。 Place your assets (e.g. CSS and JavaScript files) here. 文件或文件夹开头名称为 `_`(下划线)或隐藏的文件会被忽略。
Source 文件夹。 将您的素材(如 CSS JavaScript 文件)放在这里。 文件或文件夹开头名称为 `_`(下划线)或隐藏的文件会被忽略。

Hexo will process and save all renderable files to the `public` folder. Non-renderable files will be copied to the `public` folder directly.
Hexo 将处理所有可渲染的文件,并将它们保存到 `public` 文件夹下。 不可渲染的文件将直接复制到 `public` 文件夹。

### 发布

当您完成主题后,可以考虑将它发布到 [主题列表](/themes),让更多人能够使用您的主题。 在发布前建议先进行 [主题单元测试](https://github.com/hexojs/hexo-theme-unit-test),确保每一项功能都能正常使用。 发布主题的步骤和 [更新文档](contributing.html#更新文档) 非常类似。

1. Fork [hexojs/site][]
1. 复刻 [hexojs/site][]
2. 把库(repository)复制到电脑上,并安装所依赖的插件。

```shell
Expand Down

0 comments on commit 6ddbf0c

Please sign in to comment.