Predloga:Cite compare

Iz Wikipedije, proste enciklopedije
Cite {{{mode}}} compare
{{ navedi {{{mode}}} | }}
Staro
Trenutno
Dokumentacija za predlogo[poglej] [uredi] [zgodovina] [osveži]

{{cite compare}} is a debug and documentation tool that allows editors to compare the output created by the various versions of a Slog Navajanja 1 (CS1) template. The tool was developed to aid in the migration of the CS1 templates from the {{citation/core}} engine to Module:Citation/CS1 Lua engine.

To invoke {{cite compare}} simply add CS1 template parameters to {{cite compare}}. For example, a simple {{navedi splet}} comparison might look like this: {{cite compare |mode=splet |url=http://www.example.com |website=Example Website |title=Example comparison}} which produces this output:

Cite splet compare
{{ navedi splet | website=Example Website | title=Example comparison | url=http://www.example.com }}
Staro »Example comparison«. Example Website.
Trenutno »Example comparison«. Example Website.


Usage[uredi kodo]

The default display is a comparison between the old {{citation/core}}-based CS1 template and the current live CS1 template. Because the tool was developed to compare the new Lua-based versions of a CS1 templates against the older {{citation/core}} reference templates, the reference template are moved to a subpage labeled old. For example, {{navedi splet/old}} is the reference version against which the initial Lua implementation ot {{navedi splet}} were compared.

{{cite compare}} is controlled by four parameters:

  • |mode= – selects which of the CS1 templates will be compared; for {{navedi splet}}, |mode=splet; for {{navedi revijo}}, |mode=revijo; etc.
  • |sandbox= – when set to yes, includes the citation as rendered by Module:Citation/CS1/peskovnik
  • |old= – when set to no, does not include the citation as rendered by {{citation/core}}; includes the citation as rendered by Module:Citation/CS1/peskovnik
  • |comment= – when set to a comment, displays the comment at the bottom of the comparison table

Compare old, live and sandbox[uredi kodo]

Adding |sandbox=yes will display a comparison of all three versions of a CS1 citation:

{{cite compare |mode=splet |sandbox=yes |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite splet compare
{{ navedi splet | title=Example comparison | url=http://www.example.com | website=Example Website }}
Staro »Example comparison«. Example Website.
Trenutno »Example comparison«. Example Website.
Peskovnik "Example comparison". Example Website.


Compare live and sandbox[uredi kodo]

As more of the CS1 templates are migrated to Module:Citation/CS1 and new features / enhancements are added, it becomes less important to compare the sandbox version to the old version. Setting |old=no displays a comparison between the live and sandbox versions.

{{cite compare |mode=splet |old=no |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite splet compare
{{ navedi splet | title=Example comparison | website=Example Website | url=http://www.example.com }}
Trenutno »Example comparison«. Example Website.
Peskovnik "Example comparison". Example Website.


Though perfectly acceptable, simultaneously setting |old=no and |sandbox=yes is the same as simply setting |old=no.

{{cite compare |mode=splet |sandbox=yes |old=no |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite splet compare
{{ navedi splet | title=Example comparison | website=Example Website | url=http://www.example.com }}
Trenutno »Example comparison«. Example Website.
Peskovnik "Example comparison". Example Website.


Compare with comment[uredi kodo]

To add a comment regarding the comparison, set |comment=<comment text>. If <comment text> contains a vertical bar or pipe (|) use {{!}}.

{{cite compare |mode=splet |sandbox=yes |comment=Comment about {{!}}comment=<comment text> |url=http://www.example.com |website=Example Website |title=Example comparison}}

Cite splet compare
{{ navedi splet | title=Example comparison | website=Example Website | url=http://www.example.com }}
Staro »Example comparison«. Example Website.
Trenutno »Example comparison«. Example Website.
Peskovnik "Example comparison". Example Website.
Comment about |comment=<comment text>


See also[uredi kodo]