|
|
(4 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <includeonly><!--
| |
− | --><table width=100% {{#if:{{{rtl|}}}|dir="rtl"}} style="background:#EEF3E2; border-collapse:collapse; font-size:90%;">
| |
− | <tr>
| |
− | <td width=1% valign=top style="padding-left:10px; padding-top:4px; padding-bottom:4px;"><!--
| |
− | -->[[{{Translation of|CC Wiki:Translate}}|{{{message-languages|}}}]] <!--
| |
− | --></td>
| |
− | <td style="padding-right:10px; padding-top:4px; padding-bottom:4px;"><!--
| |
− | -->{{#if:{{{source|}}}
| |
| | | |
− | # param "source=" provided, produce list of languages
| |
− |
| |
− | | {{#arraydefine:a|<!--
| |
− | -->{{#arraymap:{{#ask: [[:{{{source}}}]][[Has translation::+]]|?Has translation#=|format=list}},{{{source}}}<!--
| |
− | -->|,<!--
| |
− | -->|@@@@<!--
| |
− |
| |
− | # insert artificial sort key, to sort language names properly (space at end is needed)
| |
− | -->|{{#language:{{Language code of page|@@@@}}}} \n<!--
| |
− |
| |
− | # if the language we are treating is the translation source language
| |
− |
| |
− | -->{{#if:{{#ask: [[:@@@@]][[Has translation::+]]|?Has translation#=|format=list}}<!--
| |
− |
| |
− | # it is, output the language with a title that contains the revision number
| |
− |
| |
− | -->|[[:@@@@|<span class="plainlinks" title="@@@@ ({{{message-latest-revision|}}} {{#ask:[[:@@@@]]|?Last revision#=}})"><!--
| |
− | -->{{#language:{{Language code of page|@@@@}}}}<!--
| |
− | --></span>]]<!--
| |
− |
| |
− | # it's not, normal output
| |
− |
| |
− | # language name
| |
− | -->|[[:@@@@|{{#language:{{Language code of page|@@@@}}}}]]<!--
| |
− |
| |
− | # if a revision was specified
| |
− | -->{{#if:{{{rev|}}}<!--
| |
− |
| |
− | # if the language we are treating now is this page's language
| |
− | -->|{{#ifeq:{{Language code of page|@@@@}}|{{Language code of page}}<!--
| |
− |
| |
− | # produce the up-to-date indicator
| |
− | -->| {{{{Translation of|Template:Diff since trans}}|source={{{source}}}|rev={{{rev}}}}}<!--
| |
− |
| |
− | -->}}<!--
| |
− |
| |
− | -->}}<!--
| |
− |
| |
− | -->}}<!--
| |
− |
| |
− | -->}}<!-- close #arraymap
| |
− |
| |
− | -->|,<!--
| |
− | # get rid of duplicates and sort alphabetically (see hidden sort element above)
| |
− | -->|unique,sort=asc<!--
| |
− | -->}}<!-- close #arraydefine
| |
− |
| |
− | # output array with the pipe separators
| |
− | -->{{#arrayprint:a<!--
| |
− | -->| |  <!--
| |
− | -->|@@@@<!--
| |
− | # remove artificial sort key inserted above
| |
− | -->|{{#explode:@@@@|\n|1}}<!--
| |
− | -->}}<!--
| |
− | -->{{#arrayreset:a}}<!--
| |
− |
| |
− | # no param "source=" provided, categorize as untranslated
| |
− |
| |
− | -->| {{{message-no-known-translations|}}}
| |
− | [[{{Translation of|Category:Untranslated}}]]
| |
− | }}<!--
| |
− | --></td><!--
| |
− | --></tr>
| |
− | </table><!--
| |
− | -->{{Assign property Translated from revision|{{{rev|}}}}}<!--
| |
− | -->{{Assign property Translated from|{{{source|}}}}}<!--
| |
− | -->{{Assign property Has language}}</includeonly><noinclude>
| |
− | This is the code page for [[Template:Translated From]]. Please refer to that template for instructions.
| |
− |
| |
− | [[Category:Support translation templates]]
| |
− | </noinclude>
| |