Content deleted Content added
→How to use "Template Sandbox" to develop scribuntu module?: Better title for this section. |
fix portals, brackets, typos, dates, links, references, categories, formatting and persondata, typos fixed: milions → millions, wikipedia → Wikipedia using AWB |
||
Line 29:
== Using personal sandbox for script development ==
The English
=== Using "Template Sandbox" to develop Lua modules ===
Let's take a practical example. for this example, assume your user name is "Lua Developer". Let's say you want to test a bug-fix or enhancement to the [[Module:String|String]] module. There are two reasons you can't do it directly: this module contains functions that are used by hundreds of templates, transcluded in
So, the first step in "sandboxing" is to copy [[Module:String]] to the private page [[User:Lua Developer/sandbox/Module:String]]. Now our developer can edit the module to her heart's content. At any given moment, she can open [[Special:TemplateSandbox]], using the default "Sandbox prefix", which in her case, will be "User:Lua Developer/sandbox". This means that viewing any page from the sandbox page, whenever the parser encounters a Template '''T''' or Module '''M''', it will look first to see if a page named "User:Lua Developer/sandbox/Template:T" or "User:Lua Developer/sandbox/Module/M" exists, and if so, the parser will use those for the parsed page, instead of the ones in the "real" Module and Template namespaces. Any template or module which do not exist under the "Sandbox prefix", will be pulled by the parser from the appropriate namespace.
|