Template talk:Sclass/Archive 1

Optional parameter value = 4
I modified the template so that it will accept an optional parameter value of 4. This will allow properly punctuated usage of the class when it is to be used as a noun. Grammatically, using parameter value = 0 provides an adjectival form.

For example:
 * The last ship of the Haven-class hospital ship is still afloat in Baltimore, Maryland.

Gives this:
 * The last ship of the Haven-class hospital ship is still afloat in Baltimore, Maryland.

I tested this at prior to implementing the change, so I am hopeful that it will work correctly.— Bellhalla 11:41, 6 November 2007 (UTC)

Disambiguation parameter
I have added a disambiguation parameter to sclass to help avoid generating links to disambiguation pages. This is what occurred previously when the "ship type" parameter was "minesweeper". The template linked to minesweeper, a disambiguation page, rather than minesweeper (ship).

I tested the functionality of my changes at sclass/sandbox and User:Bellhalla/Sandbox before implementing them. — Bellhalla (talk) 19:03, 24 December 2007 (UTC)

hyphen use
what if you don't like using a hyphen in the class name? GraemeLeggett (talk) 08:54, 25 December 2007 (UTC)
 * As of right now, you can generate the form "Name class" — with no hyphen (but also no ship type) — by using format option 4, like this
 * which would produce . — Bellhalla (talk) 11:58, 25 December 2007 (UTC)
 * which would produce . — Bellhalla (talk) 11:58, 25 December 2007 (UTC)

Edit request
Please change the first line of this template from this:
 * produces: Flower-class corvette.


 * In the relatively recent past, the  family of templates was nominated for deletion because the original templates  and  and the new  templates were all forks - copies of the original  . Because of that, I created  which does all of the formatting for the four templates.  Two of the templates,   and   use   while the other two do not.    and   are protected so I can't replace them with the sandbox versions that use.


 * Test cases for all of the  templates are at the  testcases page.  Are there any admins who would be willing to move  to  and  to ?

—Trappist the monk (talk) 16:22, 7 March 2013 (UTC)


 * ✅. Is there intended to be more work in consolidating these? Chris Cunningham (user:thumperward) (talk) 11:21, 19 March 2013 (UTC)


 * Thanks. Given my limited experience with templates, if there is a way that they can be further consolidated, I don't know what that is. Have you got an idea for further improvements?


 * —Trappist the monk (talk) 12:22, 19 March 2013 (UTC)


 * Well, if sclass/core is doing all the grunt work here, do we really need to have four templates to call it? Could we not delete those four and just use sclass/core directly on articles? Chris Cunningham (user:thumperward) (talk) 12:39, 19 March 2013 (UTC)


 * It was my original intent to create a single template that could somehow know "how it was called" – probably through redirects. So,, , , and would somehow all call some common template.  I imagined, and hoped that template parameter   could be read as the name of the calling template.  After all if in     is parameter   and   is parameter   doesn't it infer that   is parameter  ?


 * Apparently that isn't the case. I created  after it was suggested to me at WT:VPT.  This is how all of the CS1 citation templates work.


 * —Trappist the monk (talk) 15:00, 19 March 2013 (UTC)


 * Heh: it had never occurred to me to use the shell scripting convention of parameter 0 being the template name. That would actually be extremely helpful: maybe file a MediaWiki bug? Chris Cunningham (user:thumperward) (talk) 15:29, 19 March 2013 (UTC)

Edit request #3
This request applies to and.

I recently changed to support an unnamed fifth parameter used to disambiguate ship class names. Two other members of the template family,  and, have already been upgraded to use the new version of.

and have been modified and configured to use the live version of. All that is required is to copy the contents of to  and copy the contents of  to.

There is a common test cases page for all four of the templates.

Thank you.

—Trappist the monk (talk) 14:04, 5 May 2013 (UTC)

Hyphenated article name break template
There is an issue with hyphenated ship class names that breaks the template. For example, Oscar-class submarine (Oscar-class submarine) creates a link, but the correct link to the hyphenated article name, Oscar--class submarine (Oscar--class submarine, article named Oscar-class submarine) fails. — btphelps (talk to me) (what I've done) 08:17, 9 February 2014 (UTC)


 * For hyphenated article titles, use : Oscar-class submarine.


 * —Trappist the monk (talk) 11:40, 9 February 2014 (UTC)

Hyphenated article / redirect problem
I'm unable to get this template to output a link without a redirect on an article that hyphenates in the name (i.e. Derfflinger-class battlecruiser). Nothing I can come up with will output a link with the hyphen, necessitating a redirect (i.e. Derfflinger class battlecruiser). Can we establish a parameter to change this without screwing up the parser? For the list I'm generating, I can't use a greenlink, I need the actual target instead of a redirect (and really don't want to have to manually type piped links with italics).  bahamut0013  words deeds 17:25, 16 December 2010 (UTC)


 * Yes, please fix this problem. An example is the link in the beginning of Armament of the Iowa class battleship, Iowa class battleship. Wiki code: Iowa-class battleship . --Mortense (talk) 20:39, 21 January 2013 (UTC)


 * Yeah, I'm late to the party.  for italicized class names;  for non-italicized class names.


 * —Trappist the monk (talk) 11:59, 15 March 2013 (UTC)
 * Still the same problem. If anyone can fix, it'd be much appreciated. Illegitimate Barrister 08:14, 4 January 2015 (UTC)


 * Example please?


 * —Trappist the monk (talk) 12:24, 4 January 2015 (UTC)