Template:Include PO: Difference between revisions

From OLPC
Jump to navigation Jump to search
(template to embed PO files in a simpler way)
 
(fixed section parameter)
Line 2: Line 2:
{| width="100%" cellpadding="0" cellspacing="0" style="background-color:#0093d0; color:white"
{| width="100%" cellpadding="0" cellspacing="0" style="background-color:#0093d0; color:white"
|-
|-
| width=50% align=left | <font size="1">&nbsp;&nbsp;Included page/section '''[[PO-laptop.org-bio-{{{lang}}}]]'''</font>
| width=50% align=left | <font size="1">&nbsp;&nbsp;Included page/section '''[[PO-laptop.org-{{{section}}}-{{{lang}}}]]'''</font>
|width=25% align=center | <font size="1">[[PO-laptop.org-bio-{{{source_lang|en-US}}}|current english]]</font>
|width=25% align=center | <font size="1">[[PO-laptop.org-{{{section}}}-{{{source_lang|en-US}}}|current {{{source_lang|english}}}]]</font>
|width=25% align=right | <font size="1">[http://wiki.laptop.org/index.php?title=PO-laptop.org-bio-{{{lang}}}&action=edit +/-]</font>&nbsp;&nbsp;
|width=25% align=right | <font size="1">[http://wiki.laptop.org/index.php?title=PO-laptop.org-{{{section}}}-{{{lang}}}&action=edit +/-]</font>&nbsp;&nbsp;
|}</div>{{:PO-laptop.org-{{{section}}}-{{{lang}}}}}
|}</div>{{:PO-laptop.org-{{{section}}}-{{{lang}}}}}
<noinclude>
<noinclude>
Line 18: Line 18:


<nowiki>{{</nowiki>Include PO
<nowiki>{{</nowiki>Include PO
section = &lt;!-- section to include (top-level, vision, laptop, foundation, bio, children, or auxiliary) --&gt;
lang = &lt;!-- language code ie: en-US, es, kr, pt, zh-CN, etc) --&gt;
lang = &lt;!-- language code ie: en-US, es, kr, pt, zh-CN, etc) --&gt;
section = &lt;!-- section to include (top-level, vision, laptop, foundation, bio, children, or auxiliary) --&gt;
source_lang = &lt;!-- OPTIONAL, by default the source language is en-US --&gt;
source_lang = &lt;!-- OPTIONAL, by default the source language is en-US --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>
Line 25: Line 25:
== Examples ==
== Examples ==


<nowiki>{{</nowiki>Include PO | section = laptop | lang = zh-CN<nowiki>}}</nowiki>
<nowiki>{{</nowiki>Include PO | lang = zh-CN | section = laptop <nowiki>}}</nowiki>
<nowiki>{{</nowiki>Include PO | section = bio | lang = pt<nowiki> | source_lang = es}}</nowiki>
<nowiki>{{</nowiki>Include PO | lang = pt | section = bio <nowiki> | source_lang = es}}</nowiki>
</noinclude>
</noinclude>

Revision as of 17:34, 2 April 2007

  Included page/section [[PO-laptop.org-{{{section}}}-{{{lang}}}]] [[PO-laptop.org-{{{section}}}-en-US|current english]] +/-  

{{:PO-laptop.org-{{{section}}}-{{{lang}}}}}

This template allows a simple way to include a given PO file of the new laptop.org site in the page. It provides links to:

  • the actual PO file translation of the section
  • the english original (by default) section
  • enter the edit-mode of the translated section

These links are helper links, nothing more.

Usage

{{Include PO
    lang    =     <!-- language code ie: en-US, es, kr, pt, zh-CN, etc) -->
    section =     <!-- section to include (top-level, vision, laptop, foundation, bio, children, or auxiliary) -->
    source_lang = <!-- OPTIONAL, by default the source language is en-US -->
}}

Examples

{{Include PO | lang = zh-CN | section = laptop }}
{{Include PO | lang = pt | section = bio  | source_lang = es}}