Jump to content

Template talk:Documentation/Archive 8

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 5Archive 6Archive 7Archive 8Archive 9Archive 10

Languges

Hi I would like to add these languges please

List of interwiki links
[[als:Vorlage:Dokumentation]]
[[ar:قالب:توثيق]]
[[as:Template:Documentation]]
[[ba:Ҡалып:Doc]]
[[bar:Vorlage:Dokumentation]]
[[bg:Шаблон:Документация]]
[[br:Patrom:Implijout patromoù]]
[[bs:Šablon:Dokumentacija]]
[[ca:Plantilla:Ús de la plantilla]]
[[ckb:داڕێژە:Documentation]]
[[cs:Šablona:Dokumentace]]
[[cy:Nodyn:Doc]]
[[da:Skabelon:Dokumentation]]
[[de:Vorlage:Dokumentation]]
[[diq:Şablon:Documentation]]
[[dsb:Pśedłoga:Dokumentacija]]
[[el:Πρότυπο:Τεκμηρίωση προτύπου]]
[[eo:Ŝablono:Dok]]
[[et:Mall:Dokumentatsioon]]
[[es:Plantilla:Documentación]]
[[eu:Txantiloi:Txantiloi dokumentazioa]]
[[fa:الگو:توضیحات]]
[[fr:Modèle:Documentation]]
[[ga:Teimpléad:Documentation]]
[[gl:Modelo:Uso de marcador]]
[[he:תבנית:תיעוד]]
[[hsb:Předłoha:Dokumentacija]]
[[hu:Sablon:Sablondokumentáció]]
[[hy:Կաղապար:Փաստաթղթեր]]
[[la:Formula:Documentation]]
[[lad:Xablón:Uso de Templates]]
[[lez:Шаблон:Doc]]
[[lv:Veidne:Dokumentācija]]
[[ltg:Taiss:Dokumentaceja]]
[[ja:Template:Documentation]]
[[ko:틀:틀 설명문서]]
[[ku:Şablon:Belgekirin]]
[[map-bms:Cithakan:Dokumentasi]]
[[ml:ഫലകം:വിവരണം]]
[[ms:Templat:Dokumentasi]]
[[nds-nl:Mal:Dokumentatie]]
[[no:mal:Dokumentasjon]]
[[nl:Sjabloon:Sjabdoc]]
[[nso:Template:Documentation]]
[[pl:Szablon:Dokumentacja]]
[[pt:Predefinição:Documentação]]
[[ro:Format:Documentaţie]]
[[ru:Шаблон:Doc]]
[[se:Málle:Documentation]]
[[simple:Template:Documentation]]
[[sk:Šablóna:Dokumentácia]]
[[sl:Predloga:Dokumentacija]]
[[sr:Шаблон:Документација]]
[[sq:Stampa:Dokumentacion]]
[[stq:Foarloage:Dokumentation]]
[[sv:Mall:Dokumentation]]
[[sw:Kigezo:Documentation]]
[[te:మూస:Documentation]]
[[tl:Suleras:Documentation]]
[[tr:Şablon:Belgeleme]]
[[tt:Үрнәк:Doc]]
[[tpi:Template:Template doc]]
[[uk:Шаблон:Документація]]
[[ur:سانچہ:Documentation]]
[[war:Batakan:Documentation]]
[[yo:Àdàkọ:Aṣàlàyé]]
[[zh:Template:Documentation]]
[[te:మూస:Documentation]]

90.222.250.124 (talk) 10:40, 11 January 2013 (UTC)

 Done. -- -- -- 04:38, 16 January 2013 (UTC)
List of interwiki links
[[ab:Ашаблон:Documentation]]
[[ace:Pola:Documentation]]
[[af:Sjabloon:Dokumentasie]]
[[ak:Şablon:Documentation]]
[[am:መለጠፊያ:አጠቃቀም]]
[[ang:Bysen:Documentation]]
[[arc:ܩܠܒܐ:ܐܫܛܪܘܬܐ]]
[[az:Şablon:Doc]]
[[av:Шаблон:Documentation]]
[[bjn:Citakan:Documentation]]
[[bn:টেমপ্লেট:Documentation]]
[[id:Templat:Dokumentasi]]
[[it:Template:Man]]
[[lo:ແມ່ແບບ:Documentation]]
I have add some more new one on march 4 2013 — Preceding unsigned comment added by 109.74.10.91 (talk) 19:53, 4 March 2013
Please don't alter old threads. I've separated out your additions. Please note that Interlanguage links should be added via Wikidata; the link is d:Special:ItemByTitle/enwiki/Template:Documentation. --Redrose64 (talk) 23:25, 4 March 2013 (UTC)

Template:documentation languges

Hi could I suggest that someone create the page Template:documentation/interwiki so that people can add languges without asking to add them so it is easer please 216.185.105.36 (talk) 21:15, 1 March 2013 (UTC)

Please see below. — Martin (MSGJ · talk) 20:35, 4 March 2013 (UTC)

Hi could someone add all the languges from [http://www.wikidata.org/wiki/Q4608595] please — Preceding unsigned comment added by 216.185.105.36 (talk) 21:40, 1 March 2013 (UTC)

Interwiki links are now added through Wikidata by using 'Edit links' at the bottom of the language list. If you can't figure it out, let us know which link is missing.
And on that point: I just migrated the current links on the doc page with a script. There are a number of links left with language codes not recognized by Wikidata. --— Gadget850 (Ed) talk 21:59, 1 March 2013 (UTC)
Since you changed your question: the Wikidata links are automatically added. --— Gadget850 (Ed) talk 21:59, 1 March 2013 (UTC)
could you copy all the links in the wiki data for documentation and out it in the documentation/doc because if I do it I have to click edit for each one when aan administrator on it can click edit and copy them all 90.222.250.124 (talk) 18:09, 4 March 2013 (UTC)
Can you see any that are missing? — Martin (MSGJ · talk) 20:37, 4 March 2013 (UTC)

Could someone add view at the end where it says template:documentation/end so that you can view it without clicking edit 90.222.250.124 (talk) 18:13, 4 March 2013 (UTC)

This seems sensible because there is a "view" link at the top as well. — Martin (MSGJ · talk) 20:32, 4 March 2013 (UTC)

Mirror

Could someone alow people when you click mirror it only shows some bit of the page your on to create a sandbox please could someone allow us to copy all the codes so it includes

 <noinclude></noinclude> and <includeonly></includeonly>

please 90.222.250.124 (talk) 18:15, 4 March 2013 (UTC)

 Not done. I don't think this is possible, because "mirror" works by substituting the template, so the noinclude stuff will be omitted. — Martin (MSGJ · talk) 20:30, 4 March 2013 (UTC)
Maybe we should add some hint to the "mirror" link then or remove it completely. I used it yesterday to clone a template into sandbox and it promtly stripped out all content between <noinclude> tags as well as <includeonly> tags. The "mirrored" template should be identical to the original, though. -- Patrick87 (talk) 11:49, 23 April 2013 (UTC)

Protection of /doc page

Hi could I suggest that someone create template:Documentation/doc/sandbox so that people can add ideas and if it approves then put it in the template:documentation/doc page so that people can help add and remove cogent without distrusting the template:documentation/doc page 216.185.105.36 (talk) 21:12, 1 March 2013 (UTC)

Shouldn't be required now, see below. — Martin (MSGJ · talk) 20:38, 4 March 2013 (UTC)

Could someone change the protection level off template:documentation/doc please so that other users can add if it starts to get vandalised agin please put it back on 109.74.10.91 (talk) 19:48, 4 March 2013 (UTC)

 Done — Martin (MSGJ · talk) 20:29, 4 March 2013 (UTC)

Template:documentation

Hi could we create a code which allows this documentation change it languge to the languge you want so that users can help en wikipedia and find it easer to use documentation 46.252.151.25 (talk) 21:27, 4 March 2013 (UTC)

Are you asking for a translation from English to another language, such as Italian? --— Gadget850 (Ed) talk 21:31, 4 March 2013 (UTC)
yes like bult a code which then you can change the languge without needing to change the whole code 46.252.151.25 (talk) 21:35, 4 March 2013 (UTC)
Unless someone translates the doc page and keeps it updated, that isn't going to happen. You can try Google Translate with mixed results.
Since you restored the IW links that I migrated, I presume you don't understand the place of Wikidata. IW links for a page are now centrally stored in Wikidata and pulled when the page is loaded. See d:Q4608595 for the links for {{Documentation}}. IW links do not translate, they link to the version of a page on another language Wikipedia.
What are you trying to accomplish? --— Gadget850 (Ed) talk 21:46, 4 March 2013 (UTC)
oh ok I thought you had to have links on the doc and wiki data 46.252.151.25 (talk) 21:52, 4 March 2013 (UTC)

Interwikis to Wikidata

Please update the template indicating the interwikis are now added in Wikidata. --Vivaelcelta {discussion  · contributions} 13:48, 6 March 2013 (UTC)

You will have to be more specific. All pages now have the interwikis rendered from Wikidata, so this template is not unique. --— Gadget850 (Ed) talk 17:58, 6 March 2013 (UTC)
I'm guessing that it would be removing the interwiki message from Template:Documentation/end box which I've done in the sandbox for discussion purposes. -- WOSlinker (talk) 19:27, 6 March 2013 (UTC)
The proposed change seems good to me. Helder 20:24, 6 March 2013 (UTC)
 Done -- WOSlinker (talk) 20:52, 6 March 2013 (UTC)

Add a view button to end box

Hi I have done some testing in Template:Documentation/end box/sandbox and have added view button to it and it seems to now be working so I would like to include it in Template:Documentation/end box please 46.45.182.142 (talk) 13:14, 10 March 2013 (UTC)

This is unnecessary. The links are already present. For example, at Template:Infobox, the documentation end box currently has twelve links: of these, two are help; three are edit links; one is a page history link; one is a diff link; one (the subpages one) is a search utility. This leaves four, as follows:
Of these, the first and fourth go to the same place, so really there are three to consider - but these seem to have identical targets to the three links that you wish to add. Why would we need to duplicate existing links? --Redrose64 (talk) 16:01, 10 March 2013 (UTC)
the view link is to view sandbox or test case like the start box has a view bottom it would be easer instead of clicking edit and then view 46.45.182.142 (talk) 17:06, 10 March 2013 (UTC)
But you don't need to click "edit" then "view". Here is how Template:Infobox would look if it used your version:
Notice that before each of your three "view" links, there is an existing link which takes you to exactly the same place. In one case,
the link is identical; in the other two cases,
it's different but has the same effect. You just need to click the link that already exists; there is no need for any more. --Redrose64 (talk) 18:26, 10 March 2013 (UTC)
should I remove view for the doc and keep view for sandbox and test case 46.45.182.142 (talk) 18:43, 10 March 2013 (UTC)
Why do you need those? They go to exactly the same page as the existing links albeit via a different URL. Any page in Wikipedia has at least two URLs. For example, this talk page may be accessed either as http://en.wikipedia.org/wiki/Template_talk:Documentation http://en.wikipedia.org/w/index.php?title=Template_talk:Documentation or http://en.wikipedia.org/w/index.php?title=Template_talk:Documentation&action=view - the &action=view part of the query string is superfluous, since this is the default. But all this is entirely unnecessary since the internal link syntax [[Template talk:Documentation]] does the same job in much less code. --Redrose64 (talk) 20:21, 10 March 2013 (UTC)
well I think we need a view button is because to do it through the edit button then click view is a longer way if you want to do it quicker we might as well add a view button start box has a view button so I think sandbox and testcases needs one 46.45.182.142 (talk) 20:23, 10 March 2013 (UTC)
But you don't need to do it through the edit button then click view. All you need to do is click on a single existing links that I have already demonstrated. Try it yourself: Here is a link to a template Template:Infobox. Now, follow that link, go to the bottom of the page to the box where you want to add three more links, and click on any one of
from Template:Infobox/doc.
this template's sandbox
and testcases
Any one. Doesn't matter. Now, having tried it, how does that differ from the "view" link that you want adding? --Redrose64 (talk) 21:20, 10 March 2013 (UTC)
In other words, view links aren't needed for Template:Infobox/doc, sandbox and testcases as clicking on Template:Infobox/doc, sandbox or testcases is what to do to view them.
Hope I've not (also) misunderstood. CsDix (talk) 00:34, 11 March 2013 (UTC)

end box {{ns:Module}}

Please add | {{ns:Module}} to documentation end box please under user box and by sandbox please 90.216.122.147 (talk) 15:59, 18 April 2013 (UTC)

Template:Documentation/link_box should be merged to Template:Documentation/end_box. --Nullzero (talk) 06:06, 23 April 2013 (UTC)
No actually link box should be used from end box. (Because module pages also show this if there is NO /doc page yet, whereas endbox explicitly closes of the transclusion of a /doc page.). I was in the process of writing that, but got distracted. —TheDJ (talkcontribs) 07:55, 23 April 2013 (UTC)

The [view], [edit], [history] and [purge] links are now appearing in front of the "Template documentation" heading. Looking at {{Documentation/start box}}, these links use class="editsection", which used to be the class used by MediaWiki itself to align section [edit] links to the right. However, the way MediaWiki does section edit links changed a little while back – the class is now called "mw-editsection", and the links should be placed after the text of the heading rather than before it. Hence, please apply this change to {{Documentation/start box}}, to make it consistent with the section edit links generated by MediaWiki once more.

Thank you. – PartTimeGnome (talk | contribs) 20:42, 20 June 2013 (UTC)

Question: I've just tried viewing some template doc pages when logged out - and they all look normal: there is an image and the heading "Template documentation" at the left, then a gap, then "[view] [edit] [history] [purge]" at right. The relevant styling is
.mw-content-ltr .editsection, .mw-content-rtl .mw-content-ltr .editsection { float: right; margin-left: 5px; }
Do you have any custom CSS that is moving the links? --Redrose64 (talk) 20:56, 20 June 2013 (UTC)
The links are showing wrong (left of the heading) for me, too. Sandbox looks fine. Changing the class name to "mw-editsection" also allows to float the links right (default behavior before the MediaWiki change) instead of next to the heading with some custom CSS (also provided as Gadget here on enwiki). --Patrick87 (talk) 21:26, 20 June 2013 (UTC)
 Done -- WOSlinker (talk) 21:31, 20 June 2013 (UTC)
Redrose64, I suspect this only changed recently (perhaps the developers removed the obsolete CSS in the last update?), so you might have needed to clear your cache to get the updated CSS. Thank you to WOSlinker for making the change. – PartTimeGnome (talk | contribs) 21:39, 20 June 2013 (UTC)

Fix for non-transcluded documentation

If you check the "This is in line documentation" example in the testcases, you will notice that at the bottom of the documentation it states "The above documentation is transcluded from Template:Documentation/doc", which is entirely false. the reason for this is that the code in template:Documentation/end box does not check to see if {{{content}}} is blank before generating this statement. there are many ways to fix this, but the best is probably to simply bypass the ifexist check if {{{content}}} is blank. I did this in Template:Documentation/end box2/sandbox. I also made a minor change to Template:Documentation/sandbox to avoid sending the entire value of {{{content}}} to all the subtemplates, which is pointless, since the subtemplates only need to know if this parameter is blank. Frietjes (talk) 23:27, 11 July 2013 (UTC)

I think this needs more consideration, it is legal to have a /doc page in addition to inline doc content - see Template:Documentation#Usage, the part from "When the |content= parameter is used" to the end of the section. --Redrose64 (talk) 09:06, 12 July 2013 (UTC)
Ah, I implemented this before I saw your post, Redrose. Let me know if you want me to revert the edits, or feel free to do it yourself if you want. — Mr. Stradivarius ♪ talk ♪ 09:16, 12 July 2013 (UTC)
Actually, I could see that this broke the test cases that use both |1= and |content=, so I've undone my edits myself. — Mr. Stradivarius ♪ talk ♪ 09:25, 12 July 2013 (UTC)

Template:Documentation/start box

Hi please go to Template:Documentation/start box/sandbox and copy the code and paste it in Template:Documentation/start box please because I have managed to put view edit history and purge to the rot like it was before they removed something in Mediawiki 1.22 90.218.219.230 (talk) 14:50, 10 July 2013 (UTC)

Just use the Gadget "Move section [edit] links to the right side of the screen." you can find here. It will move all edit links (section edit links as well as those found in this template) to the right, similar as it has been before. The links were moved on purpose in this template to be on par with the current default. --Patrick87 (talk) 15:09, 10 July 2013 (UTC)
oh ok but I have moved it back to the right using <span style="float:right; font-size:100%;"> 90.218.219.230 (talk) 15:25, 10 July 2013 (UTC)
Yes but you 1) probably used old code in the sandbox (class="editsection" instead of the current "mw-editsection"); 2) should not move the link manually. It's better to have it consistently with other section edit links. --Patrick87 (talk) 15:33, 10 July 2013 (UTC)
ok yes I put it back to edit section and remove mw- because when I used the code shown above it would work with mw- 90.218.219.230 (talk) 15:35, 10 July 2013 (UTC)
Not done: The proposed change will revert to an old version and introduce a bug at the same time - a potentially unbalanced opening <span> --Redrose64 (talk) 16:59, 10 July 2013 (UTC)
do you how I can fix the bug and what will the bug cause 90.218.219.230 (talk) 18:20, 10 July 2013 (UTC)
I've already introduced it to several other wikipedia wikis and it works for example [1] and [2] 90.218.219.230 (talk) 18:22, 10 July 2013 (UTC)
Not done: please establish a consensus for this alteration before using the {{edit protected}} template. In the case of the second one, your actual edit differs little from the edit that you want to make here; but in the case of the first, your actual edit is not just a regression but is even more buggy than the edit that you want here - there is an opening <span> which is not potentially unbalanced, but always unbalanced. It might be that those other Wikipedias didn't realise the potential harm in these edits, but the fact that they permitted them doesn't mean that they were beneficial edits, nor that they will be beneficial here. --Redrose64 (talk) 19:01, 10 July 2013 (UTC)

Hi I am not sure if I've fix the bug because I have moved <span> down a bit on Template:Documentation/start box/sandbox 90.215.222.243 (talk) 17:50, 11 July 2013 (UTC)

Not done: (i) there is no consensus; (ii) it is still a regression; (iii) it is still opening more <span> than it is closing. Please do not reactivate this unless you can prove that it is a necessary change that will not compromise existing usage. --Redrose64 (talk) 18:35, 11 July 2013 (UTC)
Hi I have reverted to the new mw- edit and have added <span style="float:right; font-size:100%;"> to it 90.216.250.151 (talk) 07:37, 18 July 2013 (UTC)
Although this is no longer a regression, there is still no consensus, and it is still opening more <span> than it is closing. --Redrose64 (talk) 09:05, 18 July 2013 (UTC)
so if I close <span> will that fix the problem 90.218.199.20 (talk) 18:11, 18 July 2013 (UTC)
I don't even see why you need two spans. Your additional one seems to be present solely to apply style="float:right; font-size:100%;" but there is no apparent reason why that could not go as an additional attribute of the existing span:
<span class="mw-editsection plainlinks" id="doc_editlinks" style="float:right; font-size:100%;">
But I'm still not putting this live without consensus - which means that there has to be a demonstrable need for it. --Redrose64 (talk) 19:35, 18 July 2013 (UTC)
ok how do I start a consensus 81.129.86.23 (talk) 13:58, 20 July 2013 (UTC)
Not at all... consensus would be if some editors answered here in favor of your proposal. Actually I already opposed your suggestion, so there is clearly no consensus for your change right now.
What do you try to achieve with it anyway? If you don't like the current look, just use the Gadget I mentioned (as I do! – at least the CSS out of it...) and all edit links will be moved to the right for you, exactly as they were before the MediaWiki change. It doesn't make any sense to introduce an inconsistency on purpose here, by moving the edit section links of the documentation template to the right. Other edit links will stays next to the heading. --Patrick87 (talk) 14:52, 20 July 2013 (UTC)
BTW, you need to create an account to use the gadget Patrick mentioned. (For a more technical alternative that doesn't need an account, copy the contents of MediaWiki:Gadget-righteditlinks.css into your browser's user CSS file. Where to find this depends on your browser and operating system; you might need to create it if it doesn't exist.)
For more information on consensus, I suggest you read Wikipedia:Consensus. – PartTimeGnome (talk | contribs) 22:11, 20 July 2013 (UTC)

Hi could we move the codes to module:documentation please because if we have a look at fr:Module:Documentation they have moved it to lua scripting 109.151.161.64 (talk) 11:40, 29 July 2013 (UTC)

Not done: please establish a consensus for this alteration before using the {{edit protected}} template.; also which "codes" are these? --Redrose64 (talk) 15:24, 29 July 2013 (UTC)
there in French and I am hoping someone on here know how to speaks English and France and can translate them into English and also knows how to script in lua 109.151.161.64 (talk) 17:46, 29 July 2013 (UTC)
I have created the module at simple:Module:Documentation I have translated as much of the French words as I can but it should look like that and if you visit simple:Template:documentation/sandbox 109.151.161.64 (talk) 20:11, 29 July 2013 (UTC)

I have asked some one translate the words and they have and have done the end box all I have to do is redo the end box because it is missing some bits from end box and I have to also add module and user and file support to it on module 109.151.161.64 (talk) 18:49, 30 July 2013 (UTC)

Edit request on 5 August 2013

Change "Subpages of this page." to "Subpages of this page" and "Subpages of this template." to "Subpages of this template", because according to MOS:FULLSTOP, a mere fragment of a sentence shouldn't end in a full stop. Now I don't know if the manual of style applies to templates too, but there you go. smtchahaltalk 10:27, 5 August 2013 (UTC)

This warrants some discussion first, so disabled request. The line would look 'unfinished' without the full stop. Edokter (talk) — 14:59, 5 August 2013 (UTC)
I really couldn't care less. If someone want to replace it with a ; or something go right ahead, or leave it as is. As long as there is something of a separator between components. The MoS does not apply to the 'meta' world as far as I know. I would say, that as long as no one has ever been confused about the function of the link due to the language, it is very low priority (in lieu of the possibility of actually starting to confuse people). —TheDJ (talkcontribs) 15:16, 5 August 2013 (UTC)
I'd prefer expanding "Subpages of..." to "List subpages of..." so it becomes an imperative statement and no longer a fragment. The problem with removing the full stop is that the phrase would then become inconsistent with the sentence before it.
The guideline you refer to is about standalone fragments in lists or captions. Where a full sentence and a fragment are combined like this I think the rule on sentence fragments in captions is most applicable: "If any complete sentence occurs in a caption, all sentences and any sentence fragments in that caption should end with a period."
Regarding whether the MOS applies to non-articles, I think technically it does not. However, that doesn't mean project pages are a wild west without any consistency. Common sense should be used. Often it is convenient to apply the same guidelines we use in articles to project pages where sensible to do so. – PartTimeGnome (talk | contribs) 20:53, 5 August 2013 (UTC)

'See also' heading

Can we remove the 'See also' heading from the default content when creating a new instance of documentation? I see many templates which have that heading, but no content. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:53, 25 August 2013 (UTC)

I concur. It's intuitive enough to add the heading if one has something to put under it. I've added an edit protected request. The change is simple enough, but here's a diff of what we want anyway. Note that Wikipedia:Template documentation#How to create a documentation subpage will also need updating to match. – PartTimeGnome (talk | contribs) 20:57, 2 September 2013 (UTC)
The subtemplate Template:Documentation/preload is not protected, so you may make the required changes yourself. Regards — Martin (MSGJ · talk) 08:51, 3 September 2013 (UTC)
You are quite right. I need to get more sleep. Andy has now made the change. – PartTimeGnome (talk | contribs) 21:28, 3 September 2013 (UTC)

Avoid categorizing template sandboxes

Template categories are polluted by template sandboxes. I suggest to modify Template:Documentation/preload in such a way that categories are not added in sandbox subpages, as shown here. Of course, this won't help for existing docs, but maybe we could run a bot or script to deal with those. Cenarium (talk) 22:46, 9 November 2013 (UTC)

I concur. I've occasionally made the same change to /doc pages myself (I think I borrowed this trick from someone else, though I don't remember who). It would be a good idea to have it in the preload for new doc pages. I don't think the <includeonly> tags you added are really needed though (it doesn't make any difference if the #ifeq is parsed on the preload page itself). – PartTimeGnome (talk | contribs) 15:22, 10 November 2013 (UTC)
Yes those aren't necessary. Debresser reverted this proposed solution at Template:Reviewer topicon/doc so I've asked for input. With regards to the stated objections, the sandbox preload includes the doc template and according to past discussions here, it can be helpful to have it there (it shows the template sandbox template for example), so simply removing the doc from the sandbox doesn't seem advisable. It is problematic to have those template sandboxes in categories, one reason being it becomes harder to find the templates one is searching for - mechanically by increasing the number of categorized pages (some categories have a proportionally large number of template sandboxes). The added code is small and outside of the space users normally edit, so it shouldn't bother them. Cenarium (talk) 23:03, 13 November 2013 (UTC)
I reverted mainly because this is not regularly implemented on documentation pages and would need wide consensus, probably on the village pump. Some short reactions to this proposal. 1. It is ugly code. 2. It should probably filter both "sandbox" and "Sandbox", or is this code capitalization neutral? 3. I'd prefer a more general change to the software that would remove all categories automatically from sandboxes, apart from an automatically generated "sandbox" category. Debresser (talk) 00:30, 14 November 2013 (UTC)
The code could be moved to a template and the template used instead of the #if on the doc pages. -- WOSlinker (talk) 07:57, 14 November 2013 (UTC)
The proposed code could easily be made case-insensitive. However, this is a rare case where the normal fix is to move the page to the right title. Most templates linking to sandboxes only check for /sandbox (e.g. {{Documentation/end box}}, {{Used in system}}, the edit notice, etc). Odd /Sandbox cases do not merit extra preload code that is unnecessary on most pages. If there's a special case, the /doc page for that special case can be edited directly.
Regarding the software changes, I'm not sure that's likely to happen; we shouldn't avoid acting because we the hope the developers might make a change. On-wiki changes are faster to make than changes to MediaWiki's core.
The normal MediaWiki mechanisms for treating pages differently from others are namespaces and behaviour switches (e.g. __DISAMBIG__). I don't like the idea of core MediaWiki code treating pages differently based on title. If a change were to be made in MediaWiki, I'd like to see a <nocat> tag to suppress categories from wiki code inside it. If the Documentation template detected it is not on the main template page, it would wrap the transclusion of /doc in <nocat>. This would also be a clean way to suppress categories when demonstrating templates in examples. – PartTimeGnome (talk | contribs) 21:29, 14 November 2013 (UTC)
The more I think about this, the more I get to agree with the proposal of adding the code. Debresser (talk) 18:59, 1 December 2013 (UTC)
I've made the change. – PartTimeGnome (talk | contribs) 21:28, 4 December 2013 (UTC)

Module:Documentation

Hi could someone help me do the rest of simple:module:documentation because all I need to add is mirror and diff and few other things from documentation start box and end box please visit simple:template:documentation/sandbox to see the preview I doint know how script in lua but someone helped me to do it because they did it on fr wiki and I ask them to help me do it on simple wiki they doint know how to do it all so pull someone who knows how to script in lua please help me 86.159.74.81 (talk) 11:52, 4 August 2013 (UTC)

Not done: Sorry, but if your code is incomplete then it's too early to file an edit request. Edit requests are for code that is already finished and ready to be added to protected pages - have a look at Wikipedia:Edit requests for more details. I see you've posted on Wikipedia:Lua requests, which is the right place to get help with this kind of thing. Have patience, and someone will look at your code eventually. This is quite a big job you're asking people to do, so it shouldn't be surprising that people haven't replied straight away. Best — Mr. Stradivarius ♪ talk ♪ 13:17, 4 August 2013 (UTC)
ok 86.159.74.81 (talk) 13:20, 4 August 2013 (UTC)
someone has created Module:documentation and is being tested in template:documentation/sandbox on en wiki 86.176.186.77 (talk) 11:49, 25 August 2013 (UTC)
hi it I have asked someone to do it because I doint know how to code in lua. he has done some more but all that needs to be added is mirror and diff and some other things to it 94.0.201.140 (talk) 17:38, 6 December 2013 (UTC)

Integrating TemplateData

I want to standardize the inclusion or placement of TemplateData. As it is now, TemplateData is included on doc pages in several different ways; sometime included in the documentation, other times in template itself, either directly or transcluded from /TemplateData. This is not a desirable situation. I would like to establish a standard on where and how to include TemplateData into the documentation (or elsewhere). So,

  • Where should TemplateData be placed?
    1. In the template page
    2. In the /Documentation (/doc) sub page
    3. In the /TemplateData (/[...]data) sub page
  • Where should it be placed visually?
    1. Inside the documentation area
    2. Outside/below the documentation area
  • How should it be displayed?
    1. Plain/text only
    2. With its own background color

Let the discussion commence! Personally, I'd prefer 3/2/2. Edokter (talk) — 12:24, 15 December 2013 (UTC)

Regarding placement I'd vote for "3. In the /TemplateData sub page". It's the most flexible possibility and allows us to easily change the appearance you're asking for in the other two bullet point whenever necessary. If we want another placement we can quickly change the position of the transclusion in the template – something we're not able to when we put TemplateData into the /Doc subpage or even the template page itself. For the other two bullet points I have no real preference. --Patrick87 (talk) 15:00, 15 December 2013 (UTC)
  • 3/2/2 --  Gadget850 talk 21:00, 15 December 2013 (UTC)
  • I would support /doc/data, /TemplateData, or similar (/data is probably no good because it may contain raw data lookup for the template), and would further suggest that {{documentation}} should be rewritten to automatically include some sort of interpretation of the template data file after the documentation page. This may require splitting the "The above documentation is transcluded from Template:X/doc." and "Editors can experiment in this template's sandbox and testcases pages. Please add categories to the /doc subpage. Subpages of this template." footers. VanIsaacWS Vexcontribs 02:00, 16 December 2013 (UTC)
Portuguese Wikipedia uses a /Dados subpage and transcludes it to the /doc subpage using pt:Template:Documentação dos parâmetros, but what I would prefer is the new namespace proposed on bugzilla (see also bugzilla:50512#c0). Helder 11:38, 18 December 2013 (UTC)

Not much input, but 3/2/2 seems to have consensus; a separate sub page, below the documentation, in its own color. I suggest we put the template data in /doc/data and auto-transclude the (raw) data from there to put below the documentation footer. Edokter (talk) — 13:59, 14 January 2014 (UTC)

One additional thing. I've been wondering for a while why the VE team didn't go with a json contentmodel blob on a fixed page, but with a tag. We should ask them, because these JSON in wikitext blobs are just weird to me and if there is nothing blocking a transition to fix that, then I think we should move them into a pure separate JSON page at some point. —TheDJ (talkcontribs) 17:08, 14 January 2014 (UTC)
@Edokter: Nah, don't put it into /doc/data. A simple /data subpage (or /templatedata if we want a more descriptive name at the cost of slightly less convenience) as a direct subpage of the template itself is totally suitable. Let's avoid unnecessary nesting. --Patrick87 (talk) 18:08, 14 January 2014 (UTC)
I'd agree with /data or /templatedata . Do you want to get something done in the sandbox for any interested to view? Could also be worth updating {{Documentation subpage}} to work on both /doc and whatever the subpage ends up being called and it could include pages into Category:Template data pages. -- WOSlinker (talk) 19:15, 14 January 2014 (UTC)
Not set on anything myself, but as Helder pointed out, /data may be used by some templates for their own purposes. /templatedata it is then. Go ahead with the sandbox. I have some CSS here for some basic styling ready. Edokter (talk) — 19:59, 14 January 2014 (UTC)
Anybody has an idea on how to search for such potential /data subpages used for other purposes? This way we could evaluate if it is a real or only an academic problem (if we want to use the abbreviated name at all; personally I like /templatedata more anyway). --Patrick87 (talk) 20:07, 14 January 2014 (UTC)
I've done a start in {{documentation/sandbox2}} and it's on {{Big}} as a demo. Needs more work doing on it. -- WOSlinker (talk) 22:19, 14 January 2014 (UTC)
Looks good so far, but I would separate the header (not nest them). Then both can be styled using the .mw-templatedata-doc-wrap and .templatedata-header classes. Edokter (talk) — 22:45, 14 January 2014 (UTC)
Two suggestions: (i) reduce the gap at the top so that it's the same as the one above the end box; (ii) use a background colour that is not the same as the documentation background - possibly a light blue? --Redrose64 (talk) 22:49, 14 January 2014 (UTC)
The reason I suggested the following CSS. I can put it in Common.css. Edokter (talk) — 22:58, 14 January 2014 (UTC)
/* TemplateData box */
.mw-templatedata-doc-wrap,
.templatedata-header {
    border: 1px solid #AAA;
    background-color: #ECF4FC;
    margin: 0.2em 0;
    padding: 0 1em;
}
Also, would it be better to put the templatedata in-between the documentation and the bottom box rather than at the end? -- WOSlinker (talk) 23:11, 14 January 2014 (UTC)
Technically, it is not part of the documentation. I would say no. Edokter (talk) — 23:17, 14 January 2014 (UTC)

Module:Documentation ready to deploy

I've been working on Module:Documentation for a while now, and it is just about ready for deployment. It is intended to be a workalike of the current {{documentation}} template, so it should have all the familiar features. It is also intended to be portable, and it has a configuration module at Module:Documentation/config that can be edited for use with different languages and wiki setups. It also has one new parameter, the |page= parameter, where you can set the "current" page for testing purposes. You can use {{documentation/sandbox}} to test it on wiki pages. Test cases are at Module:Documentation/testcases (run tests), and there are also some old test cases at Template:Documentation/testcases. Having {{documentation}} in Lua means that we have a lot more flexibility, so if there are new features that people have been wanting to put in then now would be a good time to ask. And please have a play around with it, see if you can find any bugs, and generally see what you think. Pings for recent participants on this talk page: @Edokter, Redrose64, Patrick87, PartTimeGnome, Cenarium, Debresser, and WOSlinker: @Gadget850, TheDJ, VanIsaac, and Helder.wiki:Mr. Stradivarius ♪ talk ♪ 07:26, 28 January 2014 (UTC)

Excellent work! Would it be possible to have a show/hide button at the top right? Would be very useful when previewing/editing a template with a large doc page. Thanks. --NSH002 (talk) 12:55, 29 January 2014 (UTC)
That's an interesting idea. I've created a mock-up of how this would look in my sandbox. I think it may be more useful for Lua modules than templates, as the template output almost always comes above the documentation, whereas for Lua modules it is the other way round. Are you thinking that it would save scrolling back to the edit window after you have previewed the template output? Also, this would be quite a big change internally for the template, as we have to switch everything from <div>...</div> tags to <table>...</table> tags or the collapsing doesn't work. For that reason, I'd want to make sure that there's a consensus for this change before deciding to implement it. (Perhaps this could be discussed after the initial switch to the module.) — Mr. Stradivarius ♪ talk ♪ 05:29, 30 January 2014 (UTC)
To clarify, the idea is to reduce the amount of scrolling up/down between the edit box at the bottom and the template output at the top. I like to do my edits in one big go, so I do a lot of tweak/preview cycles. Would be even better if it maintained its state between change/preview cycles, but I don't suppose that would be easy! I trust your judgement on the best way to proceed. --NSH002 (talk) 11:00, 31 January 2014 (UTC)
That's fair enough. I don't think it's possible for it to save its state, though, at least not just with template/module code. I think we should wait to see what others say about this, and then implement it on the module's next iteration if it seems to have support. In fact, I think I will go and make the switchover now. Please keep an eye out for documentation templates that behave strangely! — Mr. Stradivarius ♪ talk ♪ 11:12, 31 January 2014 (UTC)
A feature suggestion: It would be nice if there were some way to automatically change the content in the template sandbox to match that in the main version, or the other way around (e.g. by clicking a link that says "Update sandbox" or something like that). This would be useful since many edits of that kind are done when work on a sandbox version is finished and it's being migrated to the main template. There already is functionality of this kind (the "clone" link), but it only works when the sandbox version does not exist. APerson (talk!) 17:38, 31 January 2014 (UTC)
Unfortunately, the cloning isn't perfect, as the MediaWiki feature it is based on wasn't originally designed for this kind of use. Anything that is contained in <noinclude>...</noinclude> tags would not copied across, which would mean we would lose the documentation. Copying and pasting is probably the way to go until we can work out a way to transfer everything over without being altered. I will note that it works very well for Lua modules, however, as they generally don't (can't?) use tags like <noinclude>...</noinclude>. — Mr. Stradivarius ♪ talk ♪ 18:07, 31 January 2014 (UTC)
I wasn't talking about the documentation being copied, just the template code. This would be useful when working with large and complex templates. APerson (talk!) 18:48, 31 January 2014 (UTC)
I did mean the template code. Specifically, the part that looks like this:
<noinclude>
{{documentation}}
</noinclude>
You generally want to include this when copying code to and from the sandbox, but this isn't currently possible as the <noinclude>...</noinclude> tags and all the code contained within them are stripped. We would need to change the MediaWiki software in order to copy code with no changes at all. — Mr. Stradivarius ♪ talk ♪ 03:05, 1 February 2014 (UTC)

VisualEditor makes [view] become [edit source]

When I enable VisualEditor, "[view]" from the row besides "Template/Module documentation" ([view] [edit] [history] [purge]) becomes [edit source]. Can you fix it? Thank you. --Nullzero (talk) 13:59, 31 January 2014 (UTC)

The {{documentation}} template has been behaving this way for a while now, and I agree that it is a bit annoying. We could fix it with inline styling, once we figure out what the correct styling is, but I have a feeling that it might be better to fix it at the source. The first step would be to find out where the mw-editsection class lives, as that's the one that is being altered by VisualEditor. I'm not sure where it is off the top of my head though. — Mr. Stradivarius ♪ talk ♪ 14:57, 31 January 2014 (UTC)
Use mw-editsection-like instead of mw-editsection see discussion at - Wikipedia:Village_pump_(technical)/Archive_117#Template_documentation_header_problem --Lam-ang (talk) 15:35, 31 January 2014 (UTC)
Nice find, thank you. :) It should be fixed now. — Mr. Stradivarius ♪ talk ♪ 17:55, 31 January 2014 (UTC)
Ah, one problem with this: MediaWiki:Gadget-righteditlinks.css ("Move section [edit] links to the right side of the screen") no longer works on these links now the class has been changed. The simplest fix would be to update the gadget to function on both .mw-editsection and .mw-editsection-like. – PartTimeGnome (talk | contribs) 21:36, 31 January 2014 (UTC)
Ok, I've applied a fix to MediaWiki:Gadget-righteditlinks.css. It appears to be working in my tests, but let me know if you notice anything strange. — Mr. Stradivarius ♪ talk ♪ 03:41, 1 February 2014 (UTC)
Thank you! That looks fine. – PartTimeGnome (talk | contribs) 16:21, 1 February 2014 (UTC)

Script error

Template:Infobox element is currently showing a script error indicating that "The time allocated for running scripts has expired." Frietjes (talk) 16:37, 3 February 2014 (UTC)

The problem appears to be in the content function – replacing the {{documentation}} on that template with {{#invoke:documentation|content}} generates the same error when I preview the page.
I'm not an expert on Lua scripts, but I think the problem is related to the frame:preprocess call that reads the /doc page. AIUI, it causes the time taken to parse the /doc page to count as time used by the script. Template:Infobox element has a largish /doc page that transcludes a few complex templates, so it takes longer to parse and exceeds the limit on script execution time.
The Scribunto documentation indicates frame:expandTemplate is faster than frame:preprocess for expanding a single template. However, I'm not sure the speed improvement would be enough. Mr. Stradivarius, you've got more experience at this than me. Any ideas how we could handle this? Did I get anything wrong in my analysis? – PartTimeGnome (talk | contribs) 21:58, 3 February 2014 (UTC)
Nope, your analysis seems spot on. I've changed the module to use frame:expandTemplate instead of frame:preprocess, and now it shows the full doc page when used with {{#invoke:documentation|content}}. But it still isn't fast enough when using plain {{documentation}}. Part of the reason is that it also needs to expand {{pp-template}}, which is itself a fairly heavy template. I removed the navboxes from the bottom of the /doc page, and that did the trick. Frietjes' suggestion of removing {{Periodic table}} from the navbox template would likely also work, as that template is pretty heavy too. If you don't want to remove anything from the /doc page, though, you could either use {{documentation/old}}, which I've just copied from the pre-Lua {{documentation}}, or you could convert some more of the templates on that page to Lua. {{Periodic table}} seems the best target to me. Also, {{pp-meta}} will probably be undergoing a rewrite soon, so that should speed things up. — Mr. Stradivarius ♪ talk ♪ 23:05, 3 February 2014 (UTC)
@Mr. Stradivarius: I now get a "Cannot find section" error when I try to edit any of the transcluded sections from the page transcluding the documentation. the links work fine from the /doc page, but not from the main template (e.g., clicking on a section edit link in template:Infobox dam). Frietjes (talk) 15:23, 6 February 2014 (UTC)
Hmm... The links are trying to edit a section on the template itself, not the documentation. I think this might be a limitation/bug of Scribunto: when a Lua script expands a template, MediaWiki doesn't keep track of where the headings came from as it does for templates transcluded normally. This is possibly one for Bugzilla. – PartTimeGnome (talk | contribs) 21:30, 6 February 2014 (UTC)
Yes, this is a Scribunto bug, and will need to be fixed in the extension itself. Now that you post this here, I do remember reading about this bug somewhere before. I couldn't find it in Bugzilla when I looked just now, though. — Mr. Stradivarius on tour ♪ talk ♪ 22:54, 6 February 2014 (UTC)
Perhaps this is serious enough that we should revert back to the old template until it is fixed? — Mr. Stradivarius on tour ♪ talk ♪ 23:03, 6 February 2014 (UTC)
Aha, this bug doesn't occur when frame:preprocess is used, only frame:expandTemplate. I've reverted back to the frame:preprocess version, even though it may take some pages over the 10-second limit. — Mr. Stradivarius ♪ talk ♪ 04:46, 7 February 2014 (UTC)
I've found the Bugzilla bug - it's bugzilla:55525, and has already been fixed. The fix should be live on Wikipedia on the 13th Feb, which is why it was still affecting us here. — Mr. Stradivarius ♪ talk ♪ 06:13, 7 February 2014 (UTC)
Good work, both to you and the developers! I did look for a bug last night, but wasn't able to find it. I was also worried we might be waiting a while for a fix; it's excellent to find it's already fixed! – PartTimeGnome (talk | contribs) 21:05, 7 February 2014 (UTC)

Module sandbox now shows main doc

MediaWiki:Scribunto-doc-page-show now uses {{documentation}} which uses Module:Documentation, and I think that is responsible for a new, possibly unintended, feature. In the past, viewing Module:Convert/sandbox would show Module:Convert/sandbox/doc at the top. It now shows Module:Convert/doc instead. Can it be fixed to show the main doc only if a sandbox doc page does not exist? Johnuniq (talk) 10:27, 7 February 2014 (UTC)

That's an intended feature - the intention was to imitate what the {{documentation}} template does in the template namespace. This was also the behaviour for sandbox modules without /doc subpages since my edit here, and you're right, it became the behaviour for sandbox modules with documentation pages after MediaWiki:Scribunto-doc-page-show was switched to use {{documentation}} here. Module:Convert/sandbox/doc is the only place I'm aware of that does something like this - would you be able to manage with putting it in the main docs or in an edit notice instead? — Mr. Stradivarius ♪ talk ♪ 16:29, 7 February 2014 (UTC)
Now works after this edit. -- WOSlinker (talk) 20:01, 7 February 2014 (UTC)
I agree with Mr. Stradivarius; that sandbox doc page would be better as an edit notice; it's whole content is only relevant to people editing the page. – PartTimeGnome (talk | contribs) 21:12, 7 February 2014 (UTC)
Thanks WOSlinker. Not many people will want to inspect a module sandbox with no thought for editing it, and IMHO the general docs are not much help on the sandbox page. After saving an edit to the sandbox, it is useful to see the info in the sandbox doc page. Johnuniq (talk) 22:12, 7 February 2014 (UTC)
I don't think we should have a hack that only works for modules. If this is the desired behaviour, how about putting it into the module proper so that it will work this way for templates and other pages too? — Mr. Stradivarius ♪ talk ♪ 01:31, 8 February 2014 (UTC)
Yes, I think that would be desirable. Johnuniq (talk) 02:22, 8 February 2014 (UTC)

Line 402 (protectionlevel)

In line 402 of Module:Documentation an lua protectionlevel function - mw.title.new("text").protectionLevels["action"], should be used instead of the parser function "protectionlevel". See also mw:Extension:Scribunto/Lua_reference_manual#Title_objects, where the Lua function protectionLevels is documented.--Snaevar (talk) 16:56, 28 February 2014 (UTC)

I'll take a look at it. — Mr. Stradivarius ♪ talk ♪ 01:22, 13 March 2014 (UTC)
@Jackmcbarn: I see that title.protectionLevels gives a table like this:
{
	["edit"] = {
		"sysop"
	},
	["move"] = {
		"sysop"
	}
}
Why not just like this?
{
	["edit"] = "sysop",
	["move"] = "sysop"
}
Can there be more than one protection level for each protection type? And am I always guaranteed to find the highest protection level by using title.protectionLevels.edit[1]? Enquiring minds need to know. :) — Mr. Stradivarius ♪ talk ♪ 02:21, 13 March 2014 (UTC)
For now, yes, just use [1]. In the future, an update to MediaWiki could allow multiple protection levels on the same action. (Beware that if the page is unprotected, the return value may be {}, not always { edit = {} } as you might expect. Jackmcbarn (talk) 02:50, 13 March 2014 (UTC)
Thanks, that helps a lot. I've now updated the module to use protectionLevels, so I guess we can consider this request answered. — Mr. Stradivarius ♪ talk ♪ 04:08, 13 March 2014 (UTC)

Lua error in Module:Documentation at line 409: attempt to index local 'protectionLevels' (a nil value).

I've exported a few modules and templates from MediaWiki and imported them into my own wiki and as soon as I open a template (e.g. Template:Documentation, Template:Divbox, Template:Ombox), I get the following script error:

Lua error in Module:Documentation at line 409: attempt to index local 'protectionLevels' (a nil value).

Backtrace:

    (tail call): ?
    Module:Documentation:409: in function "protectionTemplate"
    Module:Documentation:132: ?
    (tail call): ?
    mw.lua:553: ?
    (tail call): ?
    [C]: in function "xpcall"
    MWServer.lua:73: in function "handleCall"
    MWServer.lua:266: in function "dispatch"
    MWServer.lua:33: in function "execute"
    mw_main.lua:7: in main chunk
    [C]: ?

I searched for hours on Google to find a solution, but no luck. Any help would be highly appreciated. Tessus (talk) 23:07, 18 March 2014 (UTC)

This module relies on features new to MediaWiki 1.23 and/or the latest git version of mw:Extension:Scribunto. Jackmcbarn (talk) 00:01, 19 March 2014 (UTC)
I've fixed the module so that it won't produce a script error if protectionLevels is not present. However, if you don't have protectionLevels on your wiki you might want to use this version of the module which uses the {{PROTECTIONLEVEL}} parser function, as otherwise the protection icons in the top-hand-corner of the page won't work. — Mr. Stradivarius ♪ talk ♪ 00:54, 19 March 2014 (UTC)
Thanks, but I have no idea what you are suggesting. I have installed MediaWiki 1.22.4, I have no clue why/how I should or should not have protectionLevels on my wiki. I'm not entirely sure what I shall do now. Shall I use the old version or your fixed version? Tessus (talk) 01:06, 19 March 2014 (UTC)
Either upgrade your Scribunto extension to the latest version available, or use the version of the module that Mr. Stradivarius showed you. Jackmcbarn (talk) 01:13, 19 March 2014 (UTC)
I tried the latest version of Scibunto, but it didn't help. Then I tried the latest Module:Documentation and it seems to work. But I'm still missing all the images which the templates depend on. Also the background of the template documentation is green on wikipedia, white on my wiki. Well, it's not really an issue, just a difference. Do you know, if there is a way to grab all the necessary images from wikipedia (e.g. Imbox_notice.png) which are necessary for a template? Tessus (talk) 01:26, 19 March 2014 (UTC)
Not sure about the images. For the green background, you also need to import MediaWiki:Common.css. — Mr. Stradivarius ♪ talk ♪ 03:22, 19 March 2014 (UTC)
Yep, did that, or at least parts of it. I guess I was not thorough enough. Thx for all your help. Tessus (talk) 05:16, 19 March 2014 (UTC)
The important class from Common.css is the template-documentation class. It looks like you also need to import MediaWiki:Common.js/IEFixes.js to make the iezoomfix class work properly, but that only matters if you are interested in supporting Internet Explorer 8. — Mr. Stradivarius ♪ talk ♪ 05:36, 19 March 2014 (UTC)
Info for using images from Wikimedia Commons - mw:Manual:$wgUseInstantCommons and mw:InstantCommons--Lam-ang (talk) 06:03, 19 March 2014 (UTC)
Thanks for all your help and info. Tessus (talk) 05:17, 20 March 2014 (UTC)