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

Japanese translation of the documentation #2150

Merged
merged 68 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
125041f
Copy files to be translated from English
KentarouTakeda Mar 16, 2024
59dca39
Added credit to Contributors in README
KentarouTakeda Mar 22, 2024
90e1f14
wip
KentarouTakeda Mar 22, 2024
e4407e6
docs(ja): api - core
KentarouTakeda Mar 23, 2024
f2e7d22
docs(ja): api - extensions
KentarouTakeda Mar 23, 2024
a3f5c21
docs(ja): Changed the description of boolean value setting to interro…
KentarouTakeda Mar 23, 2024
be93b17
docs(ja): Unify `フロントマター` to `Front Matter`
KentarouTakeda Mar 23, 2024
0e42386
Update source/ja/docs/commands.md
KentarouTakeda Mar 23, 2024
2d63676
docs(ja): Correct `別名` to `エイリアス`
KentarouTakeda Mar 23, 2024
b862c01
docs(ja): Revert accidental deletion of tag rendering example
KentarouTakeda Mar 23, 2024
1539f4c
docs(ja): Improve wording
KentarouTakeda Mar 23, 2024
4c54206
docs(ja):Do not translate error messages
KentarouTakeda Mar 23, 2024
69107f1
Update source/ja/docs/contributing.md
KentarouTakeda Mar 23, 2024
199410a
docs(ja): Fix wording of `vX.Y.Z+` to indicate *greater than*
KentarouTakeda Mar 23, 2024
6e6b349
docs(ja): api - deployment
KentarouTakeda Mar 24, 2024
be8142d
docs(ja): wip: docs - customization
KentarouTakeda Mar 24, 2024
c6aecef
docs(ja): Do not translate argument names in code examples
KentarouTakeda Mar 24, 2024
2778119
docs(ja): docs - customization
KentarouTakeda Mar 24, 2024
ac0073d
Undo accidental file changes
KentarouTakeda Mar 24, 2024
38d906d
docs(ja): Unify `post`, `page` and `article` to `記事` and `ページ`
KentarouTakeda Mar 30, 2024
5606df9
docs(ja): Improve wording
KentarouTakeda Mar 30, 2024
667cf57
docs(ja): Fix missing file name of code block
KentarouTakeda Mar 30, 2024
9b3984e
docs(ja): Improve wording
KentarouTakeda Mar 30, 2024
fa7e346
docs(ja): Unify `:` to `: `
KentarouTakeda Mar 30, 2024
598746f
Update source/ja/api/tag.md
KentarouTakeda Mar 30, 2024
c988274
docs(ja): Correct absolute links to English documents to relative
KentarouTakeda Mar 30, 2024
d5516db
Update source/ja/docs/tag-plugins.md
KentarouTakeda Mar 30, 2024
28b21a0
Update source/ja/docs/tag-plugins.md
KentarouTakeda Mar 30, 2024
40e9e42
Update source/ja/docs/tag-plugins.md
KentarouTakeda Mar 30, 2024
d1e963d
Update source/ja/docs/github-pages.md
KentarouTakeda Mar 30, 2024
0978376
Update source/ja/docs/github-pages.md
KentarouTakeda Mar 30, 2024
8a97486
Update source/ja/docs/github-pages.md
KentarouTakeda Mar 30, 2024
79b56a8
docs(ja): For links to Japanese documents, the anchor also uses Japanese
KentarouTakeda Mar 30, 2024
2d038d8
Update source/ja/api/box.md
KentarouTakeda Mar 30, 2024
f795805
Update source/ja/api/events.md
KentarouTakeda Mar 30, 2024
6aaba2e
Update source/ja/docs/one-command-deployment.md
KentarouTakeda Mar 30, 2024
e7ddbb1
Update source/ja/docs/one-command-deployment.md
KentarouTakeda Mar 30, 2024
3b3ec42
Update source/ja/docs/plugins.md
KentarouTakeda Mar 30, 2024
e491855
Update source/ja/docs/templates.md
KentarouTakeda Mar 30, 2024
3a713b2
Update source/ja/docs/templates.md
KentarouTakeda Mar 30, 2024
316c9e6
Update source/ja/api/filter.md
KentarouTakeda Mar 30, 2024
5bfc492
Update source/ja/api/index.md
KentarouTakeda Mar 30, 2024
5402cde
Update source/ja/api/index.md
KentarouTakeda Mar 30, 2024
d983a11
Update source/ja/api/index.md
KentarouTakeda Mar 30, 2024
2351a27
Update source/ja/api/injector.md
KentarouTakeda Mar 30, 2024
2fb23a5
Update source/ja/api/posts.md
KentarouTakeda Mar 30, 2024
4fc1398
Update source/ja/api/posts.md
KentarouTakeda Mar 30, 2024
c67f4ed
Update source/ja/api/themes.md
KentarouTakeda Mar 30, 2024
324e0a4
Update source/ja/docs/commands.md
KentarouTakeda Mar 30, 2024
191916a
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
6060798
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
6a787af
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
127538f
Update source/ja/docs/index.md
KentarouTakeda Mar 30, 2024
e3532a5
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
c952d20
Update source/ja/docs/contributing.md
KentarouTakeda Mar 30, 2024
65b87cc
Update source/ja/docs/front-matter.md
KentarouTakeda Mar 30, 2024
a7813db
Update source/ja/docs/helpers.md
KentarouTakeda Mar 30, 2024
8f23415
Update source/ja/docs/helpers.md
KentarouTakeda Mar 30, 2024
c21e769
Update source/ja/docs/index.md
KentarouTakeda Mar 30, 2024
10f49fc
Update source/ja/docs/index.md
KentarouTakeda Mar 30, 2024
869b219
Update source/ja/docs/index.md
KentarouTakeda Mar 30, 2024
fc29cac
Update source/ja/docs/one-command-deployment.md
KentarouTakeda Mar 30, 2024
6e3a531
Update source/ja/docs/one-command-deployment.md
KentarouTakeda Mar 30, 2024
3c1aeb1
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
b3f1ca2
Update source/ja/docs/configuration.md
KentarouTakeda Mar 30, 2024
e47590b
docs(ja): Fix event argument wording
KentarouTakeda Mar 30, 2024
1466e43
chore: Add `Japanese` language option to pull request template
KentarouTakeda Mar 30, 2024
1eebdab
chore: Add `ja` label to pull request labeler
KentarouTakeda Mar 30, 2024
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ hexo server
- 한국어 - [lazyrodi](https:/lazyrodi)
- Deutschland - [philippnagel](https:/philippnagel)
- Portuguese (Brazilian) - [lucianobarauna](https:/lucianobarauna), [ramonsantos](https:/ramonsantos), [MathMesquita](https:/MathMesquita), [pedrorezende](https:/pedrorezende), [gregoryfm](https:/gregoryfm)
- 日本語 - [KentarouTakeda](https:/KentarouTakeda)

## License

Expand Down
3 changes: 3 additions & 0 deletions source/_data/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ pt-br:
th:
name: ภาษาไทย
disqus_lang: th
ja:
name: 日本語
disqus_lang: ja
61 changes: 61 additions & 0 deletions source/ja/api/box.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: ボックス
---
ボックスは指定されたフォルダ内のファイルを処理するために使用されるコンテナです。Hexoでは2種類のボックスが使用されます。`hexo.source`と`hexo.theme`です。前者は`source`フォルダを処理するために、後者は`theme`フォルダを処理するために使用されます。

## ファイルの読み込み

ボックスはファイルを読み込むために`process`と`watch`の2つの方法を提供します。`process`はフォルダ内のすべてのファイルを読み込みます。`watch`も同様の操作を行いますが、ファイルの変更を監視も開始します。
KentarouTakeda marked this conversation as resolved.
Show resolved Hide resolved

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

box.watch().then(function(){
// 後で box.unwatch() を呼び出して監視を停止できます。
});
```

## パスマッチング

ボックスはパスマッチングのための多くの方法を提供します。正規表現、関数、またはExpressスタイルのパターン文字列を使用できます。例えば:

``` plain
posts/:id => posts/89
posts/*path => posts/2015/title
```

詳細については[util.Pattern]を参照してください。

## プロセッサ

プロセッサはボックスの重要な要素であり、ファイルを処理するために使用されます。上記のパスマッチングを使用して、プロセッサが何を処理すべきか、正確に指定できます。新しいプロセッサを`addProcessor`メソッドで登録します。

``` js
box.addProcessor('posts/:id', function(file){
//
});
```

ボックスはマッチしたファイルの内容をプロセッサに渡します。この情報はコールバックの`file`引数から直接読むことができます:

属性 | 説明
--- | ---
`source` | ファイルの完全なパス
`path` | ファイルのボックスまでの相対パス
`type` | ファイルのタイプ。値は`create`, `update`, `skip`, `delete`があります。
`params` | パスマッチングからの情報。

ボックスはファイルIOを自分で行う必要がないようにいくつかのメソッドも提供しています。

メソッド | 説明
--- | ---
`read` | ファイルを読み込む
`readSync` | 同期的にファイルを読み込む
`stat` | ファイルのステータスを読み込む
`statSync` | 同期的にファイルのステータスを読み込む
`render` | ファイルをレンダリングする
`renderSync` | 同期的にファイルをレンダリングする

[util.Pattern]: https:/hexojs/hexo-util#patternrule
70 changes: 70 additions & 0 deletions source/ja/api/console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: コンソール
---
コンソールはHexoとユーザーとの橋渡しをします。コンソールコマンドの登録方法を説明します。

## 概要

``` js
hexo.extend.console.register(name, desc, options, function(args){
// ...
});
```

引数 | 説明
--- | ---
`name` | 名前
`desc` | 説明
`options`| オプション

関数には引数`args`が渡されます。これはユーザーがターミナルに入力する引数です。[Minimist]によって解析されます。

## オプション

### usage

コンソールコマンドの使用方法。例えば:

``` js
{usage: '[layout] <title>'}
// hexo new [layout] <title>
```

### arguments

コンソールコマンドの各引数の説明。例えば:

``` js
{
arguments: [
{name: 'layout', desc: '記事のレイアウト'},
{name: 'title', desc: '記事のタイトル'}
]
}
```

### options

コンソールコマンドの各オプションの説明。例えば:

``` js
{
options: [
{name: '-r, --replace', desc: '既存のファイルを置き換える'}
]
}
```

### desc

コンソールコマンドについてのより詳細な情報。

## 例

``` js
hexo.extend.console.register('config', '設定を表示する', function(args){
console.log(hexo.config);
});
```

[Minimist]: https:/minimistjs/minimist
14 changes: 14 additions & 0 deletions source/ja/api/deployer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: デプロイヤー
---
デプロイヤーは、複雑なコマンドなしにウェブサイトをサーバーに素早くデプロイします。

## 概要

``` js
hexo.extend.deployer.register(name, function(args){
// ...
});
```

関数には引数`args`が渡されます。これには`_config.yml`で設定された`deploy`の値と、ユーザーによるターミナルへの正確な入力が含まれます。
53 changes: 53 additions & 0 deletions source/ja/api/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: イベント
---
Hexoは[EventEmitter]を継承しています。Hexoからのイベントの発火を監視するには`on`メソッドを、イベントを発火させには`emit`メソッドを使用します。詳細については、Node.jsのAPIドキュメントを参照してください。
KentarouTakeda marked this conversation as resolved.
Show resolved Hide resolved

### deployBefore

デプロイを開始する前に発火します。

### deployAfter

デプロイが終了した後に発火します。

### exit

Hexoが終了する前に発火します。

### generateBefore

生成を開始する前に発火します。

### generateAfter

生成が終了した後に発火します。

### new

新しい記事が作成された後に発火します。このイベントには、記事データが入力されます:
Copy link
Member

Choose a reason for hiding this comment

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

原文が This event returns the post data: なので「記事データが返されます」が正しいです。

Emitted after a new post has been created. This event returns the post data:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e47590b で修正しました。


``` js
hexo.on('new', function(post){
//
});
```

データ | 説明
--- | ---
`post.path` | 記事ファイルの完全なパス
`post.content` | 記事ファイルの内容

### processBefore

プロセッサーによる処理が始まる前に発火します。このイベントには、ボックスのルートディレクトリを表すパスが入力されます。
Copy link
Member

Choose a reason for hiding this comment

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

こちらも同様です

Emitted before processing begins. This event returns a path representing the root directory of the box.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e47590b で修正しました。


### processAfter

プロセッサーによる処理が終了した後に発火します。このイベントには、ボックスのルートディレクトリを表すパスが入力されます。
Copy link
Member

Choose a reason for hiding this comment

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

こちらもです

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e47590b で修正しました。


### ready

初期化が終了した後に発火します。

[EventEmitter]: https://nodejs.org/dist/latest/docs/api/events.html
Loading