Langbahn Team – Weltmeisterschaft

Template talk:Sclass: Difference between revisions

Content deleted Content added
Trappist the monk (talk | contribs)
Thumperward (talk | contribs)
Line 91: Line 91:


::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 15:00, 19 March 2013 (UTC)
::::—[[User:Trappist the monk|Trappist the monk]] ([[User talk: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? [[User:Thumperward|Chris Cunningham (user:thumperward)]] ([[User talk:Thumperward|talk]]) 15:29, 19 March 2013 (UTC)

Revision as of 15:29, 19 March 2013

WikiProject iconShips Template‑class
WikiProject iconThis template is within the scope of WikiProject Ships, a project to improve all Ship-related articles. If you would like to help improve this and other articles, please join the project, or contribute to the project discussion. All interested editors are welcome. To use this banner, please see the full instructions.WikiProject icon
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

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). bahamut0013wordsdeeds 17:25, 16 December 2010 (UTC)[reply]

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: {{sclass|Iowa|battleship|1}}. --Mortense (talk) 20:39, 21 January 2013 (UTC)[reply]
Yeah, I'm late to the party. {{sclass-}} for italicized class names; {{sclass2-}} for non-italicized class names.
Trappist the monk (talk) 11:59, 15 March 2013 (UTC)[reply]

Avoiding Class Disambig

Is there some parameter to distinguish between different classes of the same name? For instance there are two South Dakota-class battleships, so that link just leads to the disambig. Is there a way to write it so that it will lead to one or the other? --Grahamdubya (talk) 15:33, 17 February 2012 (UTC)[reply]

Monitor disambiguation

Using {{sclass|Abercrombie|monitor}} gives Abercrombie-class monitor ([[Abercrombie class monitor|''Abercrombie''-class]] [[monitor]]). It should instead give Abercrombie-class monitor ([[Abercrombie class monitor|''Abercrombie''-class]] [[monitor (warship)|monitor]]). Headbomb {talk / contribs / physics / books} 16:43, 2 May 2012 (UTC)[reply]

Two things: (i) my understanding is that it's only the ship's name which should be italicised, the word "class" is written upright; (ii) you don't seem to have sufficient apostrophes in your <nowiki>...</nowiki> examples. --Redrose64 (talk) 18:47, 2 May 2012 (UTC)[reply]
Yeah, I fixed that. Copy-paste error. Headbomb {talk / contribs / physics / books} 19:01, 2 May 2012 (UTC)[reply]
Oh there's a disambiguation option, I didn't see that. {{sclass|Abercrombie|monitor||warship}} gives the correct output: Abercrombie-class monitor. Headbomb {talk / contribs / physics / books} 19:05, 2 May 2012 (UTC)[reply]

Edit request on 26 August 2012

Please replace the content of this with the content of Template:Sclass/sandbox. It will remove hyphens in the ship class per Wikipedia talk:WikiProject Ships/Archive 34#Ship class hyphens.

 Ryan Vesey 13:15, 26 August 2012 (UTC)[reply]

 Done --Redrose64 (talk) 12:05, 28 August 2012 (UTC)[reply]
Thank you. Ryan Vesey 13:16, 28 August 2012 (UTC)[reply]

No, that's just plain wrong - and has not been properly discussed. The hyphen is essential in distinguishing between the the noun form (Foo class) and the adjectival form (Foo-class ship). This used to be properly explained at Wikipedia:WikiProject_Ships/Guidelines#Referring_to_ship_classes - until messing around with this template make a nonsense of the explanation - and thousands of other pages. I'm going to ask for the most recent change to be reverted and ask that this is properly discussed before any further changes are made. See comments at Wikipedia talk:WikiProject Ships. 212.183.128.232 (talk) 18:40, 28 August 2012 (UTC)[reply]

The template still makes a large overgenerlization, automatically changing things like Parthian class submarine to Parthian-class submarine. In addition, the noun-form is much more likely to be used. If there is going to be an exception, the exception should be for it to become the adjectival form. Ryan Vesey 18:44, 28 August 2012 (UTC)[reply]
Ryan, read MOS:HYPHEN, and please give me a moment to finish editing - I'm having snags with edit conflicts here! Thanks. 212.183.128.232 (talk) 18:48, 28 August 2012 (UTC)[reply]
what in MOS:HYPHEN are you referring to? The part that says "hyphens are never inserted into proper-name-based compounds" perhaps? Ryan Vesey 18:51, 28 August 2012 (UTC)[reply]
Ryan, my dear chap, {{sclass}} used to correctly render Parthian class submarine to Parthian-class submarine, which is always correct. "Parthian-class" is a compound modifier of submarine - ie the noun submarine is modified by the hyphenated adjectival phrase "Parthian-class". The nounal use would be "Parthian class", NOT "Parthian class submarine". If you're not a grammarian, perhaps it's worth pausing two marching paces to read up on the difference in a suitable reference - or indeed in Wikipedia's MOS at MOS:HYPHEN. Can I also point out (at the risk of further damage to the correct use of English grammar in Wikipedia) that {{sclass2}} still correctly implements the hyphen!
On the subject of "proper-name-based compounds" (and note the beautiful hyphenation in that phrase), that prohibits solecisms such as "Ryan-Vesey errors", as the example makes clear. Yours, 212.183.128.232 (talk) 19:00, 28 August 2012 (UTC)[reply]
Hmm, well for starters, my requested template change should be reverted, at least until discussion is finished. I know little about the proper naming and was just going off of what I was told earlier; however, why is it that the title of the article should be unhyphenated? It was that comment that led me to believe it was a proper-name-based compound. Ryan Vesey 19:05, 28 August 2012 (UTC)[reply]
Ryan, good question. The discussion about hyphenating article names was defeated through a mixture of WP:JDLI and a self-defeating campaign of unilateral action. It wasn't pretty - you can read it here. I personally feel the articles should prima facie be hyphenated, but I can't see us opening that can of worms again for a long time... 212.183.128.232 (talk) 19:45, 28 August 2012 (UTC)[reply]

Please revert the last change to this template. The hyphens are there for a reason - English grammar.

212.183.128.232 (talk) 18:48, 28 August 2012 (UTC)[reply]

The change should be reverted, there needs to be a hyphen in Parthian-class submarine and others. Headbomb {talk / contribs / physics / books} 19:39, 28 August 2012 (UTC)[reply]

I've asked User:Redrose64 to revert the requested edit. 212.183.128.232 (talk) 21:40, 28 August 2012 (UTC)[reply]
 Done see here. --Redrose64 (talk) 21:42, 28 August 2012 (UTC)[reply]

Edit request

This is a copy of a request that I placed at WT:SHIPS. That request has gone unanswered for more than a fortnight. So:

I have finished the {{sclass}} family of templates. The newest and last member of the family is {{sclass2-}} for use with hyphenated article titles when the ship class is named for a common attribute: {{sclass2-|Flower|corvette}} produces: Template:Sclass2-.
In the relatively recent past, the {{sclass}} family of templates was nominated for deletion because the original templates {{sclass}} and {{sclass2}} and the new {{sclass-}} templates were all forks - copies of the original {{sclass}}. Because of that, I created {{sclass/core}} which does all of the formatting for the four templates. Two of the templates, {{sclass-}} and {{sclass2-}} use {{sclass/core}} while the other two do not. {{sclass}} and {{sclass2}} are protected so I can't replace them with the sandbox versions that use {{sclass/core}}.
Test cases for all of the {{sclass}} templates are at the testcases page. Are there any admins who would be willing to move {{sclass/sandbox}} to {{sclass}} and {{sclass2/sandbox}} to {{sclass2}}?

Trappist the monk (talk) 16:22, 7 March 2013 (UTC)[reply]

 Done. Is there intended to be more work in consolidating these? Chris Cunningham (user:thumperward) (talk) 11:21, 19 March 2013 (UTC)[reply]
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)[reply]
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)[reply]
It was my original intent to create a single template that could somehow know "how it was called" – probably through redirects. So, {{sclass}}, {{sclass2}}, {{sclass-}}, and {{sclass2-}} would somehow all call some common template. I imagined, and hoped that template parameter {{{0}}} could be read as the name of the calling template. After all if in {{sclass-|Valiant|tugboat}} Valiant is parameter {{{1}}} and tugboat is parameter {{{2}}} doesn't it infer that sclass- is parameter {{{0}}}?
Apparently that isn't the case. I created {{sclass/core}} 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)[reply]
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)[reply]