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

l10n(zh-TW): New translations from Crowdin #2220

Merged
merged 1 commit into from
Jul 8, 2024
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
3 changes: 0 additions & 3 deletions source/zh-tw/api/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ Box is a container used for processing files in a specified folder. 「箱子」
箱子提供了兩種方法來載入檔案:`process`, `watch`,前者用於載入資料夾內的所有檔案;而後者除了執行 `process` 以外,還會繼續監看檔案變動。 `process` loads all files in the folder. `watch` does the same, but also starts watching for file changes.

```js
box.process().then(function () {
// ...
box.process().then(function () {
// ...
});

box.watch().then(function () {
// 之後可呼叫 box.unwatch() 停止檔案監看
});
});
```

## 路徑比對
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: 控制台(Console)
hexo.extend.console.register(name, desc, options, function (args) {
// ...
});
});
```

| Argument | 描述 |
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: 佈署器(Deployer)
hexo.extend.deployer.register(name, function (args) {
// ...
});
});
```

An argument `args` will be passed into the function. 在函數中會傳入 `args` 參數,此參數包含了 `_config.yml` 中的 `deploy` 設定,及使用者在終端機所傳入的參數。
14 changes: 2 additions & 12 deletions source/zh-tw/api/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ hexo.extend.filter.register(type, function() {
const { config: themeCfg } = this.theme;
if (themeCfg.fancybox) // do something...

}, priority);

// Theme configuration
const { config: themeCfg } = this.theme;
if (themeCfg.fancybox) // do something...

}, priority);
```

Expand Down Expand Up @@ -156,7 +150,6 @@ Executed after generation finishes.
hexo.extend.filter.register("after_generate", function () {
// ...
});
});
```

### template_locals
Expand All @@ -180,7 +173,6 @@ hexo.extend.filter.register("template_locals", function (locals) {
hexo.extend.filter.register("after_init", function () {
// ...
});
});
```

### new_post_path
Expand All @@ -191,7 +183,6 @@ Executed when creating a post to determine the path of new posts.
hexo.extend.filter.register("new_post_path", function (data, replace) {
// ...
});
});
```

### post_permalink
Expand All @@ -202,7 +193,6 @@ Used to determine the permalink of posts.
hexo.extend.filter.register("post_permalink", function (data) {
// ...
});
});
```

### after_render
Expand All @@ -214,8 +204,8 @@ Executed after rendering finishes. 在渲染後執行,您可參考 [渲染](re
Executed after generated files and cache are removed with `hexo clean` command.

```js
hexo.extend.filter.register("before_exit", function () {
// ...
hexo.extend.filter.register("after_clean", function () {
// remove some other temporary files
});
```

Expand Down
6 changes: 3 additions & 3 deletions source/zh-tw/api/generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ A generator builds routes based on processed files.
hexo.extend.generator.register(name, function (locals) {
// ...
});
});
```

A `locals` argument will get passed into the function, containing the [site variables](../docs/variables.html#Site-Variables). You should use this argument to get the website data, thereby avoiding having to access the database directly.
Expand Down Expand Up @@ -53,7 +52,7 @@ Next, set the `layout` attribute to render with the theme templates. We're setti
hexo.extend.generator.register("archive", function (locals) {
return {
path: "archives/index.html",
data: locals.posts,
data: locals,
layout: ["archive", "index"],
};
});
Expand All @@ -67,7 +66,8 @@ hexo.extend.generator.register("archive", function (locals) {
var pagination = require("hexo-pagination");

hexo.extend.generator.register("archive", function (locals) {
return pagination("archives/index.html", locals.posts, {
// hexo-pagination makes an index.html for the /archives route
return pagination("archives", locals.posts, {
perPage: 10,
layout: ["archive", "index"],
data: {},
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Helpers can not be accessed from `source` files.
hexo.extend.helper.register(name, function () {
// ...
});
});
```

## 範例
Expand Down
5 changes: 0 additions & 5 deletions source/zh-tw/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var hexo = new Hexo(process.cwd(), {});
hexo.init().then(function () {
// ...
});
});
```

| 選項 | 描述 | Default |
Expand All @@ -35,16 +34,13 @@ Hexo 提供了兩種方法來載入檔案:`load`, `watch`,前者用於載入
Both methods will load the list of files and pass them to the corresponding processors. After all files have been processed, they will call upon the generators to create the routes.

```js
hexo.load().then(function () {
// ...
hexo.load().then(function () {
// ...
});

hexo.watch().then(function () {
// 之後可呼叫 hexo.unwatch() 停止檔案監看
});
});
```

## 執行指令
Expand All @@ -55,7 +51,6 @@ Any console command can be called explicitly using the `call` method on the Hexo
hexo.call("generate", {}).then(function () {
// ...
});
});
```

```js
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/locals.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ hexo.locals.get("posts");
hexo.locals.set('posts', function(){
return ...
});
});
```

## 移除變數
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/migrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: Migrator
hexo.extend.migrator.register(name, function (args) {
// ...
});
});
```

An argument `args` will be passed into the function. This argument will contain the user's input into the terminal.
1 change: 0 additions & 1 deletion source/zh-tw/api/processor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: 處理器(Processor)
hexo.extend.processor.register(rule, function (file) {
// ...
});
});
```

完整說明請參照 [箱子](box.html)。
3 changes: 0 additions & 3 deletions source/zh-tw/api/renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ hexo.extend.renderer.register(
// ...
},
sync,
);
},
sync,
);
```

Expand Down
3 changes: 0 additions & 3 deletions source/zh-tw/api/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ title: 渲染
hexo.render.render({ text: "example", engine: "swig" }).then(function (result) {
// ...
});
});
```

## 渲染檔案
Expand All @@ -23,7 +22,6 @@ hexo.render.render({ text: "example", engine: "swig" }).then(function (result) {
hexo.render.render({ path: "path/to/file.swig" }).then(function (result) {
// ...
});
});
```

## 渲染選項
Expand All @@ -34,7 +32,6 @@ You can pass in an options object as the second argument.
hexo.render.render({ text: "" }, { foo: "foo" }).then(function (result) {
// ...
});
});
```

## after_render 過濾器
Expand Down
19 changes: 0 additions & 19 deletions source/zh-tw/api/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ hexo.extend.tag.register(
// ...
},
options,
);
},
options,
);
```

Expand Down Expand Up @@ -142,16 +139,6 @@ hexo.extend.tag.register('foo', function (args) {

return 'foo';
});

// Front-matter
const { title } = this; // article's (post/page) title

// Article's content
const { _content } = this; // original content
const { content } = this; // HTML-rendered content

return 'foo';
});
```

2.
Expand All @@ -176,12 +163,6 @@ module.exports = hexo => {
return 'foo';
};
};

const { title, _content, content } = this;

return 'foo';
};
};
```

[Nunjucks]: https://mozilla.github.io/nunjucks/
Expand Down
1 change: 0 additions & 1 deletion source/zh-tw/api/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var view = hexo.theme.getView("layout.swig");
view.render({ foo: 1, bar: 2 }).then(function (result) {
// ...
});
});
```

您可在 `render` 方法傳入選項作為參數,`render` 方法會先使用相應的渲染引擎進行處理,並載入 [輔助函數](helper.html),渲染完成後,會試著尋找佈局(layout)是否存在,當 `layout` 設為 `false` 或不存在時則會直接回傳渲染結果。 When rendering is complete, it will try to find whether a layout exists. If `layout` is `false` or if it doesn't exist, the result will be returned directly.
2 changes: 1 addition & 1 deletion source/zh-tw/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Deploys your website.
## render

```bash
$ hexo render <file> [file2] ...
$ hexo render <file1> [file2] ...
```

渲染檔案。
Expand Down
20 changes: 3 additions & 17 deletions source/zh-tw/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,27 +177,13 @@ include:
- ".nojekyll"
# 包括 'source/css/_typing.css'
- "css/_typing.css"
# 包括 'source/_css/' 中的任何檔案,但不包括子目錄及其其中的檔案。
- "css/_typing.css"
# Include any file in 'source/_css/'.
- "_css/*"
# Include any file and subfolder in 'source/_css/'.
- "_css/*"
# 包含 'source/_css/' 中的任何檔案和子目錄下的任何檔案
- "_css/**/*"

exclude:
# 不包括 'source/js/test.js'
- "js/test.js"
# 不包括 'source/js/' 中的檔案、但包含子目錄下的所有目錄和檔案
- "js/*"
# 不包括 'source/js/' 中的檔案和子目錄下的任何檔案
- "js/**/*"
# 不包括 'source/js/' 目錄下的所有檔案名以 'test' 開頭的檔案,但包括其它檔案和子目錄的單一檔案
- "js/test*"
# 不包括 'source/js/' 及其子目錄中任何以 'test' 開頭的檔案
- "js/**/test*"
# 不要用 exclude 来忽略 'source/_posts/' 中的檔案。
# Exclude 'source/js/test.js'.
- "js/test.js"
# Exclude any file in 'source/js/'.
- "js/*"
Expand Down Expand Up @@ -231,10 +217,10 @@ Each value in the list must be enclosed with single/double quotes.
使用 `hexo` 指令時,只要在指令後面加上 `--config` 參數與自訂配置檔 (需為 JSON 或 YAML 檔) 路徑即可指定此次想要搭配使用的配置檔。 該參數也可以是以逗號分隔的檔案列表 (注意中間不得有空格) 來滿足一次使用多個配置檔的需求。

```bash
# 使用自訂的 'custom.yml' 取代預設的 '_config.yml'
# use 'custom.yml' in place of '_config.yml'
$ hexo server --config custom.yml

# 使用多個配置檔, 有衝突時優先使用 'custom2.json'
# use 'custom.yml' & 'custom2.json', prioritizing 'custom2.json'
$ hexo server --config custom.yml,custom2.json
```

Expand Down
15 changes: 9 additions & 6 deletions source/zh-tw/docs/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ Only posts support the use of categories and tags. Categories apply to posts in

```yaml
categories:
- Diary
- Sports
- Baseball
tags:
- PS3
- Games
- Injury
- Fight
- Shocking
```

If you want to apply multiple category hierarchies, use a list of names instead of a single name. If Hexo sees any categories defined this way on a post, it will treat each category for that post as its own independent hierarchy.
Expand All @@ -66,7 +68,8 @@ If you want to apply multiple category hierarchies, use a list of names instead

```yaml
categories:
- [Diary, PlayStation]
- [Diary, Games]
- [Life]
- [Sports, Baseball]
- [MLB, American League, Boston Red Sox]
- [MLB, American League, New York Yankees]
- Rivalries
```
2 changes: 1 addition & 1 deletion source/zh-tw/docs/github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ deploy:

## Useful links

- [GitHub Pages 使用文檔](https://docs.github.com/en/pages)
- [GitHub Pages](https://docs.github.com/en/pages)
- [使用自定义 GitHub Actions 工作流进行发布](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow)
- [actions/deploy-github-pages-site](https://github.com/marketplace/actions/deploy-github-pages-site)
8 changes: 4 additions & 4 deletions source/zh-tw/docs/gitlab-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: GitLab Pages
5. Add `.gitlab-ci.yml` file to the root folder of your repo (alongside \_config.yml & package.json) with the following content (replacing `16` with the major version of Node.js you noted in previous step):

```yml
image: node:10-alpine # use nodejs v10 LTS
image: node:16-alpine
cache:
paths:
- node_modules/
Expand All @@ -20,12 +20,12 @@ before_script:

pages:
script:
- hexo generate
- npm run build
artifacts:
paths:
- public
only:
- master
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
```

6. GitLab CI 完成部署後,你應該能瀏覽 `<GitLab 用戶名>.gitlab.io` 頁面。
Expand Down
Loading