Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
(testing a new to categorize)
(testing some idea for Template:Translation)
Line 8: Line 8:
[[Category:Template]]
[[Category:Template]]


: <big>'''Testing: {{tl|Google Translations}}<strike></strike>'''</big>
: <big>'''Testing: {{tl|Translation}}<strike></strike>'''</big>


</noinclude><div style="border-top:1px solid #888888; border-bottom:1px solid #888888; margin:0px;">
</noinclude><span class="plainlinks">''{{{title|Google}}}{{#if:{{{ar|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Car&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ar}}]}}{{#if:{{{de|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cde&hl=en&ie=UTF-8&oe=UTF-8 {{#language:de}}]}}{{#if:{{{es|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Ces&hl=en&ie=UTF-8&oe=UTF-8 {{#language:es}}]}}{{#if:{{{fr|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cfr&hl=en&ie=UTF-8&oe=UTF-8 {{#language:fr}}]}}{{#if:{{{it|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cit&hl=en&ie=UTF-8&oe=UTF-8 {{#language:it}}]}}{{#if:{{{ja|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cja&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ja}}]}}{{#if:{{{ko|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cko&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ko}}]}}{{#if:{{{pt|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cpt&hl=en&ie=UTF-8&oe=UTF-8 {{#language:pt}}]}}{{#if:{{{ru|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Cru&hl=en&ie=UTF-8&oe=UTF-8 {{#language:ru}}]}}{{#if:{{{zh|}}}||'''-'''[http://translate.google.com/translate?u={{fullurl:{{FULLPAGENAME}}}}&langpair=en%7Czh-CN&hl=en&ie=UTF-8&oe=UTF-8 {{#language:zh-CN}}]}}''</span>
{| width="100%" cellpadding="0" cellspacing="0" style="background-color:#3b9fca; color:white"
[[Category:Missing translation|{{PAGENAME}}]]
|-
[[Category:Missing translation{{#if:{{{ar|}}}||s lang-ar}}]]
| <!-- width=75% --> align=left | &nbsp;&nbsp;<font size="1">{{:Template:Translation/translation of/lang-{{{lang}}}}} '''[[{{{source}}}|{{{source_display|{{{source}}}}}}]]'''</font>
[[Category:Missing translation{{#if:{{{de|}}}||s lang-de}}]]
| <!-- width=25% --> align=right | <font size="1">'''<span class="plainlinks">[{{fullurl:{{{source}}}|oldid={{{version}}}}} {{{version_display|{{:Template:Translation/original/lang-{{{lang}}}}}}}}]</span>'''</font>&nbsp;&nbsp;
[[Category:Missing translation{{#if:{{{es|}}}||s lang-es}}]]
|-
[[Category:Missing translation{{#if:{{{fr|}}}||s lang-fr}}]]
| align=left | &nbsp;&nbsp;{{:{{{source}}}/translations}}
[[Category:Missing translation{{#if:{{{it|}}}||s lang-it}}]]
| align=right | <font size="1">'''<span class="plainlinks">[{{fullurl:{{{source}}}|diff=current&amp;oldid={{{version}}}}} {{{diff_display|{{:Template:Translation/changes/lang-{{{lang}}}}}}}}]</span>'''</font>&nbsp;&nbsp;
[[Category:Missing translation{{#if:{{{ja|}}}||s lang-ja}}]]
|-
[[Category:Missing translation{{#if:{{{ko|}}}||s lang-ko}}]]
|}
[[Category:Missing translation{{#if:{{{pt|}}}||s lang-pt}}]]
</div><includeonly>[[Category:Translations lang-{{{lang}}}]]</includeonly><noinclude>
[[Category:Missing translation{{#if:{{{ru|}}}||s lang-ru}}]]
[[Category:Missing translation{{#if:{{{zh|}}}||s lang-zh}}]]
<noinclude>
<includeonly>[[Category:Missing translation lang-{{{lang|{{{1}}}}}}|{{PAGENAME}}]]</includeonly><noinclude>


== Usage ==
== Usage ==


<nowiki>{{</nowiki>{{PAGENAME}}
<nowiki>{{</nowiki> Translation
| title = &lt;!-- OPTIONAL -- title (defaults to 'Google'; --&gt;
| lang = &lt;-- 2/3 character language-code of the translation&mdash;ie: <tt>en, es, ...</tt> --&gt;
| ar = ''none'' &lt;!-- OPTIONAL -- hides link for arabic translation; --&gt;
| source = &lt;-- Source page name&mdash;ie: "The OLPC Wiki" (sans quotes) --&gt;
| de = ''none'' &lt;!-- OPTIONAL -- hides link for german translation; --&gt;
| version = &lt;-- Version ID# of the edition being translated or last updated --&gt;
| es = ''none'' &lt;!-- OPTIONAL -- hides link for spanish translation; --&gt;
| ''source_display'' = &lt;-- OPTIONAL - display string to the source link above
| fr = ''none'' &lt;!-- OPTIONAL -- hides link for french translation; --&gt;
default = value of ''source'' --&gt;
| it = ''none'' &lt;!-- OPTIONAL -- hides link for italian translation; --&gt;
| ''version_display'' = &lt;-- OPTIONAL - display string for the translated ''version'' link
| ja = ''none'' &lt;!-- OPTIONAL -- hides link for japanese translation; --&gt;
default = "original" --&gt;
| ko = ''none'' &lt;!-- OPTIONAL -- hides link for korean translation; --&gt;
| ''diff_display'' = &lt;-- OPTIONAL - display string for the ''differences'' to current link
| pt = ''none'' &lt;!-- OPTIONAL -- hides link for portuguese translation; --&gt;
default = "diff" --&gt;
<nowiki>}}</nowiki>
| ru = ''none'' &lt;!-- OPTIONAL -- hides link for russing translation; --&gt;
| zh = ''none'' &lt;!-- OPTIONAL -- hides link for chinese (simplified) translation --&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.
== Sample ==


== Samples ==
The following are all equivalents, as they all generate a <tt>REDIRECT</tt> directive to the upper level

<nowiki>{{</nowiki>{{PAGENAME}}|es=none<nowiki>}}</nowiki>
<nowiki>{{</nowiki> Translation | lang = es | source = The OLPC Wiki | version = 30534 <nowiki>}}</nowiki>
{{{{PAGENAME}}|es=none}}
{{ 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:Template|{{PAGENAME}}]]

Revision as of 12:38, 23 August 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 {{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: {{Translation}}
  {{:Template:Translation/translation of/lang-{{{lang}}}}} [[{{{source}}}|{{{source}}}]] [{{fullurl:{{{source}}}|oldid={{{version}}}}} {{:Template:Translation/original/lang-{{{lang}}}}}]  
  {{:{{{source}}}/translations}} [{{fullurl:{{{source}}}|diff=current&oldid={{{version}}}}} {{:Template:Translation/changes/lang-{{{lang}}}}}]  

Usage

{{ Translation
  | lang            =  <-- 2/3 character language-code of the translation—ie: en, es, ... -->
  | source          =  <-- Source page name—ie: "The OLPC Wiki" (sans quotes) -->
  | version         =  <-- Version ID# of the edition being translated or last updated -->
  | 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" -->
}}
NOTE
the version parameter is the number displayed in the source page in the [ID# xxxxx] 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 diff link in your page, as it will show those changes in the original from your last update.

Samples

{{ Translation | lang = es | source = The OLPC Wiki | version = 30534 }}
  Traducción de The OLPC Wiki original  
   english | عربيپښتوбългарскиdeutschespañolfrançaiskreyòl ayisyenitaliano日本語한국어монголBahasa Melayuनेपालीnorskportuguêsromânăрусскийkinyarwandatürkçe中文繁體中文   +/- cambios  
{{ Translation | lang = es | source = The OLPC Wiki | version = 30534 
               | source_display = original 
               | version_display = versión traducida 
               | diff_display = últimos cambios }}
  Traducción de original versión traducida  
   english | عربيپښتوбългарскиdeutschespañolfrançaiskreyòl ayisyenitaliano日本語한국어монголBahasa Melayuनेपालीnorskportuguêsromânăрусскийkinyarwandatürkçe中文繁體中文   +/- últimos cambios