Difference between revisions of "Template talk:App"

From ArchWiki
Jump to: navigation, search
m (Comment: rm old coment)
m (Using br causes bugs: remove closed discussion)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introducing default argument ==
 
This was proposed by [[User:Kynikos]] and myself (see [[Template_talk:AUR?]]); difference is in default contents.
 
Again my proposal:
 
  
{{bc|<nowiki>
 
{{{1}}} &amp;mdash; {{{2}}}
 
: {{{3}}} || {{{4|{{AUR?{{1}}}}}
 
</nowiki>}}
 
 
Kynikos proposed:
 
 
{{bc|<nowiki>
 
{{{1}}} &amp;mdash; {{{2}}}
 
: {{{3}}} || {{{4|not packaged? [https://aur.archlinux.org/ search in AUR]}}}
 
</nowiki>}}
 
More opinions?
 
 
--[[User:AlexanderR|AlexanderR]] 18:42, 30 January 2012 (EST)
 
 
:I'm afraid your solution wouldn't work when the first argument receives a [[link]] because an article exists but there's no package available. A working compromise solution could be:
 
{{bc|<nowiki>
 
[[{{{1}}}]] &amp;mdash; {{{2}}}
 
: {{{3}}} || {{{4|not packaged? [https://aur.archlinux.org/packages.php?K={{urlencode:{{{1}}}}} search in AUR]}}}
 
</nowiki>}}
 
:Argument 1 takes a simple string which should be the name of an (existing or not) internal article. This will create many red links but it may be acceptable if we consider [[Special:WantedPages]].
 
:Note that the source of [[Template:AUR?]] is directly included here, since it's pointless to have a separate short template that is used only here.
 
:However my initial proposal is still my first choice: my considerations are all explained in detail in [[Template talk:AUR?#Opinions]].
 
:-- [[User:Kynikos|Kynikos]] 07:53, 1 February 2012 (EST)
 
::>> first argument receives a [[link]]
 
::Oups :)!
 
::>> compromise solution
 
::This was discussed a lot in the past and reached consensus seems to be the best possible for me. I guess, I should fall back to my previous suggestion (e.g. usage of separate [[Template:AUR?]] with appropriate keywords). Taking into account that 1st argument of [[Template:App]] by design can contain everything, there seems to be no way to easily extract title without hand work :(. And... wait, maybe this:
 
::{{bc|<nowiki>
 
{{{1}}} &mdash; {{{2}}}
 
: {{{3}}} || {{{4|{{AUR?|}}}}}
 
</nowiki>}}? --[[User:AlexanderR|AlexanderR]] 10:56, 1 February 2012 (EST)
 
:::Sorry, I don't get it, your last example just points to a search for the empty string as the default value for 4. And I've not understood why you would keep it in a separate template (AUR?). -- [[User:Kynikos|Kynikos]] 08:55, 4 February 2012 (EST)
 
::::My thoughts:
 
::::# I think [[Template:AUR?]] is unnecessary, and would prefer simply linking to the AUR home page as Kynikos suggests.
 
::::# The first argument should remain unformatted so that it can contain internal/interwiki links ... or anything else.
 
::::-- [[User:Pointone|pointone]] 12:41, 4 February 2012 (EST)
 
:::::>> your last example just points to a search for the empty string
 
:::::>> would prefer simply linking to the AUR home page
 
:::::Suggest better way to find all instances of [[Template:App]] with blank package field. Idea behind [[Template:AUR?]] is the same as behind [[Template:Error]] + give users unified way to fill package field when there is no package available. --[[User:AlexanderR|AlexanderR]] 06:46, 5 February 2012 (EST)
 
::::::Ah, so you meant to use [[Template:AUR?]] in the vein of [[Template:Error]], this wasn't clear at all, now I get it. Then, since AUR? should never be used explicitly, I'd rename it as [[Template:Missing Package]] and change its code to just {{ic|<nowiki><includeonly>not packaged? [https://aur.archlinux.org/ search in AUR]</includeonly></nowiki>}}.
 
::::::The code for [[Template:App]] would become:{{bc|<nowiki><includeonly>{{{1}}} &amp;mdash; {{{2}}}</nowiki><br><nowiki>: {{{3}}} || {{{4|{{Missing Package}}}}}</includeonly></nowiki>}}
 
::::::-- [[User:Kynikos|Kynikos]] 07:51, 8 February 2012 (EST)
 
::::::Also the text in the template page should be changed to be similar to that of [[Template:Error]], and we should explicitly link to [[Special:WhatLinksHere/Template:Missing Package]] from some article, probably directly from [[Template:Missing Package]]. -- [[User:Kynikos|Kynikos]] 07:54, 8 February 2012 (EST)
 

Latest revision as of 20:09, 27 February 2015