Template talk:Convert/old/doc/A plan to reduce Convert subtemplates

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Essays
WikiProject icon This page is within the scope of WikiProject Essays, a collaborative effort to organise and monitor the impact of Wikipedia essays. If you would like to participate, please visit the project page, where you can join the discussion. For a listing of essays see the essay directory.
 Low  This template has been rated as Low-impact on the project's impact scale.
 

Talk-page for: WP:A plan to reduce Convert subtemplates

Created[edit]

The Wikipedia essay "WP:A plan to reduce Convert subtemplates" was created by long-term user Wikid77 on October 27, 2009 to allow extensive long-range planning outside the talk-page of Template:Convert, which is busy with many other conversion issues. -Wikid77 07:00, 11 Nov 2009

New features[edit]

11-Nov-2009: Within 2 weeks, it became obvious that many new features have been wanted in Template:Convert, so those features should also be considered when condensing the existing subtemplates. Some new options should be implemented while coding the condensed subtemplates, including:

  • comma=off, comma=in, comma=out, comma=on (default)
  • round=in, round=out (default), round=on
  • order=reverse, or order=flip (to handle new "disp=flip")

By acknowledging those new options, it becomes even clearer that a condensed design is needed: in the old style of subtemplate-naming, the new options might have become 24 new template-name parts. Those 3 options could become template-name suffixes (such as "CoffRinOflip" or "CoutRoutOoff") to append to "LoffAoffDbSoff" (etc.). If those options were added into all existing display-subtemplates, then the total might become 2500*24= 60,000 possible subtemplates. However, in the condensed design, those 3 options would simply become 3 more parameters (named: comma, round, order) passed into all of the condensed display-subtemplates. -Wikid77 (talk) 07:00, 11 November 2009

Allowing dynamic variations of display-subtemplates[edit]

In the old style of subtemplate naming, an option value could be added to quickly connect to a variation subtemplate. For example, using abbr=xyz, a custom variation can be coded as subtemplates named "LoffAxyzDbSoff" (and "LoffAxyzDorSoff" etc.). In the new hybrid condensed design, there could be a similar option named "v=xxx" to allow a custom variation to be quickly coded as a subtemplate named "Convert/DgenVxxx" (or for v=xyz, then "Convert/DgenVxyz"). Meanwhile, the preferred method to customizing (any subtemplate operation) would be to use options c1=xxx, c2=yyy, c3=zzz, which would be passed into all new condensed subtemplates (without altering or creating new subtemplate names). Consequently, there would be those 2 methods of passing new options:

  • change a subtemplate to use various values of c1, c2, or c3;
  • create a new subtemplate named for v=xxx as "Convert/DgenVxxx".

By supporting both methods, the hybrid design can simplify the addition of many new features being added to Template:Convert. -Wikid77 07:10, 11 November 2009