Difference between revisions of "Template:Translated From/code"

From Creative Commons
Jump to: navigation, search
(Blanked the page)
 
(2 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|}}}]]&nbsp;<!--
 
      --></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|}}} {{#show:@@@@|?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
 
                          -->|&nbsp;{{{{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<!--
 
              -->|&nbsp;&nbsp;&#124;&nbsp;&#32;<!--
 
              -->|@@@@<!--
 
#                  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|{{{source|}}}}}<!--
 
-->{{Assign property Translated from revision|{{{rev|}}}}}<!--
 
-->{{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>
 

Latest revision as of 21:10, 9 June 2015