Template:Translations: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (replaced hardcoded paths to wiki magic :))
(some tweaks and a bit more documentation)
Line 2: Line 2:
<table width="100%" cellpadding="0" cellspacing="0" style="background-color:#0093d0; color:white">
<table width="100%" cellpadding="0" cellspacing="0" style="background-color:#0093d0; color:white">
<tr>
<tr>
<td>&nbsp;&nbsp;{{{1|{{/translations}}}}}</td>
<td>&nbsp;&nbsp;{{{1|{{{{PAGENAME}}/translations}}}}}</td>
<td align="right"><font size="1">[ID#&nbsp;{{REVISIONID}}]&nbsp;</font>&nbsp;<span class="plainlinks">[{{fullurl:{{PAGENAME}}/translations|action=edit}} <tt>+/-</tt>]</span>&nbsp;&nbsp;</td></tr></table>
<td align="right"><font size="1">'''[ID#&nbsp;{{REVISIONID}}]'''&nbsp;</font>&nbsp;<span class="plainlinks">[{{fullurl:{{PAGENAME}}/translations|action=edit}} <tt>'''+/-'''</tt>]</span>&nbsp;&nbsp;</td></tr></table>
</div><includeonly>[[Category:Translated Pages]]</includeonly>
</div>
<noinclude><!--
<noinclude><!--


Line 13: Line 13:
-->[[Category:Template]]
-->[[Category:Template]]


The intent of this template is to mimic the inverse of the [[Template:Translation]] (which is geared towards the ''translated'') by having a template to be placed in the ''original'' pages.
The intent of this template is to mimic the inverse of the [[Template:Translation]] (which is geared towards the ''translated'' page) by having a template to be placed in the ''original'' pages while preserving the capibility to navigate all the translations.

'''NOTE:''' When [[translating]] (or updating a translated page) you '''MUST''' update the ''<tt>version</tt>'' number of the [[Template:Translation|<tt><nowiki>{{Translation ... version = xxxxx ... }}</nowiki></tt>]]&mdash;with the value reported on the far right: '''<tt>[ID# {{REVISIONID}}]</tt>''' by this template in the ''<tt>source</tt>'' page. This will allow exact comparissons between the current version and the version originally translated or last updated.


== Usage ==
== Usage ==
Line 21: Line 23:
<nowiki>{{Translations}}</nowiki>
<nowiki>{{Translations}}</nowiki>


Could result in a line with several links (although one should be the '''''local and original page''''') each pointing to a translated version of the current ''original'' page. ie:
Could result in a line with several links (although one should be the '''''original page''''') each pointing to a translated version of the current ''original'' page. ie:


english | español | português
english | español | português


If an argument is provided, it should be a fully wiki set of links with their display. Unfortunately, '|' is used as parameter delimeter and thus needs to be escaped. A solution is to use &amp;#124; &#124; or some other (discrete) separator (ie: , - /)
If an argument is provided, it should be a fully set of wiki links with their display. Unfortunately, '|' is used as parameter delimeter and thus needs to be escaped. A solution is to use &amp;#124; &#124; or some other (discrete) separator (ie: , - /)


<nowiki>{{Translations
<nowiki>{{Translations

Revision as of 00:27, 14 April 2007

  Template:Translations/translations [ID# 33464]  +/-  

The intent of this template is to mimic the inverse of the Template:Translation (which is geared towards the translated page) by having a template to be placed in the original pages while preserving the capibility to navigate all the translations.

NOTE: When translating (or updating a translated page) you MUST update the version number of the {{Translation ... version = xxxxx ... }}—with the value reported on the far right: [ID# 33464] by this template in the source page. This will allow exact comparissons between the current version and the version originally translated or last updated.

Usage

If no argument is provided, the sub-page currentPage/translations will be included. This page should be as simple as possible, and is currently being used as a sequence of links displayed not by their title, but by the short language names (in their own respective language) separated by '|'.

{{Translations}}

Could result in a line with several links (although one should be the original page) each pointing to a translated version of the current original page. ie:

english | español | português

If an argument is provided, it should be a fully set of wiki links with their display. Unfortunately, '|' is used as parameter delimeter and thus needs to be escaped. A solution is to use &#124; | or some other (discrete) separator (ie: , - /)

{{Translations 
  | [[One Laptop per Child|english]] &#124; [[Un portátil por niño|español]] - [[Um Laptop para cada Criança|português]] / [[One Laptop per Child zh|中文]]}}
   english | español - português / 中文 [ID# 33464]  +/-