Template talk:W

From Wikimedia Commons, the free media repository
Jump to: navigation, search


{{edit protected}} Please move the documentation to a {{documentation}} subpage. Rd232 (talk) 21:29, 26 June 2011 (UTC)

✓ Done But you could have created the documentation subpage by yourself, leaving just the final protected page edit to an admin… --Mormegil (talk) 12:27, 30 June 2011 (UTC)
Thanks. Didn't occur to me, as on non-protected pages I do both things together. Rd232 (talk) 12:31, 30 June 2011 (UTC)

Required expansions[edit]

  1. The template would give an easy access also to main pages when transclusion was allowed with the page name empty: {{{1|}}} (with pipe) instead of {{{1}}}.
  2. It seems better documented when parameter 3 is inserted, instead of replacing the redundant "w". Or is the piping a "cheaper" (server friendly) way for replacing empty parameters?

The code should be simply
If there are any questions, everything is explained at {{Wpd}}, a candidate for deletion.

If it seems better, safesubst may be inserted:

Template U[edit]

{{U}} (has not yet a talk page) would function better with a small extension. At the moment it is internationalized with the named parameter LANG= instead with 3= as all the other templates. The extension ensures that older invocations with LANG= work as well as newer ones with 3=. The complete coding is provided there. If it seems better, safesubst may be inserted at any of the three #if:, or piping may be used istead.

Another advantage might be to divide it into the mere code, and the (unprotected) documentation page, which I shall maintain then. -- sarang사랑.svg사랑 12:04, 27 February 2012 (UTC)

I didn't understand the first part of that. But I've transcluded the documentation page you created, and you can create the template talk page Template talk:U for further discussion. Rd232 (talk) 22:10, 27 February 2012 (UTC)
OK, ✓ Done both. Rd232 (talk) 04:41, 29 February 2012 (UTC)

Main galleries:[edit]

Should "Wikipedia" be added before the source for this template to provide context? Hyacinth (talk) 22:46, 20 March 2012 (UTC)

I don't think we really want to change the behaviour of a template like that, and making it an option is probably not useful. Rd232 (talk) 09:45, 21 March 2012 (UTC)
Not in the template itself by default. --AVRS (talk) 10:21, 21 March 2012 (UTC)

"En:" vs. Template:W[edit]

What is the point of this template when one can use "en:"? The difference should be pointed out by Template:W/doc. Hyacinth (talk) 06:59, 30 April 2012 (UTC)

For example User:Hyacinth vs. User:Hyacinth ([[en:User:Hyacinth|User:Hyacinth]] vs. {{w|User:Hyacinth}}). Hyacinth (talk) 07:55, 11 May 2012 (UTC)

Not to mention w: works as well. User:Hyacinth ([[w:User:Hyacinth|]]) –Krinkletalk 20:29, 9 June 2012 (UTC)
Works, but duplicates the name when you save. --AVRS (talk) 11:25, 10 June 2012 (UTC)
Not to put too fine a point on it, but so what? Powers (talk) 18:54, 8 December 2012 (UTC)
That makes the source text harder to read. --AVRS (talk) 19:14, 8 December 2012 (UTC)
No more than "{{W|...}}" does, does it? Powers (talk) 19:52, 9 December 2012 (UTC)

Usefulness if using all 3 parameters⁇[edit]

This template is only for text-reduction (and so maybe typing-help). But if we use all 3 parameters, then there is no single advantage(?), on the contrary, this is extra syntax which needs extra (computing power and) human instructions. So I suggest to deprecate the usage of 3 parameters. For example:

[[:de:Wappen der Landeshauptstadt München|Wappen von München]] vs
{{w|Wappen der Landeshauptstadt München|Wappen von München|de}} or
{{wd|Wappen der Landeshauptstadt München|Wappen von München}}.

Unfortunately the 3. is the more important language code. The 2. parameter (displayed text) is only prior if we link to the EnWP, because the 3rd parameter is needless.
Additional also the shortcut codes (wd, wf) are possibly colliding with the scheme of reserved language codes (2 letter templates). User: Perhelion 14:16, 30 July 2016 (UTC)

The 2. Parameter was inserted by an IP 01-2007 and shortly thereafter Menasim 05-2007 inserted the 3. parameter .
The usage of the 2. parameter seems a inclusion of 12.000 (which are ~1.5% of all inclusions and ~ 0.365‰ of all files in near 10 years, insource:/\{\{[Ww]\|[^321][^=|}]+\|[^=|}]+(\|3?=?\w\w)?\}\}/ hastemplate:w) (on file-namespace) so it seems be a transmitted logic (although the most are without language code).
Although [[w:xxx|zzz]] is the same as {{w|xxx|zzz}}
User: Perhelion 08:41, 2 August 2016 (UTC)

Expansion for better formatting[edit]


Please replace the code of the template with

[[:{{{3|w}}}:{{{1|}}}|{{<includeonly>safesubst:</includeonly>#if: {{{2|}}} |{{{2}}}|{{PAGENAME:{{{1|{{Projectname|w}}}}}}}}}]]<noinclude>

Explanation: after insertion of the PAGENAME trick the display will avoid the understrokes, like all other Interwiki link templates
Example: List of XML and HTML character entity references. -- sarang사랑 15:32, 1 November 2016 (UTC)

✓ Done --jdx Re: 22:58, 12 November 2016 (UTC)

The display is now successfully improved. Nevertheless more improvements seem desirable:

  1. When parameter 1 is expressed in lower case, it should be displayed also in lower case - without the need for parameter 2.
  2. When parameter 1 is specified explicitly with a namespace, it seems better to have the display prefixed with it as well.
  3. When parameter 1 is recognized as wrong defined that it is impossible to work with it, this should lead to an error msg.

The template will be a bit more complicated with these improvements but it will work better in the cases mentioned above. sarang사랑 16:39, 18 November 2016 (UTC)

The above point (3.) is temporarely resolved; when parameter 1 starts with either "[" or "{" it is

  • either an edit error causing that the template cannot preceed; an error message is displayed and the page is categorized Maintenance:Template W error.
  • or it is "{"-code within a template that can probably be resolved when transcluded; such occurencies in namespace 10 should not cause a display or categorizing. It is possible to avoid the display by e.g. setting the parameter into nowiki. --sarang사랑 17:16, 15 May 2017 (UTC)
  • OT (just my2¢): For me the template is groundless if parameter 2 is present (against native Wiki syntax, but this is may very to late to fix). Also parameter 3. is more useful and may more used as parameter 2. -- User: Perhelion 00:56, 16 May 2017 (UTC)
In the special case of the {{W}} the language code may be of more importance; but since all other international templates have this code as an unnamed parameter 3, it follows this scheme. -- sarang사랑 15:13, 25 June 2017 (UTC)


Info non-talk.svg
It is requested that an edit or modification be made to this protected page.

Administrators: Please apply <nowiki> or {{tl}} to the tag after the request is fulfilled.

Please expand the template by copying the W/sandbox. The new parameter is needed for a special usage with namespaces. -- sarang사랑 15:13, 25 June 2017 (UTC)