Manual:インターフェイス/Gadgets-definition

This page is a translated version of the page Manual:Interface/Gadgets-definition and the translation is 38% complete.

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.

The internal name must begin with a basic Latin letter ([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.