Manual:インターフェイス/Gadgets-definition
このページでは、システム メッセージ (MediaWiki インターフェイスの構成要素を定義しているウィキページ) について記述しています。 既定の説明文も参照してください。 |
MediaWiki:Gadgets-definition is the page which defines the gadgets available to users at ガジェット, a tab in Special:Preferences provided by Extension:Gadgets . 詳細は Extension:Gadgets を参照してください。
Format
Each line on the MediaWiki:Gadgets-definition page should start with a "*" (asterisk) character to define a gadget. The line takes the following format:
* mygadget [options] | ページ名(群)
The first field ("mygadget" in the example) is the gadget's internal name. The label for the preferences page comes from an interface message page (MediaWiki:Gadget-mygadget) where the proper name and a short description can be written, which also allows wikitext markup to be used.
[A-Za-z]
) and may be followed by any number of letters, digits ([0-9]
), hyphens (-
), underscores (_
), and periods (.
). The reason for this limitation is that the internal name must be valid as the name of an HTML form name, as MediaWiki interface message key, and as ResourceLoader module name.オプションの書式:
[ResourceLoader | オプション1 | オプション2 | ... オプションN]
The ResourceLoader flag is required unless the gadget contains only styles. Options that are "flags" only need to have their name written to be turned on. Options that need a value are followed by an equals sign and a comma-separated list of values. All whitespace is optional and may be omitted.
[ResourceLoader | myflag | mykey = value1, value2, value3 ]
例:
* mygadget[ResourceLoader]|mygadget.js|mygadget.css
または
* mygadget[ResourceLoader|package]| mygadget.js | mygadget-Foo.js | mygadget-data.json | mygadget.css
または
* mygadget[ ResourceLoader | rights=foo, bar ] | mygadget.js | mygadget.css
節
Gadgets-definition can contain sections, but no distinction is made between different levels of headings. Headings are not used directly for display, but instead refer to a MediaWiki message for that section heading beginning with MediaWiki:Gadget-section-. So ==LanguageSupport== refers to MediaWiki:Gadget-section-LanguageSupport, and the content of that message (or of the localized subpages, MediaWiki:Gadget-section-LanguageSupport/ja etc.) will be displayed to the user at Special:Preferences.