Help:Rosetta Code Needs: Difference between revisions
Content added Content deleted
m (→[[Pseudocode]]) |
(redundant repetition of ending paragraphs) |
||
Line 27: | Line 27: | ||
When a programming example is created, it often looks something like this: |
When a programming example is created, it often looks something like this: |
||
<pre><nowiki> |
|||
==[[Pseudocode]]== |
|||
(some code) |
|||
</nowiki></pre> |
|||
In such cases, there is no link to a category, and the contributing author usually does not create content at the [[Pseudocode]] link. A bot is needed which sees such examples and performs a few simple operations. |
|||
First, the code example needs to be categorized: |
|||
<pre><nowiki> |
|||
==[[Pseudocode]]== |
|||
[[Category:Pseudocode]] |
|||
(some code) |
|||
</nowiki></pre> |
|||
Now we've got a link to a nonexistent page, and, at the bottom of the task page, a link to a nonexistent category. The language page needs to be created and filled with a simple redirect to the category page: |
|||
<pre><nowiki> |
|||
#REDIRECT [[:Category:Pseudocode]] |
|||
</nowiki></pre> |
|||
Note that the colon preceding the word "Category" is important; it prevents the redirect page from being included in the language category. |
|||
Finally, we need to open the Category page, and fill in the <tt><nowiki>{{Programming Language}}</nowiki></tt> template: |
|||
<pre><nowiki>{{Programming Language}}</nowiki></pre> |
|||
MediaWiki handles the rest. |
|||
<pre><nowiki> |
<pre><nowiki> |
||
==[[Pseudocode]]== |
==[[Pseudocode]]== |