User:NicoV/TemplateDataEditor

{{Warning|Since there's now a Template Data Editor integrated into MediaWiki itself, this tool is not maintained anymore.}}

{{See also|Wikipedia:TemplateData/Tutorial}}

File:TemplateDataEditor.png]]

TemplateDataEditor (TDE) is a script for visually editing TemplateData.

It has been written by Ltrlg, originally for frwiki but now available for every wiki.

__TOC__

{{clr}}

Installation

Use

= Starting =

File:TemplateDataEditor Toolbox.png

When you edit a template (or rather its documentation page) :

= If there's no TemplateData =

TemplateDataEditor suggests to prefill {{tag|templatedata|single}} by analysing the template code. To perform this, it uses Salix alba's TDSkell script.

Choose in the drop down list the template you are documenting and click on the "Execute" button.

= Data modification =

The modification window contains three sections: Description, Parameters and Sets.

== ''Description'' section ==

The Description section allows you to describe the template in a translatable text area.

== ''Parameters'' section ==

The Parameters section allows you to describe template parameters. It's composed of a list of parameters, each parameter being displayed completely or in short format

When a parameter is displayed in short format, it's possible:

  • to set the real name of the parameter, which is the name used when using the template in wikitext ;
  • to tell if the parameter is mandatory ;
  • to inherit the documentation of an other parameter (all blank fields are filled with values coming from the other parameter) ;
  • to display the parameter completely by clicking on the 24px button ;
  • to delete the parameter by clicking on the 24px button.

When a parameter is displayed completely, it's possible:

  • to display it in short format by clicking on the 24px button ;
  • to set a name for display (which is translatable) ;
  • to tell the type of parameter and its default value ;
  • to tell if the parameter is obsolete (by filling the filed with the procedure to replace the parameter) ;
  • to give other names for the parameter ;
  • to describe the parameter (descriptions are translatable).

At the bottom of the list, a 24px button lets you create new parameters.

== ''Sets'' section ==

The Sets section allows you to define sets of parameters that should be used in conjunction. It's composed of a list of sets.

Each line allows you:

  • to give a name (translatable) to the set ;
  • to tell which parameters are part of the set ;
  • to delete the set by clicking on the 24px button.

At the bottom of the list, a 24px button lets you create new sets.

= Translatable area =

Some elements can be translated in several languages.

When starting TemplateDataEditor, only contents in the wiki language and your language are displayed. You can display other languages by clicking on 24px button (or 24px) or hide them by clicking on 24px button (or 24px).

When other languages are displayed, a 24px button lets you add new languages. Except for the wiki language, you can delete a language by clicking on 24px button.

Use in other wikis

  • TDE is currently available in English, French, Greek, Korean, Japanese and Italian. If you want to contribute to translations, you can suggest translations at talk page on frwiki, the messages to be translated are at the beginning of script (messages variable).
  • TDE can be used directly from any wiki.

Known limitations and problems

Currently, TDE has the following limitations:

  • Suggestion for aliases and default value from TDSkell script has not been integrated yet.
  • Renaming a parameter moves it to the end of the list.
  • Parameters with name containing { or } can't be documented.

Notes