Help:名前空間

From mediawiki.org
This page is a translated version of the page Help:Namespaces and the translation is 70% complete.
PD 注意: このページを編集すると、編集内容が CC0 のもとで公開されることに同意したと見なされます。詳細はパブリック・ドメインのヘルプ ページを参照してください。 PD

MediaWiki ウィキのページは「名前空間」と呼ばれる、ページの目的を大まかに区別するための集まりに分類されます。特定の名前区間にあるページは特別な性質を持っていたり、他のページとの相互作用のしかたが異なっていたりします。

名前空間はページタイトルのなかでページ名の前につく部分の「<名前空間>:」で示されます。このページのタイトル(Help:Namespaces/ja)の Help: はこのページが Help 名前空間にあることを示しています。個々の名前空間は番号と名前で識別されます。名前は翻訳可能で、別名をもっていることがあります。

名前空間接頭辞がない名前のページは標準名前空間にあります。 しかし、名前空間を示すのではないコロンと接頭辞が、ページ名に現れる可能性もあることに注意してください:名前空間「Foo」が存在しないため、ページFoo:Namespaces/jaは標準名前空間にあるページです。 同様に、ページHelp:Foo:Namespaces/jaは「Help」名前空間にあります。

標準的な名前空間

インストールされた標準のMediaWikiにはコンテンツを分類できる16の名前空間があります。また、MediaWikiソフトウェアによって"急いで"作成されたページを分類する2つの特別な名前空間も用意されています。

メディア

この名前空間は、メディアファイルへの直接リンクに使われます: リンク [[Media:MediaWiki-2020-logo.svg]] は、画像の説明ページではなく、画像だけにリンクします。画像の説明ページへのリンクは [[:File:MediaWiki-2020-logo.svg]]になります。

特別

この名前空間は、特別ページをグループ化するために使用されます。特別ページは、「要求に応じて」MediaWiki が生成するレポートやインターフェイスであり、直接は編集できません。MediaWiki ソフトウェアを変更・拡張しない限り、この名前空間にはページを作成できません。

(標準)

コロンで区切られた接頭辞がないこの名前空間。一般に「標準名前空間」または「メイン空間」と呼ばれます。通常この名前空間はウィキのコンテンツ ページ の大部分を含みます。この名前空間は全体としてみると特別な性質はありません。

トーク (会話)

「トーク」名前空間はメイン空間に付属する議論の名前空間です。特別な性質はありません。

利用者

個々の利用者は自分に対応するページをUser名前空間にもっています。このページは編集履歴、最近の更新ページなど、個別の利用者が同定されるときにはいつでもリンクされます。

このページおよびその下位ページは、利用者自身に関する情報を記録する目的や、新規コンテンツの下書きやテストのため、利用者により使用されます。 User:利用者名/Foo.js または User:利用者名/Foo.css という形式のページは、当該利用者自身またはインターフェイス管理者 (MediaWiki 1.32 未満の場合は管理者) のみが編集できます。

利用者・トーク (利用者‐会話)

This namespace is the talkspace associated with the “User” namespace. Pages in this namespace are mainly used to leave messages for particular users or inform them of discussions that may be of interest to them. To facilitate this, when a page User talk:UserName is edited, whenever the user UserName loads a page, a notice is displayed at the top of the page informing them of the edit:

この通知は利用者が会話ページのメッセージを読むまで表示され続けます。

ウィキ管理者への助言: Echo のような拡張機能で、この挙動をオーバーライドできます。

プロジェクト

この名前空間は通常、そのウィキの運営や発展についてのメタ議論のために使用されます。 自動的に利用者をラベルが付けられた名前空間にリダイレクトします : [[Project:Licenses]] → [[Wikipedia:Licenses]].

プロジェクト・トーク

これは通常、対応するプロジェクトページに関する議論に使われるトーク名前空間です。特別な性質はありません。

ファイル

The “File” namespace is used to store metadata for images, videos, sound files and other media accessed via the “Media” namespace. Each file has a corresponding page in the “File” namespace, which is often used to hold licensing data. Linking directly to a page in this namespace instead includes the media file inline in the page: [[File:MediaWiki-2020-logo.svg|right]] produces the image to the right. See Help:画像 for more details of this link syntax.

ファイルページへのウィキ間リンクを作成するには、名前空間の前にコロンを付加する必要があります:[[:File:MediaWiki-2020-logo.svg|right]]File:MediaWiki-2020-logo.svg が出力されます。 標準的な MediaWiki のインストレーションには"File"名前空間用に別名"Image"が含まれています (詳細は名前空間の別名を参照)。

説明ページを迂回してメディアファイルを直接リンクする場合は、メディア名前空間を参照してください。

ファイル・トーク (ファイル‐ノート)

これは通常、対応するメディア ファイルに関する議論に使用されるトーク名前空間です。特別な性質はありません。

MediaWiki

The “MediaWiki” namespace is used to hold system messages and other important content. For instance, the page MediaWiki:Edit (or MediaWiki:Vector-view-edit in the default “Vector” skin) contains the text that fills the “編集” tab at the top of every page. If that page exists, it overrides the default content, which is “Edit.” Similarly, MediaWiki:Common.css is the system message that holds the CSS code that is loaded for all users for each page. It has the special property that the entire namespace can only be edited by users with the (editinterface) user right. MediaWiki 1.32以降、JavaScriptとCSSページの編集にはeditinterfaceeditsitejs又はeditsitecssの編集権限が必要です。

MediaWiki・トーク (MediaWiki‐ノート)

これは通常、対応するシステム メッセージに関する議論に使用されるトーク名前空間です。特別な性質はありません。

テンプレート

The “Template” namespace is used to hold templates, blocks of text or wikicode that are intended to be transcluded into several other pages. To facilitate this it has the special property that it is the default namespace for transclusions: the wikicode {{Foo}} is equivalent to {{Template:Foo}}.

テンプレート・トーク (Template‐ノート)

これは通常、対応するテンプレート ページに関する議論に使用されるトーク名前空間です。特別な性質はありません。

ヘルプ

Help名前空間は通常、ヘルプファイル、説明書、使い方に関する文書などをおくために使われます。特別な性質はありません。 名前空間のヘルプを参照。

ヘルプ・トーク (Help‐ノート)

これは通常、対応するヘルプページに関する議論に使用されるトーク名前空間です。特別な性質はありません。

カテゴリ

The “Category” namespace contains categories, dynamic lists of other pages. To facilitate this, linking directly to a category page does not output an inline link, but instead includes the page into the associated category page. So the code [[Category:Help]] causes a category link to appear at the bottom of the page (at the bottom in the box marked “カテゴリ”). Clicking on that link takes you to the category page, where this page is visible in the category list.

カテゴリ ページへのインライン リンクを作成するには、名前空間の先頭にコロンを追加する必要があります。[[:Category:Help]]Category:Help を生成します。 カテゴリリンクの構文の詳細については、Help:カテゴリ を参照してください。

カテゴリ・トーク (Category‐ノート)

これは通常、対応するカテゴリ ページに関する議論に使用されるトーク名前空間です。特別な性質はありません。

地域化

名前空間名および別名は、開発者が地域化できます。 名前空間名の地域化を要望するには、Phabricator MediaWiki 国際化タスクを登録してください。 In the description of the task, you should provide translations of all the namespaces in the table to the right, as well as any additional namespaces on your wiki (such as "Module" or "Gadget").

If the site's language is Chinese, then namespace names are translated only when the content is converted and there is no __NOTITLECONVERT__ or __NOTC__ or magic words on a page.

名前空間名の変更

Number 標準名 ローカル名
-2 Media メディア
-1 Special 特別
0 (Main)
1 Talk トーク
2 User 利用者
3 User talk 利用者・トーク
4 Project プロジェクト
5 Project talk プロジェクト・トーク
6 File ファイル
7 File talk ファイル・トーク
8 MediaWiki MediaWiki
9 MediaWiki talk MediaWiki・トーク
10 Template テンプレート
11 Template talk テンプレート・トーク
12 Help ヘルプ
13 Help talk ヘルプ・トーク
14 Category カテゴリ
15 Category talk カテゴリ・トーク

Namespace names can be translated into languages other than English and individual namespaces can be renamed, as set by a wiki's system admins (using Namespace manager). These names are known as the 'localized' namespace names. However, all namespaces have a 'canonical name', the original English name which will work on any installation of MediaWiki. So linking to User:Foo will always locate the user page for the user foo, whether the wiki is in French (where the localized name would be Utilisateur:Foo), Russian (Участник:Foo), or Hindi (सदस्य:Foo).

The canonical namespace names are given in the table to the right along with their localized names on this wiki.

名前空間の別名

On some wikis there are also namespace aliases: alternative names that will also be resolved to the localised names. For instance, a wiki might define "T" as an alias for Template, such that typing T:Foo is equivalent to Template:Foo, saving a few characters and seconds. An actual example would be on the English Wikipedia, where "WP" is an alias for Project, which is the namespace "Wikipedia".

By default, "Image" is an alias for File, so [[Image:MediaWiki-2020-logo.svg]] is equivalent to [[File:MediaWiki-2020-logo.svg]].

カスタム名前空間

詳細情報は Manual:カスタム名前空間の使用方法 を参照してください。

Some wikis may wish to organize their content in ways that do not fit into this standard set of namespaces. A wiki may define additional namespaces to facilitate this; these namespaces behave exactly like normal namespaces, and generally have indices greater than or equal to 100. These custom namespaces generally have no special properties.

名前空間の識別

There are a number of ways by which the namespace of a particular page can be identified:

マジック ワード

マジック ワード {{NAMESPACE}} は、ページが属する名前空間の値を返します。

To refer to another namespace, use {{ns:<name>}} (e.g. {{ns:Project}}), or {{SUBJECTSPACE}} / {{TALKSPACE}} to refer to the namespace paired with the current one.

JavaScript

The JavaScript variable wgCanonicalNamespace contains the full namespace name. The variable wgNamespaceNumber contains the numerical index of the namespace.

CSS

The ‎<body> tag of the HTML page output is given two CSS classes that vary by namespace: A class ns-#, where # is the index of the namespace, and ns-XXX, where XXX is "subject" for all subject namespaces , "special" for pages in the Special namespace, and "talk" for talk namespaces . So CSS code such as the following can be used to change the appearance of an object based on its namespace:

.ns-subject a {   /* 主題ページの大部分のリンクを緑にする */
    color: #0f0;
}
.ns-talk a {      /* トークページ内のリンクを青にする */
    color: #00f;
}
.ns-3 a {         /* さらに利用者トークページのリンクを赤にする */
    color: #f00;
}

You can get a complete list of all namespace names of a MediaWiki installation from the Search results page Advanced tab, or from any recent changes page such as contributions or watchlist in its options box, in a drop-down list. For the system properties of each namespace, use the MediaWiki API :

API


関連ページ