Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(minor tweak to category inclusion)
(test substring)
Line 8: Line 8:
[[Category:Template]]
[[Category:Template]]


: <big>'''Testing: {{tl|Translation}}<strike></strike>'''</big>
: <big>'''Testing: subpage parsing'''</big>


; Goal
</noinclude><div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;">
: Given "Feature roadmap/Name of feature", return "Name of feature"
{| width="100%" cellpadding="0" cellspacing="0" style="background-color:#3b9fca; color:white"
: Given "Just a title", return "Just a title"
|-
| <!-- width=75% --> align=left | &nbsp;&nbsp;<font size="1">{{:Template:Translation/translation of/lang-{{{lang}}}}} '''[[{{{source|{{#rel2abs: .. }}}}}|{{{source_display|{{{source|{{#rel2abs: .. }}}}}}}}]]'''</font>
| <!-- width=25% --> align=right | <font size="1">'''<span class="plainlinks">[{{fullurl:{{{source|{{#rel2abs: .. }}}}}|oldid={{{version}}}}} {{{version_display|{{:Template:Translation/original/lang-{{{lang}}}}}}}}]</span>'''</font>&nbsp;&nbsp;
|-
| align=left | &nbsp;&nbsp;{{:{{{source|{{#rel2abs: .. }}}}}/translations}}
| align=right | <font size="1">'''<span class="plainlinks">[{{fullurl:{{{source|{{#rel2abs: .. }}}}}|diff=current&amp;oldid={{{version}}}}} {{{diff_display|{{:Template:Translation/changes/lang-{{{lang}}}}}}}}]</span>'''</font>&nbsp;&nbsp;
|-
|}
</div><includeonly>[[Category:Translations {{ #switch: {{lc:{{{status|wanted}}}}}
| new = to review
| old = to sync
| ok = finished
| ongoing = ongoing
| wanted = wanted
| wanted
}} lang-{{{lang}}}|{{PAGENAME}}]]
[[Category:Translations lang-{{{lang}}}|{{PAGENAME}}]]</includeonly><noinclude>


== Usage ==

<nowiki>{{</nowiki> Translation
| lang = &lt;-- 2/3 character language-code of the translation&mdash;ie: <tt>en, es, ...</tt> --&gt;
| version = &lt;-- Version ID# of the edition being translated or last updated --&gt;
| status = &lt;-- Status of the translation:
new = brand new (finished) translation, which would need to be ''reviewed''
old = the source has been modified, so it needs to be ''sync'ed''
ok = the page has been reviewed and 'approved' (sort of speaking)
ongoing = the translation is not yet finished, and somebody is actively working on it
wanted = unfinished and nobody is actively working on it --&gt;
| ''source'' = &lt;-- OPTIONAL - Source page name&mdash;ie: "The OLPC Wiki" (sans quotes)
default = the parent-page (as translations are usually xyzzy/lang-xx) --&gt;
| ''source_display'' = &lt;-- OPTIONAL - display string to the source link above
default = value of ''source'' --&gt;
| ''version_display'' = &lt;-- OPTIONAL - display string for the translated ''version'' link
default = "original" --&gt;
| ''diff_display'' = &lt;-- OPTIONAL - display string for the ''differences'' to current link
default = "diff" --&gt;
<nowiki>}}</nowiki>

; NOTE : the ''version'' parameter is the number displayed in the ''source'' page in the <tt>[ID# xxxxx]</tt> of the language-navigation blue bar. Keeping this number updated to the LAST version you 'translated' or 'updated' will ease updating the page when following the <tt>diff</tt> link in your page, as it will show those changes in the original from your last update.

== Samples ==

<nowiki>{{</nowiki> Translation | lang = es | source = The OLPC Wiki | version = 30534 <nowiki>}}</nowiki>
{{ Translation | lang = es | source = The OLPC Wiki | version = 30534 }}
<nowiki>{{</nowiki> Translation | lang = es | source = The OLPC Wiki | version = 30534
| source_display = original
| version_display = versión traducida
| diff_display = últimos cambios <nowiki>}}</nowiki>
{{ Translation | lang = es | source = The OLPC Wiki | version = 30534
| source_display = original | version_display = versión traducida | diff_display = últimos cambios }}

[[Category:Template|{{PAGENAME}}]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
</noinclude>
</noinclude>
{{#sub:
{{{1}}} |
{{#pos:{{{1}}}|/}}
}}

Revision as of 11:37, 21 December 2008

Many times you may want to just 'test' an idea for a template, I haven't found a sensible way of fully testing templates by themselves (as they will not get included in the edited version, but rather the saved version).

The idea of this {{Sandbox}} is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.

Please leave this comment/text for others to read.
See Also http://meta.wikimedia.org/wiki/Help:Template
Testing: subpage parsing
Goal
Given "Feature roadmap/Name of feature", return "Name of feature"
Given "Just a title", return "Just a title"


{{#sub:

 {{{1}}} |
 {{#pos:{{{1}}}|/}}

}}