Template:Sandbox: Difference between revisions
Jump to navigation
Jump to search
(minor tweak to category inclusion) |
(reorganize) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
Often you need to test an idea for a template, so try it out here. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit [[Test sandbox template]]. |
|||
⚫ | |||
⚫ | |||
</noinclude><div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;"> |
|||
⚫ | |||
{| width="100%" cellpadding="0" cellspacing="0" style="background-color:#3b9fca; color:white" |
|||
|- |
|||
| <!-- width=75% --> align=left | <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> |
|||
|- |
|||
| align=left | {{:{{{source|{{#rel2abs: .. }}}}}/translations}} |
|||
| align=right | <font size="1">'''<span class="plainlinks">[{{fullurl:{{{source|{{#rel2abs: .. }}}}}|diff=current&oldid={{{version}}}}} {{{diff_display|{{:Template:Translation/changes/lang-{{{lang}}}}}}}}]</span>'''</font> |
|||
|- |
|||
⚫ | |||
</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 = <-- 2/3 character language-code of the translation—ie: <tt>en, es, ...</tt> --> |
|||
| version = <-- Version ID# of the edition being translated or last updated --> |
|||
| status = <-- 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 --> |
|||
| ''source'' = <-- OPTIONAL - Source page name—ie: "The OLPC Wiki" (sans quotes) |
|||
default = the parent-page (as translations are usually xyzzy/lang-xx) --> |
|||
| ''source_display'' = <-- OPTIONAL - display string to the source link above |
|||
default = value of ''source'' --> |
|||
| ''version_display'' = <-- OPTIONAL - display string for the translated ''version'' link |
|||
default = "original" --> |
|||
| ''diff_display'' = <-- OPTIONAL - display string for the ''differences'' to current link |
|||
default = "diff" --> |
|||
<nowiki>}}</nowiki> |
|||
; Goal |
|||
; 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. |
|||
: Given "Feature roadmap/Name of feature", return "Name of feature" |
|||
: Given "Just a title", return "Just a title" |
|||
⚫ | |||
== Samples == |
|||
{{#sub: |
|||
{{{1}}} | |
|||
{{#if: {{#pos:{{{1}}}|/}} | |
|||
{{#expr: {{#pos:{{{1}}}|/}} + 1}} | |
|||
{{#pos:{{{1}}}|/}} |
|||
}} |
|||
⚫ | |||
pos={{#pos:{{{1}}}|/}} |
|||
<nowiki>{{</nowiki> Translation | lang = es | source = The OLPC Wiki | version = 30534 <nowiki>}}</nowiki> |
|||
iftest={{#if: {{#pos:{{{1}}}|/}} | |
|||
{{ Translation | lang = es | source = The OLPC Wiki | version = 30534 }} |
|||
yes | |
|||
<nowiki>{{</nowiki> Translation | lang = es | source = The OLPC Wiki | version = 30534 |
|||
no |
|||
| 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}}]] |
|||
⚫ |
Latest revision as of 01:31, 16 March 2009
Often you need to test an idea for a template, so try it out here.
- 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). -- User:Xavi
The idea of this {{Sandbox}} page is to have that, a simple testing template that will not interfere with others and avoid leaving a trail of botched attempts.
If you try out the template here, you have to save the template and then preview to see how it works. You can instead edit Test sandbox template.
See Also http://meta.wikimedia.org/wiki/Help:Template
Please leave this comment/text above for others to read.
- Testing: subpage parsing
- Goal
- Given "Feature roadmap/Name of feature", return "Name of feature"
- Given "Just a title", return "Just a title"
{{#sub:
{{{1}}} | Expression error: Unrecognized punctuation character "{".
}}
pos={{#pos:{{{1}}}|/}} iftest=yes