Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (tweaking)
m (tweaking)
Line 31: Line 31:


|-
|-
| style="text-align:right;" | '''Source:'''
| style="text-align:right;" | '''X-Source:'''
| style="text-align:left;" | {{{source}}}
| style="text-align:left;" | {{{source}}}

{{ #if: {{{language}}} | {{!}}-
{{ #if: {{{source|}}} | <!-- IF source -->
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Source:'''
{{!}} style="text-align:left;" {{!}} {{{source}}}
{{ #if: {{{language|}}} | <!-- IF language -->
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Language:'''
{{!}} style="text-align:right;" {{!}} '''Language:'''
{{!}} style="text-align:left;" {{!}} {{{language}}}
{{!}} style="text-align:left;" {{!}} {{{language}}}
| <!-- IF NO language --> }}
|}}
{{ #if: {{{l10n|}}} | <!-- IF l10n -->
{{!}}-
{{!}} style="text-align:right;" {{!}} '''[[Localization|l10n]]:'''
{{!}} style="text-align:left;" {{!}} {{ #ifexist: {{PAGENAME}}/Localization|[[{{PAGENAME}}/Localization]]|{{{l10n|''<span class="plainlinks">[{{fullurl:{{PAGENAME}}}}/Localization add it here]</span>''}}} }}
| <!-- IF NO l10n --> }}
| <!-- IF NO source --> }}
|-
|-
| style="text-align:right;" | '''[[Localization|l10n]]:'''
| style="text-align:right;" | '''X-[[Localization|l10n]]:'''
| style="text-align:left;" | {{ #ifexist: {{PAGENAME}}/Localization|[[{{PAGENAME}}/Localization]]|{{{l10n|''<span class="plainlinks">[{{fullurl:{{PAGENAME}}}}/Localization add it here]</span>''}}} }}
| style="text-align:left;" | {{ #ifexist: {{PAGENAME}}/Localization|[[{{PAGENAME}}/Localization]]|{{{l10n|''<span class="plainlinks">[{{fullurl:{{PAGENAME}}}}/Localization add it here]</span>''}}} }}
{{ #if: {{{testplan|{{#ifexist:{{PAGENAME}}/Test plan|gotpage}}}}} | {{!}}-
{{ #if: {{{testplan|{{#ifexist:{{PAGENAME}}/Test plan|gotpage}}}}} | {{!}}-
Line 105: Line 117:
| type = activity
| type = activity
| status = beta
| status = beta
| l10n = <nowiki>[[Localization]]</nowiki>
<nowiki>}}</nowiki>
; Notes : Taking the ''component'' name from the <nowiki>{{PAGENAME}}</nowiki>, ''icon'' is undefined. Goes into the l10n category, as it can be l10n'ed.

<br clear="all">
{{ Sandbox | type = Activity | status = beta | source = [[foo]] | l10n = [[Localization]] }}
<nowiki>{{</nowiki> Sandbox
| type = activity
| status = beta
| source = [[foo]]
| l10n = <nowiki>[[Localization]]</nowiki>
| l10n = <nowiki>[[Localization]]</nowiki>
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>

Revision as of 17:52, 30 June 2007

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 Template: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: Status box


Sandbox
(activity)
Status: {{{status}}}
Version: {{{version}}}
Base: {{{base}}}
X-Source: {{{source}}}


X-l10n: add it here
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Unknown Component]]
    type => {{{type}}} | {{{type}}}
[[Category:Software idea]]
    source => {{{source}}} | no source
    type => {{{type}}} | {{{type}}}
    status => {{{status}}} | {{{status}}}
[[Category:Pending i18n]]
    l10n => {{{l10n}}}


This template automatically includes the page in the [[:Category:{{{type}}}]].

Usage

{{Status box
 | component    = <!-- Name of the component -->
 | type         = <!-- Type of the component {activity, core, support} -->
 | icon         = <!-- file name.ext (sans [[Image:file name.ext]] -->
 | status       = <!-- Status of the activity -->
 | version      = <!-- Current/latest version available -->
 | base         = <!-- Yes/No if it's included in the OS images
                       / Could be the first build number -->
 | source       = <!-- Repository / location of the source -->
 | language     = <!-- OPTIONAL -- Computer language of the source -->
 | l10n         = <!-- Repository / location of the l10n resources -->
 | testplan     = <!-- OPTIONAL -- link to the test plan page -->
 | contributors = <!-- People contributing to the activity -->
 }}

Sample



Foo
(Bar)
Xo s.png
Status: {{{status}}}
Version: {{{version}}}
Base: {{{base}}}
X-Source: {{{source}}}


X-l10n: add it here
Test plans: some page
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Unknown Component]]
    type => Bar | bar
[[Category:Software idea]]
    source => {{{source}}} | no source
    type => Bar | bar
    status => {{{status}}} | {{{status}}}
[[Category:Pending i18n]]
    l10n => {{{l10n}}}

{{ Sandbox
| component = Foo
| type = Bar
| icon = Xo s.png
| testplan = [[some page]]
}}
Notes
the type is not recognized, so defaults to a general one, testplan shows because it has one specified, icon shows, goes into pending 18n as no l10n resource is given.



Sandbox
(Activity)
Status: beta
Version: {{{version}}}
Base: {{{base}}}
X-Source: {{{source}}}


X-l10n: Localization
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Activity]]
    type => Activity | activity
[[Category:Software idea]]
    source => {{{source}}} | no source
    type => Activity | activity
    status => beta | beta
[[Category:l10n]]
    l10n => Localization

{{ Sandbox
| type = activity
| status = beta
| l10n = [[Localization]]
}}
Notes
Taking the component name from the {{PAGENAME}}, icon is undefined. Goes into the l10n category, as it can be l10n'ed.



Sandbox
(Activity)
Status: beta
Version: {{{version}}}
Base: {{{base}}}
X-Source: foo
Source: foo
l10n: Localization
X-l10n: Localization
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Activity]]
    type => Activity | activity
[[Category:Activity beta]]
    source => foo | has source
    type => Activity | activity
    status => beta | beta
[[Category:l10n]]
    l10n => Localization

{{ Sandbox
| type = activity
| status = beta
| source = foo
| l10n = [[Localization]]
}}
Notes
Taking the component name from the {{PAGENAME}}, icon is undefined. Goes into the l10n category, as it can be l10n'ed.