Skip to content

Commit

Permalink
Translated Adding a delete button, and Fixed example repository change
Browse files Browse the repository at this point in the history
  • Loading branch information
atachibana committed Nov 21, 2023
1 parent 65d2fbd commit 1882173
Show file tree
Hide file tree
Showing 12 changed files with 454 additions and 43 deletions.
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ Everything you need to know to [start contributing to the block editor](/docs/co

### 主な変更

2023/11/21
- [削除ボタンの追加](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/5-adding-a-delete-button/) - 翻訳

2023/11/11
- 多数 - JSXを使用しないサンプルの削除
- 多数 - サンプルリポジトリを変更 [block-development-examples](https://github.com/WordPress/block-development-examples)
Expand Down
2 changes: 0 additions & 2 deletions docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ registerBlockType( 'gutenberg-examples/example-dynamic', {
```

<!--
Note that this code uses the `wp-server-side-render` package but not `wp-data`. Make sure to update the dependencies in the PHP code. You can use wp-scripts to automatically build dependencies (see the [gutenberg-examples repo](https://github.com/WordPress/gutenberg-examples/tree/trunk/blocks-jsx/01-basic-esnext) for PHP code setup).
Note that this code uses the `wp-server-side-render` package but not `wp-data`. Make sure to update the dependencies in the PHP code. You can use wp-scripts to automatically build dependencies (see the [block-development-examples repo](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/basic-esnext-a2ab62) for PHP code setup).
-->
Expand Down
8 changes: 4 additions & 4 deletions docs/how-to-guides/data-basics/1-data-basics-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ Congratulations! You are now ready to start building the app!
<!--
## What's next?
-->
## 次のステップ
## 次は ?

<!--
- Previous part: [Introduction](/docs/how-to-guides/data-basics/README.md)
- Next part: [Building a basic list of pages](/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md)
- (optional) Review the [finished app](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) in the block-development-examples repository
-->
- 前のステップ: [はじめに](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/)
- 次のステップ: [簡単なページリストの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/2-building-a-list-of-pages)
- (オプション) gutenberg-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
- 前のパート: [はじめに](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/)
- 次のパート: [簡単なページリストの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/2-building-a-list-of-pages)
- (オプション) block-development-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照

[原文](https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/data-basics/1-data-basics-setup.md)
21 changes: 10 additions & 11 deletions docs/how-to-guides/data-basics/2-building-a-list-of-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Let’s see how we can get there step by step.
<!--
## Step 1: Build the PagesList component
-->
## ステップ 1: PagesList コンポーネントの構築
## ステップ1: PagesList コンポーネントの構築

<!--
Let’s start by building a minimal React component to display the list of pages:
Expand Down Expand Up @@ -54,7 +54,7 @@ Note that this component does not fetch any data yet, only presents the hardcode
<!--
## Step 2: Fetch the data
-->
## ステップ 2: データの取得
## ステップ2: データの取得
<!--
The hard-coded sample page isn’t very useful. We want to display your actual WordPress pages so let’s fetch the actual list of pages from the [WordPress REST API](https://developer.wordpress.org/rest-api/).
Expand Down Expand Up @@ -183,7 +183,7 @@ Refreshing the page should display a list similar to this one:
<!--
## Step 3: Turn it into a table
-->
## ステップ 3: テーブルの中へ
## ステップ3: テーブルの中へ
```js
function PagesList( { pages } ) {
Expand Down Expand Up @@ -211,7 +211,7 @@ function PagesList( { pages } ) {
<!--
## Step 4: Add a search box
-->
## ステップ 4: 検索ボックスの追加
## ステップ4: 検索ボックスの追加
<!--
The list of pages is short for now; however, the longer it grows, the harder it is to work with. WordPress admins typically solves this problem with a search box – let’s implement one too!
Expand Down Expand Up @@ -401,7 +401,7 @@ All in all, the utilities built into core-data are designed to solve the typical
<!--
## Step 5: Loading Indicator
-->
## ステップ 5: インジケータのロード
## ステップ5: インジケータのロード
<!--
There is one problem with our search feature. We can’t be quite sure whether it’s still searching or showing no results:
Expand Down Expand Up @@ -603,17 +603,16 @@ All that’s left is to refresh the page and enjoy the brand new status indicato
<!--
## What's next?
-->
## 次のステップ
## 次は ?
<!--
* **Previous part:** [Setup](/docs/how-to-guides/data-basics/1-data-basics-setup.md)
* **Next part:** [Building an edit form](/docs/how-to-guides/data-basics/3-building-an-edit-form.md)
* (optional) Review the [finished app](https://github.com/WordPress/gutenberg-examples/tree/trunk/09-code-data-basics-esnext) in the gutenberg-examples repository
* (optional) Review the [finished app](https://github.com/WordPress/gutenberg-examples/tree/trunk/non-block-examples/09-code-data-basics-esnext) in the gutenberg-examples repository
* (optional) Review the [finished app](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) in the block-development-examples repository
-->
* **前のステップ:** [セットアップ](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/1-data-basics-setup)
* **次のステップ:** [編集フォームの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/3-building-an-edit-form)
* (オプション) gutenberg-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
* **前のパート:** [セットアップ](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/1-data-basics-setup)
* **次のパート:** [編集フォームの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/3-building-an-edit-form)
* (オプション) block-development-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
[原文](https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md)
22 changes: 11 additions & 11 deletions docs/how-to-guides/data-basics/3-building-an-edit-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This part is about adding an *Edit* feature to our app. Here's a glimpse of what
<!--
### Step 1: Add an _Edit_ button
-->
### ステップ 1: 「編集」ボタンの追加
### ステップ1: 「編集」ボタンの追加

<!--
We can't have an *Edit* form without an *Edit* button, so let's start by adding one to our `PagesList` component:
Expand Down Expand Up @@ -72,7 +72,7 @@ The only change in `PagesList` is the additional column labeled _Actions_:
<!--
### Step 2: Display an _Edit_ form
-->
### ステップ 2: 「編集」フォームの表示
### ステップ2: 「編集」フォームの表示
<!--
Our button looks nice but doesn't do anything yet. To display an edit form, we need to have one first – let's create it:
Expand Down Expand Up @@ -150,7 +150,7 @@ Great! We now have a basic user interface to work with.
<!--
### Step 3: Populate the form with page details
-->
### ステップ 3: フォームへのページの詳細の挿入
### ステップ3: フォームへのページの詳細の挿入
<!--
We want the `EditPageForm` to display the title of the currently edited page. You may have noticed that it doesn't receive a `page` prop, only `pageId`. That's okay. Gutenberg Data allows us to easily access entity records from any component.
Expand Down Expand Up @@ -209,7 +209,7 @@ Now it should look like this:
<!--
### Step 4: Making the Page title field editable
-->
### ステップ 4: ページのタイトルフィールドを編集可能に
### ステップ4: ページのタイトルフィールドを編集可能に
<!--
There's one problem with our _Page title_ field: you can't edit it. It receives a fixed `value` but doesn't update it when typing. We need an `onChange` handler.
Expand Down Expand Up @@ -377,7 +377,7 @@ This is what it looks like now:
<!--
### Step 5: Saving the form data
-->
### ステップ 5: フォームデータの保存
### ステップ5: フォームデータの保存
<!--
Now that we can edit the page title let's also make sure we can save it. In Gutenberg data, we save changes to the WordPress REST API using the `saveEditedEntityRecord` action. It sends the request, processes the result, and updates the cached data in the Redux state.
Expand Down Expand Up @@ -469,7 +469,7 @@ function EditPageForm( { pageId, onCancel, onSaveFinished } ) {
<!--
### Step 6: Handle errors
-->
### ステップ 6: エラー処理
### ステップ6: エラー処理
<!--
We optimistically assumed that a *save* operation would always succeed. Unfortunately, it may fail in many ways:
Expand Down Expand Up @@ -583,7 +583,7 @@ Fantastic! We can now **restore the previous version of `handleChange`** and mov
<!--
### Step 7: Status indicator
-->
### ステップ 7: ステータスインジケータ
### ステップ7: ステータスインジケータ
<!--
There is one last problem with our form: no visual feedback. We can’t be quite sure whether the *Save* button worked until either the form disappears or an error message shows.
Expand Down Expand Up @@ -760,15 +760,15 @@ function EditPageForm( { pageId, onCancel, onSaveFinished } ) {
<!--
## What's next?
-->
## 次のステップ
## 次は ?
<!--
* **Previous part:** [Building a list of pages](/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md)
* **Next part:** Building a *New Page* form (coming soon)
* (optional) Review the [finished app](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) in the block-development-examples repository
-->
* **前のステップ:** [ページリストの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/2-building-a-list-of-pages)
* **次のステップ:** 新規ページフォームの構築 (近日公開)
* (オプション) gutenberg-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
* **前のパート:** [ページリストの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/2-building-a-list-of-pages)
* **次のパート:** 新規ページフォームの構築 (近日公開)
* (オプション) block-development-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
[原文](https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/data-basics/3-building-an-edit-form.md)
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,15 @@ All that’s left is to refresh the page and enjoy the form:
<!--
## What's next?
-->
## 次のステップ
## 次は ?

<!--
* **Next part:** [Adding a delete button](/docs/how-to-guides/data-basics/5-adding-a-delete-button.md)
* **Previous part:** [Building an edit form](/docs/how-to-guides/data-basics/3-building-an-edit-form.md)
* (optional) Review the [finished app](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) in the block-development-examples repository
-->
* **次のステップ:** [削除ボタンの追加](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/5-adding-a-delete-button)
* **前のステップ:** [編集フォームの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/3-building-an-edit-form/)
* (オプション) gutenberg-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照
* **次のパート:** [削除ボタンの追加](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/5-adding-a-delete-button)
* **前のパート:** [編集フォームの構築](https://ja.wordpress.org/team/handbook/block-editor/how-to-guides/data-basics/3-building-an-edit-form/)
* (オプション) block-development-examples リポジトリ内の [完成したアプリ](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/data-basics-59c8f8) を参照

[原文](https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/data-basics/3-building-an-edit-form.md)
Loading

0 comments on commit 1882173

Please sign in to comment.