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

翻訳: /themes/basics/post-types.md, the-loop.md, template-tags.md #20

Merged
merged 40 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
53fb6c7
Translate basics/post-types.md
mkismy Aug 7, 2023
717906c
Translate basics/template-tags.md
mkismy Aug 14, 2023
f38e23b
Translate basics/the-loop.md
mkismy Sep 11, 2023
0ba861f
Update theme/basics/post-types.md
mkismy Sep 27, 2023
d9d53d8
Update theme/basics/post-types.md
mkismy Sep 27, 2023
320874e
Update theme/basics/post-types.md
mkismy Sep 27, 2023
c412495
Update theme/basics/post-types.md
mkismy Sep 27, 2023
997783e
Update theme/basics/post-types.md
mkismy Sep 27, 2023
9b87092
Update theme/basics/post-types.md
mkismy Sep 27, 2023
2f4c3f3
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
11e3f14
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
62c5349
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
0ba03f2
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
ab261cf
Update theme/basics/post-types.md
mkismy Sep 27, 2023
d65b1de
Update theme/basics/post-types.md
mkismy Sep 27, 2023
8550244
Update theme/basics/post-types.md
mkismy Sep 27, 2023
851625e
Update theme/basics/post-types.md
mkismy Sep 27, 2023
80048cd
Update theme/basics/post-types.md
mkismy Sep 27, 2023
d4fb1eb
Update theme/basics/post-types.md
mkismy Sep 27, 2023
8190f9c
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
2d53e80
Update theme/basics/post-types.md
mkismy Sep 27, 2023
b3489ee
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
c1a5735
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
6b1b554
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
1ac302b
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
62bbc4d
Update theme/basics/template-tags.md
mkismy Sep 27, 2023
f696505
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
085697c
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
82f2166
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
2efa677
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
52fffbe
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
6b8c6e1
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
a1265b2
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
447b7d1
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
45c44d6
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
cfd5132
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
9ec23b1
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
5047095
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
6ac6152
Update theme/basics/the-loop.md
mkismy Sep 27, 2023
dc1e676
Update translation
mkismy Sep 27, 2023
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
122 changes: 121 additions & 1 deletion theme/basics/post-types.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,92 @@
<!--
# Post Types
-->
# 投稿タイプ

<!--
There are many different types of content in WordPress. These content types are normally described as Post Types, which may be a little confusing since it refers to all different types of content in WordPress. For example, a post is a specific Post Type, and so is a page.
-->
WordPress にはさまざまな種類のコンテンツがあり、これらのコンテンツのことを「投稿タイプ」と呼びます。ただし、WordPress にあるさまざまな種類のコンテンツをのことも投稿タイプと呼ぶため、少し混乱するかもしれません。たとえば、投稿は投稿タイプのひとつですが、固定ページも同様に投稿タイプと呼びます。

<!--
Internally, all of the Post Types are stored in the same place — in the wp\_posts database table — but are differentiated by a database column called post\_type.
-->
内部的にはどのような投稿タイプでもすべて同じ場所 (データベースの `wp_posts` テーブル) に保存されていて、 `post_type` カラムによって区別されます。

<!--
In addition to the default Post Types, you can also create Custom Post Types.
-->
デフォルトの投稿タイプに加えて、カスタム投稿タイプも作成できます。

<!--
The [Template files](https://developer.wordpress.org/themes/basics/template-files/) page briefly mentioned that different Post Types are displayed by different Template files.  As the whole purpose of a Template file is to display content a certain way, the Post Types purpose is to categorize what type of content you are dealing with. Generally speaking, certain Post Types are tied to certain template files.
-->
[テンプレートファイル](https://developer.wordpress.org/themes/basics/template-files/)のページでは、投稿タイプはそれぞれ対応するテンプレートファイルで表示されると説明しました。投稿タイプは扱っているコンテンツの種類を分類するためのものであり、テンプレートファイルはそれにもとづいてコンテンツを表示するものです。一般的には、特定の投稿タイプと特定のテンプレートファイルは紐づいています。

<!--
## Default Post Types
-->
## デフォルトの投稿タイプ

<!--
There are several default Post Types readily available to users or internally used by the WordPress installation. The most common are:
-->
WordPress をインストールした際に利用可能な標準の投稿タイプがいくつかあります。主要なものは次のとおりです:

<!--
* Post (Post Type: ‘post’)
* Page (Post Type: ‘page’)
* Attachment (Post Type: ‘attachment’)
* Revision (Post Type: ‘revision’)
* Navigation menu (Post Type: ‘nav\_menu\_item’)
* Block templates (Post Type: ‘wp\_template’)
* Template parts (Post Type: ‘wp\_template\_part’)

-->
* 投稿 (投稿タイプ: `post` )
* 固定ページ (投稿タイプ: `page`)
* 添付ファイル (投稿タイプ: `attachment`)
* リビジョン (投稿タイプ: `revision`)
* ナビゲーションメニュー (投稿タイプ: `nav_menu_item`)
* ブロックテンプレート (投稿タイプ: `wp_template`)
* テンプレートパーツ (投稿タイプ: `wp_template_part`)

<!--
The Post Types above can be modified and removed by a plugin or theme, but it’s not recommended that you remove built-in functionality for a widely-distributed theme or plugin.
-->
上記の投稿タイプはテーマやプラグインで変更したり削除できますが、広く配布する予定のテーマやプラグインにおいて WordPress に組み込まれた機能を削除することは推奨されません。

<!--
It’s out of the scope of this handbook to explain other post types in detail. However, it is important to note that you will interact with and build the functionality of [navigation menus](https://developer.wordpress.org/themes/functionality/navigation-menus/) and that will be detailed later in this handbook.
-->
このハンドブックではその他の投稿タイプについて詳しく説明しませんが、[ナビゲーションメニュー](https://developer.wordpress.org/themes/functionality/navigation-menus/)の機能を操作して構築することは重要であり、これについてはこのハンドブックでのちほど詳しく説明します。

<!--
### Post
-->
### 投稿 (post)

<!--
Posts are used in blogs. They are:
-->
投稿はブログでよく使われます。

<!--
* displayed in reverse sequential order by time, with the newest post first
* have a date and time stamp
* may have the default [taxonomies of categories and tags](https://developer.wordpress.org/themes/functionality/categories-tags-custom-taxonomies/) applied
* are used for creating feeds
-->
* 最も新しい投稿が最初となるように、逆時系列順に表示されます
* 日付と時間が設定されています
* デフォルトの[タクソノミーであるカテゴリとタグ](https://developer.wordpress.org/themes/functionality/categories-tags-custom-taxonomies/)が適用できます
* フィードの作成に使われます

<!--
The template files that display the Post post type are:
-->
投稿を表示するテンプレートファイルは次のとおりです:

<!--
* `singl`e and `single-post`
* `category` and all its iterations
* `tag` and all its iterations
Expand All @@ -45,54 +97,122 @@ The template files that display the Post post type are:
* `search`
* `home`
* `index`
-->
* `single`、`single-post`
* `category` と関連するファイル
* `tag` と関連するファイル
* `taxonomy` と関連するファイル
* `archive` と関連するファイル
* `author` と関連するファイル
* `date` と関連するファイル
* `search`
* `home`
* `index`
Comment on lines +101 to +110
Copy link
Member

Choose a reason for hiding this comment

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

@atachibana
ご相談なのですが、ここでの「iterations」が「ファイル」と訳してしまって大丈夫でしょうか?


<!--
[Read more about Post Template Files in classic themes](https://developer.wordpress.org/themes/template-files-section/post-template-files/).
-->
[クラシックテーマでの投稿テンプレートファイルについてはこちらをご覧ください](https://developer.wordpress.org/themes/template-files-section/post-template-files/)。

<!--
### Page
-->
### 固定ページ (page)

<!--
Pages are a static Post Type, outside of the normal blog stream/feed. Their features are:
-->
固定ページは通常のブログフィードとは違って、静的な投稿タイプです。その特徴は以下の通りです:

<!--
* non-time dependent and without a time stamp
* are not organized using the categories and/or tags taxonomies
* can be organized in a hierarchical structure — i.e. pages can be parents/children of other pages
-->
* 時系列に表示されません
* カテゴリーやタグといったタクソノミーで分類されません
* ある固定ページが他の固定ページを親に持つ階層化した構造にできます

<!--
The template files that display the Page post type are:
-->
固定ページを表示するテンプレートファイルは次のとおりです:

<!--
* `page` and all its iterations
* `front-page`
* `search`
* `index`
-->
* `page` と関連するファイル
* `front-page`
* `search`
* `index`

<!--
[Read more about Page Template Files in classic themes](https://developer.wordpress.org/themes/template-files-section/page-template-files/).
-->
[クラシックテーマでの固定ページテンプレートファイルについてはこちらをご覧ください](https://developer.wordpress.org/themes/template-files-section/page-template-files/)。

<!--
### Attachment
-->
### 添付ファイル (attachment)

<!--
Attachments are commonly used to display images or media in content, and may also be used to link to relevant files. Their features are:
-->
添付ファイルはコンテンツの中で画像やメディアを表示する際に使用し、関連するファイルへのリンクとしても使用されます。

<!--
* contain information (such as name or description) about files uploaded through the media upload system
* for images, this includes metadata information stored in the wp\_postmeta table (including size, thumbnails, location, etc)
-->
* WordPress のメディアアップロードシステムを使ってアップロードされたファイルについて、ファイル名や説明などの情報を保持します
* 画像ファイルの場合、 `wp_postmeta` テーブルで保持されるファイルの情報も含みます (画像サイズ・サムネイル・ファイルの保存場所など)

<!--
The template files that display the Attachment post type are:
-->
添付ファイルを表示するテンプレートファイルは次のとおりです:

* `MIME_type`
* `attachment`
* `single-attachment`
* `single`
* `index`

<!--
[Read more about Attachment Template Files in classic themes](https://developer.wordpress.org/themes/template-files-section/attachment-template-files/).
-->
[クラシックテーマでの添付ファイルテンプレートファイルについてはこちらをご覧ください](https://developer.wordpress.org/themes/template-files-section/attachment-template-files/)。

<!--
## Custom Post Types
-->
## カスタム投稿タイプ

<!--
Using Custom Post Types, you can **create your own post type**. It is not recommend that you place this functionality in your theme. This type of functionality should be placed/created in a plugin. This ensures the portability of your user’s content, and that if the theme is changed the content stored in the Custom Post Types won’t disappear.
-->
カスタム投稿タイプを使うと**独自の「投稿タイプ」を作成**できます。カスタム投稿タイプはテーマ内ではなく、プラグイン内で定義することを強くおすすめします。そうすればテーマを切り替えてもカスタム投稿タイプのコンテンツが消えることなく他のテーマでも使い続けることができます。

<!--
You can learn more about [creating custom post types in the WordPress Plugin Developer Handbook](https://developer.wordpress.org/plugins/post-types/registering-custom-post-types/).
-->
カスタム投稿タイプの作成については、[プラグイン開発ハンドブック](https://developer.wordpress.org/plugins/post-types/registering-custom-post-types/)をご覧ください。

<!--
While you generally won’t develop Custom Post Types in your theme, you may want to code ways to display Custom Post Types that were created by a plugin.  The following templates can display Custom post types:
-->
一般的にテーマ内でカスタム投稿タイプを新たに作ることはないものの、プラグインによって作られたカスタム投稿タイプを表示できるようにしておくことをおすすめします。次のテンプレートファイルでカスタム投稿タイプを表示できます:

* `single-{post-type}`
* `archive-{post-type}`
* `search`
* `index`

<!--
[Read more about Custom Post Type Templates in classic themes](https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/).
-->
[クラシックテーマでのカスタム投稿タイプのテンプレートファイルについてはこちらをご覧ください](https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/)。
Loading